/* =========================================================
   STUDIO COLLECTION — SPLIT EDITORIAL LAYOUT
   ========================================================= */

.bedroom-studio-section,.bedroom-studio-section *{box-sizing:border-box;}
.bedroom-studio-section{margin:92px auto;}
.bedroom-studio-container{width:100%;max-width:1180px;margin:0 auto;padding:0 18px;}

.bedroom-studio-head{max-width:820px;margin:0 auto 28px;text-align:center;}
.bedroom-studio-kicker{display:inline-flex;align-items:center;justify-content:center;gap:12px;margin-bottom:14px;font-family:'Montserrat',sans-serif;font-size:.68rem;line-height:1;letter-spacing:2.6px;text-transform:uppercase;font-weight:500;color:#8a7f73;}
.bedroom-studio-kicker::before,.bedroom-studio-kicker::after{content:"";width:34px;height:1px;display:block;background:linear-gradient(90deg,transparent,rgba(138,127,115,.62));}
.bedroom-studio-kicker::after{background:linear-gradient(90deg,rgba(138,127,115,.62),transparent);}
.bedroom-studio-title{margin:0 0 14px;font-family:'Playfair Display',serif;font-size:clamp(2rem,3vw,2.8rem);line-height:1.05;font-weight:500;letter-spacing:-.04em;color:#111;}
.bedroom-studio-text{max-width:700px;margin:0 auto;font-family:'Montserrat',sans-serif;font-size:1rem;line-height:1.8;font-weight:300;color:#444;}

.bedroom-studio-frame{width:100%;max-width:1120px;margin:0 auto;padding:24px;border-radius:32px;background:radial-gradient(circle at top left,rgba(255,255,255,.88),rgba(255,255,255,0) 42%),linear-gradient(180deg,#f8f6f3 0%,#f0ebe4 100%);box-shadow:0 30px 90px rgba(0,0,0,.075),0 1px 0 rgba(255,255,255,.72) inset;}
.bedroom-studio-layout{display:grid;grid-template-columns:minmax(0,.92fr) minmax(440px,.82fr);gap:26px;align-items:stretch;}

.bedroom-studio-visual-col{min-width:0;display:flex;}
.bedroom-studio-main-photo{width:100%;max-width:590px;margin:0 auto;overflow:hidden;border-radius:26px;background:#eee8e1;box-shadow:0 20px 56px rgba(0,0,0,.11),0 0 0 1px rgba(255,255,255,.42) inset;}
.bedroom-studio-main-photo img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;object-position:center;background:#eee8e1;}

.bedroom-studio-products-col{position:relative;min-width:0;display:flex;flex-direction:column;max-height:590px;overflow:hidden;}
.bedroom-studio-products-head{flex:0 0 auto;margin:2px 0 14px;text-align:left;}
.bedroom-studio-products-head span{font-family:'Montserrat',sans-serif;font-size:.7rem;letter-spacing:2.2px;text-transform:uppercase;color:#8a8178;}

.bedroom-studio-product-list{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:14px;overflow-x:hidden;padding-right:4px;}
.bedroom-studio-product-list.product-count-1,.bedroom-studio-product-list.product-count-2,.bedroom-studio-product-list.product-count-3{justify-content:space-between;overflow:hidden;}
.bedroom-studio-product-list.product-count-1 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-2 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-3 .bedroom-studio-product-row{flex:1 1 0;}
.bedroom-studio-product-list.product-count-4,.bedroom-studio-product-list.product-count-5,.bedroom-studio-product-list.product-count-6{justify-content:flex-start;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(120,110,100,.36) transparent;padding-bottom:34px;}
.bedroom-studio-product-list.product-count-4::-webkit-scrollbar,.bedroom-studio-product-list.product-count-5::-webkit-scrollbar,.bedroom-studio-product-list.product-count-6::-webkit-scrollbar{width:5px;}
.bedroom-studio-product-list.product-count-4::-webkit-scrollbar-track,.bedroom-studio-product-list.product-count-5::-webkit-scrollbar-track,.bedroom-studio-product-list.product-count-6::-webkit-scrollbar-track{background:transparent;}
.bedroom-studio-product-list.product-count-4::-webkit-scrollbar-thumb,.bedroom-studio-product-list.product-count-5::-webkit-scrollbar-thumb,.bedroom-studio-product-list.product-count-6::-webkit-scrollbar-thumb{background:rgba(120,110,100,.32);border-radius:999px;}

.bedroom-studio-product-row{display:grid;grid-template-columns:245px minmax(0,1fr);gap:18px;align-items:center;min-height:0;padding:12px;border-radius:22px;color:inherit;text-decoration:none;background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.48));box-shadow:0 12px 34px rgba(0,0,0,.045),0 0 0 1px rgba(255,255,255,.64) inset;transition:transform .3s ease,box-shadow .3s ease,background .3s ease;}
.bedroom-studio-product-row:hover{transform:translateY(-3px);background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(255,255,255,.60));box-shadow:0 18px 46px rgba(0,0,0,.075),0 0 0 1px rgba(255,255,255,.74) inset;}
.bedroom-studio-product-list.product-count-4 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-5 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-6 .bedroom-studio-product-row{flex:0 0 158px;grid-template-columns:238px minmax(0,1fr);padding:12px;}

.bedroom-studio-product-image{width:100%;height:100%;min-height:118px;aspect-ratio:16/10;overflow:hidden;border-radius:17px;background:#f6f4f1;display:flex;align-items:center;justify-content:center;}
.bedroom-studio-product-list.product-count-1 .bedroom-studio-product-image,.bedroom-studio-product-list.product-count-2 .bedroom-studio-product-image,.bedroom-studio-product-list.product-count-3 .bedroom-studio-product-image{min-height:100%;}
.bedroom-studio-product-image img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;transition:transform .45s ease;}
.bedroom-studio-product-row:hover .bedroom-studio-product-image img{transform:scale(1.025);}

.bedroom-studio-product-info{min-width:0;padding-right:4px;}
.bedroom-studio-product-type{margin:0 0 5px;font-family:'Montserrat',sans-serif;font-size:.58rem;letter-spacing:1.55px;text-transform:uppercase;color:#9a9085;}
.bedroom-studio-product-info h3{margin:0 0 10px;font-family:'Montserrat',sans-serif;font-size:.78rem;line-height:1.34;font-weight:500;letter-spacing:.018em;text-transform:uppercase;color:#141414;}
.bedroom-studio-product-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.bedroom-studio-product-price{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-family:'Montserrat',sans-serif;}
.bedroom-studio-old-price{color:#999;text-decoration:line-through;}
.bedroom-studio-new-price{font-size:.98rem;font-weight:600;color:#111;}
.bedroom-studio-product-action{position:relative;flex:0 0 auto;font-family:'Montserrat',sans-serif;font-size:.58rem;line-height:1;letter-spacing:1.35px;text-transform:uppercase;color:#7b7167;}

.bedroom-studio-products-col:has(.product-count-4)::after,.bedroom-studio-products-col:has(.product-count-5)::after,.bedroom-studio-products-col:has(.product-count-6)::after{content:"Slinkti žemyn";position:absolute;left:0;right:0;bottom:0;z-index:3;height:42px;display:flex;align-items:flex-end;justify-content:center;padding-bottom:2px;pointer-events:none;font-family:'Montserrat',sans-serif;font-size:.58rem;line-height:1;letter-spacing:1.8px;text-transform:uppercase;color:rgba(123,113,103,.62);background:linear-gradient(to bottom,rgba(240,235,228,0),rgba(240,235,228,.96) 72%);}

@media(min-width:992px) and (max-width:1365px){
.bedroom-studio-section{margin:76px auto;}
.bedroom-studio-container{max-width:1040px;}
.bedroom-studio-frame{max-width:980px;padding:22px;border-radius:28px;}
.bedroom-studio-layout{grid-template-columns:minmax(0,.82fr) minmax(430px,.9fr);gap:22px;}
.bedroom-studio-main-photo{max-width:500px;border-radius:22px;}
.bedroom-studio-products-col{max-height:500px;}
.bedroom-studio-product-row{grid-template-columns:220px minmax(0,1fr);gap:14px;padding:10px;border-radius:20px;}
.bedroom-studio-product-list.product-count-4 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-5 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-6 .bedroom-studio-product-row{flex-basis:140px;grid-template-columns:210px minmax(0,1fr);padding:10px;}
.bedroom-studio-product-image{border-radius:14px;min-height:106px;}
.bedroom-studio-product-info h3{font-size:.7rem;margin-bottom:8px;}
.bedroom-studio-product-type{font-size:.54rem;letter-spacing:1.3px;}
.bedroom-studio-new-price{font-size:.9rem;}
.bedroom-studio-product-action{font-size:.54rem;letter-spacing:1.1px;}
}

@media(max-width:991px){
.bedroom-studio-section{margin:72px auto;}
.bedroom-studio-frame{padding:18px;border-radius:26px;}
.bedroom-studio-layout{grid-template-columns:1fr;gap:24px;align-items:start;}
.bedroom-studio-main-photo{max-width:680px;border-radius:22px;}
.bedroom-studio-products-col{max-height:none;overflow:visible;}
.bedroom-studio-products-col::after{display:none!important;}
.bedroom-studio-products-head{text-align:center;}
.bedroom-studio-product-list,.bedroom-studio-product-list.product-count-1,.bedroom-studio-product-list.product-count-2,.bedroom-studio-product-list.product-count-3,.bedroom-studio-product-list.product-count-4,.bedroom-studio-product-list.product-count-5,.bedroom-studio-product-list.product-count-6{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;overflow:visible;padding-right:0;padding-bottom:0;}
.bedroom-studio-product-list.product-count-1 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-2 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-3 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-4 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-5 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-6 .bedroom-studio-product-row{flex:none;}
.bedroom-studio-product-row,.bedroom-studio-product-list.product-count-4 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-5 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-6 .bedroom-studio-product-row{display:block;min-height:0;padding:12px;}
.bedroom-studio-product-image{aspect-ratio:16/10;height:auto;min-height:0;margin-bottom:12px;}
.bedroom-studio-product-bottom{justify-content:center;}
.bedroom-studio-product-action{display:none;}
.bedroom-studio-product-info{text-align:center;padding-right:0;}
}

@media(max-width:767px){
.bedroom-studio-section{margin:64px auto;}
.bedroom-studio-container{padding:0 14px;}
.bedroom-studio-title{font-size:1.75rem;}
.bedroom-studio-text{font-size:.94rem;line-height:1.7;}
.bedroom-studio-frame{padding:14px;border-radius:20px;}
.bedroom-studio-main-photo{border-radius:16px;}
.bedroom-studio-product-list,.bedroom-studio-product-list.product-count-1,.bedroom-studio-product-list.product-count-2,.bedroom-studio-product-list.product-count-3,.bedroom-studio-product-list.product-count-4,.bedroom-studio-product-list.product-count-5,.bedroom-studio-product-list.product-count-6{grid-template-columns:1fr;gap:12px;}
.bedroom-studio-product-row,.bedroom-studio-product-list.product-count-4 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-5 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-6 .bedroom-studio-product-row{display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px;align-items:center;padding:10px;border-radius:16px;}
.bedroom-studio-product-image{aspect-ratio:16/10;margin-bottom:0;border-radius:12px;min-height:0;}
.bedroom-studio-product-info{text-align:left;}
.bedroom-studio-product-type{font-size:.56rem;letter-spacing:1.3px;}
.bedroom-studio-product-info h3{font-size:.7rem;margin-bottom:8px;}
.bedroom-studio-product-bottom{justify-content:flex-start;}
.bedroom-studio-new-price{font-size:.86rem;}
}
@media(max-width:420px){.bedroom-studio-product-row,.bedroom-studio-product-list.product-count-4 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-5 .bedroom-studio-product-row,.bedroom-studio-product-list.product-count-6 .bedroom-studio-product-row{grid-template-columns:132px minmax(0,1fr);}}


/* =========================================================
   FINAL FIX — NATURAL PHOTO + PRODUCT COLUMN MATCH
   Veikia kartu su studio-collection.php esančiu JS.
   Square foto lieka square.
   Landscape foto lieka landscape.
   Nuotraukos nekropinamos.
   Produktų kolona desktop/laptop aukštyje pririšama prie realaus foto aukščio.
   ========================================================= */

.bedroom-studio-layout{
    align-items:flex-start !important;
}

.bedroom-studio-visual-col{
    display:block !important;
    min-width:0 !important;
}

.bedroom-studio-main-photo{
    width:100% !important;
    max-width:640px !important;
    margin:0 auto !important;

    overflow:hidden !important;
    border-radius:28px !important;

    background:#eee8e1 !important;
    line-height:0 !important;

    box-shadow:
        0 24px 60px rgba(0,0,0,.10),
        0 0 0 1px rgba(255,255,255,.42) inset !important;
}

.bedroom-studio-main-photo img{
    display:block !important;
    width:100% !important;
    height:auto !important;

    aspect-ratio:auto !important;

    object-fit:contain !important;
    object-position:center center !important;

    background:transparent !important;
}

/* JS įrašo --studio-photo-height kiekvienai sekcijai */
@media(min-width:992px){

    .bedroom-studio-products-col{
        align-self:flex-start !important;
        max-height:var(--studio-photo-height, 590px) !important;
        overflow:hidden !important;
    }

    .bedroom-studio-product-list{
        min-height:0 !important;
    }

}

/* LAPTOP */
@media(min-width:992px) and (max-width:1365px){

    .bedroom-studio-main-photo{
        max-width:540px !important;
        border-radius:24px !important;
    }

}

/* TABLET */
@media(max-width:991px){

    .bedroom-studio-main-photo{
        max-width:680px !important;
        border-radius:22px !important;
    }

    .bedroom-studio-products-col{
        max-height:none !important;
        overflow:visible !important;
    }

}

/* MOBILE */
@media(max-width:767px){

    .bedroom-studio-main-photo{
        border-radius:16px !important;
    }

    .bedroom-studio-products-col{
        max-height:none !important;
        overflow:visible !important;
    }

}


/* =========================================================
   FINAL FIX — PRODUCT COLUMN TRUE HEIGHT
   Fix 1–3 produktų kolekcijoms, kad kortelės nesusitrauktų viršuje.
   Reikia, kad studio-collection.php JS įrašytų --studio-photo-height.
   ========================================================= */

@media(min-width:992px){

    .bedroom-studio-products-col{
        height:var(--studio-photo-height, 590px) !important;
        max-height:var(--studio-photo-height, 590px) !important;
        align-self:flex-start !important;
        overflow:hidden !important;
    }

    .bedroom-studio-product-list{
        flex:1 1 auto !important;
        min-height:0 !important;
        height:auto !important;
    }

    .bedroom-studio-product-list.product-count-1,
    .bedroom-studio-product-list.product-count-2,
    .bedroom-studio-product-list.product-count-3{
        justify-content:space-between !important;
        overflow:hidden !important;
    }

    .bedroom-studio-product-list.product-count-1 .bedroom-studio-product-row,
    .bedroom-studio-product-list.product-count-2 .bedroom-studio-product-row,
    .bedroom-studio-product-list.product-count-3 .bedroom-studio-product-row{
        flex:1 1 0 !important;
        min-height:0 !important;
    }

    .bedroom-studio-product-list.product-count-1 .bedroom-studio-product-image,
    .bedroom-studio-product-list.product-count-2 .bedroom-studio-product-image,
    .bedroom-studio-product-list.product-count-3 .bedroom-studio-product-image{
        height:100% !important;
        min-height:0 !important;
    }

}

@media(max-width:991px){

    .bedroom-studio-products-col{
        height:auto !important;
        max-height:none !important;
        overflow:visible !important;
    }

    .bedroom-studio-product-list{
        height:auto !important;
    }

    .bedroom-studio-product-list.product-count-1 .bedroom-studio-product-row,
    .bedroom-studio-product-list.product-count-2 .bedroom-studio-product-row,
    .bedroom-studio-product-list.product-count-3 .bedroom-studio-product-row{
        flex:none !important;
    }

    .bedroom-studio-product-list.product-count-1 .bedroom-studio-product-image,
    .bedroom-studio-product-list.product-count-2 .bedroom-studio-product-image,
    .bedroom-studio-product-list.product-count-3 .bedroom-studio-product-image{
        height:auto !important;
    }

}

/* =========================================================
   MORE BUTTON — INSIDE PRODUCT LIST
   ========================================================= */

.bedroom-studio-more-row{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:4px 0 0;
}

.bedroom-studio-more-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 22px;
    border-radius:999px;
    font-family:'Montserrat',sans-serif;
    font-size:.62rem;
    line-height:1;
    letter-spacing:1.6px;
    text-transform:uppercase;
    font-weight:500;
    color:#111;
    text-decoration:none;
    background:rgba(255,255,255,.78);
    box-shadow:0 10px 28px rgba(0,0,0,.055),0 0 0 1px rgba(255,255,255,.72) inset;
    transition:transform .3s ease,box-shadow .3s ease,background .3s ease;
}

.bedroom-studio-more-btn:hover{
    transform:translateY(-2px);
    background:rgba(255,255,255,.94);
    box-shadow:0 14px 36px rgba(0,0,0,.075),0 0 0 1px rgba(255,255,255,.82) inset;
}

@media(min-width:992px){

    .bedroom-studio-product-list.product-count-1 .bedroom-studio-more-row,
    .bedroom-studio-product-list.product-count-2 .bedroom-studio-more-row,
    .bedroom-studio-product-list.product-count-3 .bedroom-studio-more-row{
        position:absolute;
        left:0;
        right:0;
        bottom:0;
        z-index:4;
        pointer-events:none;
    }

    .bedroom-studio-product-list.product-count-1 .bedroom-studio-more-btn,
    .bedroom-studio-product-list.product-count-2 .bedroom-studio-more-btn,
    .bedroom-studio-product-list.product-count-3 .bedroom-studio-more-btn{
        pointer-events:auto;
    }

}

@media(max-width:991px){

    .bedroom-studio-more-row{
        grid-column:1 / -1;
        padding-top:2px;
    }

}


.bedroom-studio-main-photo{
    position:relative !important;
}

.bedroom-studio-discount-badge{
    position:absolute;
    top:24px;
    right:24px;
    z-index:5;

    padding:14px 18px;

    border-radius:16px;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;

    background:rgba(200,162,200,.18);

    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);

    border:1px solid rgba(255,255,255,.20);

    box-shadow:
        0 12px 32px rgba(0,0,0,.10),
        0 0 40px rgba(200,162,200,.20);
}

.bedroom-studio-discount-badge span{
    font-family:'Montserrat',sans-serif;
    font-size:1.8rem;
    line-height:1;
    font-weight:700;
    color:#fff;
}

.bedroom-studio-discount-badge small{
    font-family:'Montserrat',sans-serif;
    font-size:.58rem;
    line-height:1;
    letter-spacing:2px;
    text-transform:uppercase;
    color:rgba(255,255,255,.92);
}

@media(max-width:767px){
    .bedroom-studio-discount-badge{
        top:12px;
        right:12px;
        padding:10px 14px;
    }

    .bedroom-studio-discount-badge span{
        font-size:1.4rem;
    }
}