/* Preserve the original controls inside their data-collection ancestor. */
body.tw-site .tw-unified-collection-tools{
 display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;
 background:#073f43;color:#f7f8f2;border:1px solid #073f43;border-radius:8px;
 padding:12px 18px;margin-top:0;margin-bottom:20px;box-shadow:0 5px 16px #073f4312;
}
body.tw-site .tw-unified-collection-tools .construction-tabs{
 display:flex;flex:1 1 550px;min-width:0;gap:22px;margin:0;padding:0 0 5px;
 border:0;overflow-x:auto;white-space:nowrap;scrollbar-width:thin;scrollbar-color:#b9d9cd #073f43;
}
body.tw-site .tw-unified-collection-tools .construction-tabs a{
 flex:none;padding:9px 0;border:0;border-bottom:2px solid transparent;border-radius:0;
 color:#f7f8f2!important;background:transparent;box-shadow:none;font-size:14px;font-weight:500;
}
body.tw-site .tw-unified-collection-tools .construction-tabs a.active{color:#b9d9cd!important;border-bottom-color:#b9d9cd;}
body.tw-site .tw-unified-collection-tools .construction-tabs a:hover{color:#b9d9cd!important;}
body.tw-site .tw-unified-collection-tools [data-result-count]{margin:0;color:#d1e3de;font-size:12px;white-space:nowrap;}
body.tw-site .tw-unified-collection-tools > div{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
body.tw-site .tw-unified-collection-tools .pill,
body.tw-site .tw-unified-collection-tools .feel-filter summary{
 background:transparent;border:1px solid #719a96;color:#f7f8f2!important;box-shadow:none;
 padding:9px 13px;border-radius:24px;font-size:12px;line-height:1.35;white-space:nowrap;
}
body.tw-site .tw-unified-collection-tools .pill.active,
body.tw-site .tw-unified-collection-tools .pill:hover,
body.tw-site .tw-unified-collection-tools summary:hover{background:#dceee8;color:#073f43!important;border-color:#dceee8;}
body.tw-site .tw-unified-collection-tools .feel-filter{position:relative;}
body.tw-site .tw-unified-collection-tools .filter-pills{background:#fff;color:#073f43;z-index:25;border:1px solid #c5dad1;box-shadow:0 8px 24px #073f4326;}
body.tw-site .tw-unified-collection-tools .filter-pills .pill{color:#073f43!important;border-color:#b1cbc1;}
body.tw-site .tw-unified-collection-tools :is(a,button,summary):focus-visible{outline:2px solid #b9d9cd;outline-offset:3px;}
@media(max-width:760px){
 body.tw-site .tw-unified-collection-tools{padding:10px 12px;gap:9px;margin-bottom:18px;border-radius:6px;}
 body.tw-site .tw-unified-collection-tools .construction-tabs{flex-basis:100%;gap:22px;padding-bottom:7px;border-bottom:1px solid #4b7472;}
 body.tw-site .tw-unified-collection-tools .construction-tabs a{font-size:14px;padding:6px 0;}
 body.tw-site .tw-unified-collection-tools [data-result-count]{font-size:11px;margin-right:auto;}
 body.tw-site .tw-unified-collection-tools > div{gap:6px;}
 body.tw-site .tw-unified-collection-tools .pill,body.tw-site .tw-unified-collection-tools .feel-filter summary{font-size:11px;padding:8px 10px;}
}

/* Approved chair-free artwork; responsive framing never regenerates the source. */
.tw-mattress-collection-hero{width:100%;margin:0;padding:0;overflow:hidden;background:#2f2a25;}
.tw-mattress-collection-hero img{display:block;width:100%;height:clamp(360px,45vw,680px);object-fit:cover;object-position:50% 55%;}
@media(max-width:760px){.tw-mattress-collection-hero img{height:auto;aspect-ratio:4/3;object-fit:cover;object-position:50% 55%;}}

/* Compact image hero with the original intro copy overlaid on the room shot. */
body.tw-site .tw-mattress-collection-hero{position:relative;isolation:isolate;}
body.tw-site .tw-mattress-collection-hero img{height:clamp(340px,32vw,520px);object-position:50% 65%;}
.tw-mattress-collection-hero::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,.62),rgba(0,0,0,.22) 35%,transparent 65%);}
body.tw-site .tw-collection-hero-copy{position:absolute;z-index:1;top:26px;left:0;right:0;text-align:center;padding-block:0;color:#fff;}
body.tw-site .tw-collection-hero-copy .eyebrow{color:#e2eee8;margin:0 0 8px;}
body.tw-site .tw-collection-hero-copy h1{color:#fff;margin:0 0 10px;font-size:clamp(36px,4vw,58px);line-height:1.1;text-shadow:0 2px 10px #0004;}
body.tw-site .tw-collection-hero-copy .intro{color:#fff;margin:0;font-size:18px;line-height:1.45;}
body.tw-site .tw-mattress-collection-hero + .collection-section{padding-top:0!important;margin-top:0;border-top:0;}
body.tw-site .tw-mattress-collection-hero + .collection-section .tw-unified-collection-tools{margin-top:0;border-top-left-radius:0;border-top-right-radius:0;}
@media(max-width:760px){
 body.tw-site .tw-mattress-collection-hero img{height:clamp(210px,56vw,280px);aspect-ratio:auto;object-position:50% 68%;}
 body.tw-site .tw-collection-hero-copy{top:14px;}
 body.tw-site .tw-collection-hero-copy .eyebrow{font-size:9px;margin-bottom:5px;}
 body.tw-site .tw-collection-hero-copy h1{font-size:29px;margin-bottom:6px;}
 body.tw-site .tw-collection-hero-copy .intro{font-size:13px;line-height:1.4;}
}

body.tw-site .tw-collection-hero-copy .intro{margin-inline:auto!important;text-align:center;}

body.tw-site .tw-mattress-collection-hero + .collection-section{padding-top:10px!important;}
body.tw-site .tw-mattress-collection-hero + .collection-section .tw-unified-collection-tools{border-radius:8px;}
@media(max-width:760px){body.tw-site .tw-mattress-collection-hero + .collection-section{padding-top:8px!important;}body.tw-site .tw-mattress-collection-hero + .collection-section .tw-unified-collection-tools{border-radius:6px;}}

/* A little more separation, with a tighter but readable toolbar. */
body.tw-site .tw-mattress-collection-hero + .collection-section{padding-top:16px!important;}
body.tw-site .tw-unified-collection-tools{padding:8px 16px;gap:8px 18px;}
body.tw-site .tw-unified-collection-tools .construction-tabs{padding-bottom:2px;}
body.tw-site .tw-unified-collection-tools .construction-tabs a{padding-block:6px;}
body.tw-site .tw-unified-collection-tools .pill,body.tw-site .tw-unified-collection-tools .feel-filter summary{padding-block:7px;min-height:34px;box-sizing:border-box;}
@media(max-width:760px){
 body.tw-site .tw-mattress-collection-hero + .collection-section{padding-top:13px!important;}
 body.tw-site .tw-unified-collection-tools{padding:7px 12px;gap:6px;}
 body.tw-site .tw-unified-collection-tools .construction-tabs{padding-bottom:4px;}
 body.tw-site .tw-unified-collection-tools .construction-tabs a{padding-block:4px;}
 body.tw-site .tw-unified-collection-tools .pill,body.tw-site .tw-unified-collection-tools .feel-filter summary{padding-block:6px;}
}

/* Partially overlap the image, matching the homepage hero treatment. */
body.tw-site .tw-mattress-collection-hero + .collection-section{
 position:relative;z-index:2;padding-top:0!important;margin-top:-24px;
}
@media(min-width:761px){
 body.tw-site .tw-mattress-collection-hero + .collection-section .tw-unified-collection-tools{padding-block:12px;}
}
@media(max-width:760px){
 body.tw-site .tw-mattress-collection-hero + .collection-section{margin-top:-16px;}
}

/* WooCommerce also adds its class to body; keep content padding off the page shell. */
@media(max-width:760px){
 body.tw-site.woocommerce{padding:0;}
}

/* Match the Family Bed landing page's desktop four-card row. */
@media(min-width:761px){
 body.tw-site.tw-family-collection-page .collection-section .grid[data-product-grid]{
  grid-template-columns:repeat(4,minmax(0,1fr));gap:26px;
  width:min(1280px,calc(100% + 16px));max-width:none;
  margin-inline:calc((100% - min(1280px,calc(100% + 16px)))/2);
 }
}

/* Collection feature strip and chapter navigation: reversed landing palette. */
body.tw-site .tw-family-collection-sections .fb-proof{background:#073f43;border-bottom-color:#537b78;}
body.tw-site .tw-family-collection-sections .fb-proof span{color:#d1e3de;border-right-color:#537b78;}
body.tw-site .tw-family-collection-sections .fb-proof strong{color:#f7f8f2;}
body.tw-site .tw-family-collection-sections .fb-proof span::after{border-bottom-color:#537b78;}
body.tw-site .tw-family-collection-sections .fb-subnav{background:#edf6f1;border-bottom-color:#c8d9d2;scrollbar-color:#719a96 #edf6f1;}
body.tw-site .tw-family-collection-sections .fb-subnav a,
body.tw-site .tw-family-collection-sections .fb-subnav a:visited{color:#073f43;}
body.tw-site .tw-family-collection-sections .fb-subnav a:hover{color:#007b7d;}
body.tw-site .tw-family-collection-sections .fb-subnav a:focus-visible{outline:2px solid #073f43;outline-offset:4px;}

/* Slightly closer desktop framing to match the other panoramic collection heroes. */
@media(min-width:761px){
 body.tw-site .tw-loft-collection-hero img{transform:translateX(40px) scale(1.08);transform-origin:50% 65%;}
}

@media(max-width:760px){
 body.tw-site .tw-loft-collection-hero img{object-position:39% 65%;}
}
