
/* V4: equal-size responsive mattress images, no cropping */
.mattress-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.mattress-card {display:flex;flex-direction:column;min-width:0}
.mattress-card>a:first-child {display:grid;place-items:center;aspect-ratio: 4/3;background:#f5f6f3;padding:16px;overflow:hidden}
.mattress-card>a:first-child img {display:block;width:100%;height:100%;max-height:100%;object-fit:contain;object-position:center;background:transparent}
.mattress-card .body {display:flex;flex:1;flex-direction:column;align-items:flex-start}
.mattress-card .body .btn {margin-top:auto}
.mattress-gallery {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.mattress-gallery>a {display:grid;place-items:center;min-width:0;aspect-ratio: 4/3;overflow:hidden;padding:12px;border:1px solid #e1e6df;border-radius:12px;background:#f5f6f3}
.mattress-gallery>a img {display:block;width:100%;height:100%;object-fit:contain;object-position:center;background:transparent;border-radius:0;transition:transform .2s ease}
.mattress-gallery>a:hover img {transform:scale(1.025)}
.legacy-brochures {grid-template-columns:repeat(3,minmax(0,1fr))}
.legacy-brochures>a {display:grid;place-items:center;aspect-ratio: 3/4;min-width:0;padding:10px;border:1px solid #e1e6df;border-radius:12px;background:#f5f6f3;overflow:hidden}
.legacy-brochures>a img {width:100%;height:100%;object-fit:contain;background:transparent;border-radius:0}
.select-nav {font-weight:800!important}
.select-feature {background:#f1f4ef}
.select-feature-inner {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:44px;align-items:center}
.select-brand-art {min-height:270px;border-radius:16px;background:linear-gradient(125deg,#182c23,#375c44);color:#fff;display:flex;justify-content:center;align-items:center;flex-direction:column;letter-spacing:.16em;text-align:center;padding:36px}
.select-brand-art span {font-size:clamp(2.2rem,5vw,4rem);font-weight:700;letter-spacing:.2em}
.select-brand-art small {font-size:12px;letter-spacing:.33em;margin-top:10px}
.outline-select {border:1px solid #1f5034;color:#1f5034;background:transparent}
@media(max-width:900px){.mattress-grid {grid-template-columns:repeat(2,minmax(0,1fr))}.mattress-gallery {grid-template-columns:repeat(2,minmax(0,1fr))}.legacy-brochures{grid-template-columns:repeat(2,minmax(0,1fr))}.select-feature-inner{grid-template-columns:1fr}}
@media(max-width:600px){.mattress-grid{grid-template-columns:1fr}.mattress-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mattress-gallery>a{padding:6px;aspect-ratio:1/1}.legacy-brochures{grid-template-columns:1fr}.legacy-brochures>a{aspect-ratio:3/4}.mattress-card>a:first-child{aspect-ratio:4/3}.select-brand-art{min-height:180px}.select-nav{width:100%}}

/* A.H. World Trade original logo */
.brand-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo img {
    display: block;
    width: auto;
    height: 76px;
    max-width: 100%;
    object-fit: contain;
}

.brand-logo-footer img {
    height: 110px;
}

@media (max-width: 768px) {
    .brand-logo img {
        height: 56px;
    }
    .brand-logo-footer img {
        height: 85px;
    }
}

/* Official SELECT brand logos */
.select-brand-inline {
    margin: 20px 0 26px;
}

.select-brand-inline img {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    object-fit: contain;
}

.select-brand-inline-hero img {
    max-width: 320px;
}

@media (max-width: 768px) {
    .select-brand-inline img {
        max-width: 220px;
    }

    .select-brand-inline-hero img {
        max-width: 260px;
    }
}

/* Official SELECT logo inside brand panel */
.select-panel-logo {
    display: block;
    width: 78%;
    max-width: 340px;
    height: auto;
    max-height: 190px;
    object-fit: contain;
    margin: auto;
}

@media (max-width: 768px) {
    .select-panel-logo {
        width: 75%;
        max-width: 260px;
    }
}

/* SELECT logo centred inside its green brand panel */
.select-brand-art {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.select-brand-art .select-panel-logo {
    display: block;
    width: 78%;
    max-width: 340px;
    height: auto;
    max-height: 190px;
    object-fit: contain;
    margin: auto;
}

@media (max-width: 768px) {
    .select-brand-art .select-panel-logo {
        width: 82%;
        max-width: 280px;
    }
}

/* FIX: SELECT logo must stay inside original green box */
.select-brand-art {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    isolation: isolate;
}

.select-brand-art > .select-panel-logo {
    position: static !important;
    display: block !important;
    width: 75% !important;
    max-width: 300px !important;
    height: auto !important;
    max-height: 150px !important;
    min-height: 0 !important;
    object-fit: contain !important;
    transform: none !important;
    margin: auto !important;
    flex: 0 1 auto;
}

.select-brand-art::before,
.select-brand-art::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 768px) {
    .select-brand-art > .select-panel-logo {
        width: 78% !important;
        max-width: 250px !important;
        max-height: 130px !important;
    }
}
