/* A bounded gallery never grows with the adjacent product information. */
.product-dialog{width:min(1120px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border-radius:18px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding-top:76px}
.product-modal-header{position:sticky;top:0;z-index:6;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 24px;background:#fbfcf7f5;backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.product-modal-header>span{font-size:16px;font-weight:700;letter-spacing:-.6px}.product-modal-header .dialog-close{position:static;display:flex;align-items:center;gap:9px;width:auto;height:40px;padding:8px 13px;border:1px solid var(--line);border-radius:30px;font-size:14px;background:white}.product-modal-header .dialog-close span{font-size:23px;line-height:1}
.product-dialog .detail-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:32px;align-items:start;padding:24px}
.product-dialog .detail-copy{padding:8px 2px 20px;min-width:0}
.product-dialog .detail-copy h2{font-size:clamp(25px,3vw,40px);line-height:1.12;letter-spacing:-.055em;overflow-wrap:anywhere;margin:15px 0 16px}
.product-dialog .detail-copy>.eyebrow{font-size:12px;letter-spacing:.09em;line-height:1.5}
.product-dialog .detail-copy .detail-benefits{display:flex;gap:8px;margin:0 0 8px;font-size:15px}
.product-dialog .detail-benefits span{background:#eaf0dd;padding:7px 11px;border-radius:30px}.product-dialog .detail-benefits span+span:before{content:none}
.product-dialog .detail-copy>.benefit-qualifier{font-size:13px;margin:0 0 20px;line-height:1.55}
.product-dialog .detail-copy>.detail-intro-short{font-size:18px;color:var(--ink);line-height:1.5;margin:0 0 10px}
.product-dialog .detail-copy>.detail-preview-note{font-size:14px;line-height:1.65;margin:0 0 18px;color:var(--muted)}
.detail-purchase{border:1px solid var(--line);border-radius:12px;padding:16px;margin-bottom:18px;background:#fff}
.product-dialog .detail-status{margin:0;padding:0 0 12px;border:0;flex-wrap:wrap;font-size:13px}
.product-dialog .detail-purchase .button{border-radius:7px;margin:0;font-size:15px;min-height:48px}
.product-dialog .detail-purchase .selection-help{font-size:12px;margin:10px 0 0;line-height:1.5;color:var(--muted)}
.product-dialog .detail-copy>.detail-safety-reminder{font-size:13px;color:#705239;border-left:3px solid #b48d61;padding:0 0 0 11px;margin:0 0 20px;line-height:1.6}
.product-gallery{position:sticky;top:88px;align-self:start;min-width:0;border-radius:14px;overflow:hidden;border:1px solid #193a2c0b}
.gallery-topline{display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:12px 18px;gap:8px;font-size:11px;letter-spacing:.07em}
.gallery-motion{background:#ffffffa8;border:1px solid #193a2c22;border-radius:20px;padding:6px 10px;min-height:32px;font-size:12px;letter-spacing:0}.gallery-motion:disabled{opacity:.6;cursor:default}
.gallery-stage{position:relative;height:clamp(320px,43vw,450px);overflow:hidden;isolation:isolate;touch-action:pan-y}
.gallery-slide{position:absolute;inset:0;display:grid;place-items:center}.gallery-slide[hidden]{display:none!important}
.gallery-front{position:relative;z-index:1;width:75%;max-width:330px;aspect-ratio:3/4;background-image:url('assets/gallery/fronts.png');background-size:400% 100%;background-repeat:no-repeat;filter:drop-shadow(0 20px 16px #193a2c10);transform-origin:50% 70%}
.gallery-front.pack-0{background-position:0 0}.gallery-front.pack-1{background-position:33.333333% 0}.gallery-front.pack-2{background-position:66.666667% 0}.gallery-front.pack-3{background-position:100% 0}
.bottle-shadow{position:absolute;width:37%;height:15px;left:31.5%;bottom:7%;border-radius:50%;background:#183e2420;filter:blur(9px)}
.motion-enabled .product-dialog[open] .gallery-front{animation:bottleFloat 5s ease-in-out infinite}.motion-enabled .product-dialog[open] .bottle-shadow{animation:bottleShadow 5s ease-in-out infinite}
.gallery-paused .gallery-front,.gallery-paused .bottle-shadow{animation-play-state:paused!important}
@keyframes bottleFloat{0%,100%{transform:translateY(0) rotate(-.7deg)}50%{transform:translateY(-12px) rotate(.7deg)}}
@keyframes bottleShadow{0%,100%{transform:scaleX(1);opacity:.65}50%{transform:scaleX(.85);opacity:.4}}
.gallery-controls{display:grid;grid-template-columns:44px 1fr 44px;gap:12px;align-items:center;padding:8px 16px}
.gallery-arrow{height:44px;width:44px;border-radius:50%;border:1px solid #193a2c2b;background:#ffffffb8;font-size:22px;transition:background .2s}
.gallery-arrow:hover{background:white}.gallery-caption{text-align:center;font-size:14px;line-height:1.4;display:flex;flex-direction:column;gap:3px}.gallery-caption strong{font-weight:600}.gallery-caption span{font-size:11px;letter-spacing:.1em;color:var(--muted)}
.gallery-tabs{display:flex;gap:7px;padding:10px 14px 4px;justify-content:center}.gallery-tabs button{border:1px solid #193a2c1c;background:#ffffff80;border-radius:7px;padding:9px 10px;font-size:12px;flex:1;min-height:40px;white-space:nowrap}.gallery-tabs button[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:white}
.gallery-disclaimer{font-size:11px;text-align:center;line-height:1.5;color:var(--muted);padding:9px 14px 15px}
.back-bottle{height:100%;aspect-ratio:2/3;position:relative;container-type:inline-size}.back-bottle>img{width:100%;height:100%;object-fit:contain;display:block}
.back-label{position:absolute;inset:34% 20% 18%;display:flex;flex-direction:column;align-items:stretch;gap:1.8cqw;text-align:left;font-family:Arial,sans-serif;font-size:3.3cqw;line-height:1.22;color:#193a2c;overflow:hidden}
.back-label .back-brand{font-family:Georgia,serif;font-size:5cqw;letter-spacing:.09em;text-align:center}.back-name{text-transform:uppercase;text-align:center;font-size:4.3cqw}.back-label hr{height:1px;border:0;background:#193a2c55;width:100%;margin:.4cqw 0}.back-label b{font-size:3.4cqw}.back-label .back-draft{font-size:2.8cqw;letter-spacing:.03em;margin-top:auto}
.read-label{position:absolute;bottom:2%;left:50%;transform:translateX(-50%);white-space:nowrap;padding:8px 14px;min-height:36px;border-radius:20px;background:var(--ink);color:white;font-size:12px}
.botanical-photo{margin:0;width:100%;height:100%;position:relative;background:#1b2d20}.botanical-photo>img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 55%}
.botanical-photo figcaption{position:absolute;inset:auto 0 0;background:linear-gradient(transparent,#11241eea 35%);padding:48px 20px 18px;color:#fff}.botanical-photo em{font-family:Georgia,serif;font-size:24px}.botanical-photo p{font-size:13px;line-height:1.5;margin:6px 0 9px}.botanical-photo small{font-size:11px;line-height:1.5;display:block;color:#e0e8df}.botanical-photo a{text-decoration:underline;text-underline-offset:2px}
.sleep-ingredient{align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:30px;background:linear-gradient(145deg,#222e46,#4b4965);color:#f9faf5;width:100%}.ingredient-kicker{font-size:11px;letter-spacing:.12em;margin-bottom:28px}.sleep-ingredient>strong{font-size:clamp(24px,2.8vw,36px);font-weight:400;line-height:1.15;letter-spacing:-.035em}.sleep-ingredient em{font-family:Georgia,serif;font-weight:400;color:#d9e6bd}.sleep-ingredient p{font-size:14px;line-height:1.6;margin:20px 0}.sleep-ingredient a{font-size:12px;text-decoration:underline;text-underline-offset:3px}
.product-sections{display:grid;gap:10px}.product-dialog .product-section{border:1px solid var(--section-border,#d7e0d0);border-radius:11px;overflow:hidden;background:var(--section-bg,#eff3e9);scroll-margin-top:78px}
.product-section.section-research{--section-bg:#edf3e2;--section-border:#d5e0c5;--section-ink:#37532b}.product-section.section-usage{--section-bg:#f3efdf;--section-border:#e4dcc0;--section-ink:#6e602b}.product-section.section-safety{--section-bg:#f8e9e1;--section-border:#ead0c1;--section-ink:#834c36}.product-section.section-medical{--section-bg:#e8f0f5;--section-border:#cadde8;--section-ink:#315e77}.product-section.section-sources{--section-bg:#edeaf4;--section-border:#d9d1e8;--section-ink:#63527e}.product-section.section-reviews{--section-bg:#f4f0db;--section-border:#e3dbad;--section-ink:#706327}
.product-dialog .product-section>summary{padding:18px 15px;display:grid;grid-template-columns:31px minmax(0,1fr) 24px;gap:12px;color:var(--section-ink);min-height:86px;transition:filter .2s}
.product-section>summary:hover{filter:brightness(.9)}.section-icon{width:31px;display:grid;place-items:center}.section-icon svg{width:25px;height:25px}.section-heading-text{display:flex;flex-direction:column;gap:5px}.section-heading-text strong{font-size:16px;font-weight:650;line-height:1.35;letter-spacing:-.015em}.section-heading-text small{font-size:12px;line-height:1.5;opacity:.85;font-weight:400}.section-plus{width:24px;text-align:center;font-size:24px!important;font-weight:400}
.product-section[open]>.section-body{border-top:1px solid var(--section-border);background:#ffffffbc}.product-section[open]>.section-body{animation:softIn .25s ease-out}.product-dialog .section-body{padding:20px 19px;color:var(--ink);font-size:15px;line-height:1.75;overflow-wrap:anywhere}
.section-body p{margin:0 0 16px}.section-body p:last-child{margin-bottom:0}.section-body h4{font-size:15px;margin:18px 0 8px;line-height:1.5}.section-body ul{padding-left:19px;margin:0 0 18px}.section-body li{margin:8px 0}.section-body .section-notice{padding:12px 14px;border-left:3px solid var(--section-ink);font-size:13px;line-height:1.6;background:var(--section-bg)}
.detail-text-group:first-child h4{margin-top:0}.detail-sources{list-style:none;padding:12px 0 0!important;margin:20px 0 0!important;border-top:1px solid var(--line);font-size:13px;line-height:1.6}.detail-sources a{text-decoration:underline;text-underline-offset:3px}.detail-sources a:hover{color:#528037}.detail-sources li{margin:9px 0}
.formula-facts{margin:0 0 19px}.formula-facts>div{padding:11px 0;border-bottom:1px solid var(--line)}.formula-facts dt{font-size:12px;font-weight:650;text-transform:uppercase;letter-spacing:.05em}.formula-facts dd{font-size:14px;line-height:1.6;margin:5px 0 0;color:var(--muted)}
.reference-scope{font-size:13px;color:var(--muted);line-height:1.6}.medical-reference{padding:18px 0;border-top:1px solid var(--line)}.medical-reference:last-child{padding-bottom:0}.medical-reference .reference-institution{font-size:12px;letter-spacing:.04em;font-weight:700;margin:0 0 12px;color:var(--section-ink)}.medical-reference blockquote{font-family:Georgia,serif;font-size:22px;line-height:1.4;margin:0 0 12px}.medical-reference>p:not(.reference-institution){font-size:14px}.medical-reference>a{font-size:13px;text-decoration:underline;text-underline-offset:3px}
.detail-review-cards{display:grid;gap:12px}.detail-review-cards .external-review-card{padding:18px;background:#fff;border-radius:8px}.detail-review-cards .external-review-card h3{font-size:18px;letter-spacing:-.025em}.detail-review-cards .external-rating{margin:12px 0;padding:12px 0}.detail-review-cards .rating-value{font-size:27px}.detail-review-cards .rating-caption{font-size:12px}.section-body .review-date{font-size:12px;margin:16px 0 0;color:var(--muted);line-height:1.6}.product-dialog .detail-copy>.detail-updated{font-size:12px;color:var(--muted);margin:20px 0 0}
@media(max-width:800px){.product-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:14px}.product-dialog .detail-layout{grid-template-columns:minmax(0,1fr);padding:16px;gap:24px}.product-gallery{position:relative;top:auto;width:100%;max-width:500px;margin:auto}.gallery-stage{height:390px}.gallery-front{width:280px;max-width:83%;}.product-dialog .detail-copy{padding:0 2px 12px}.product-dialog .detail-copy h2{font-size:clamp(28px,6vw,38px)}.product-modal-header{padding:10px 16px}.sleep-ingredient>strong{font-size:33px}}
@media(max-width:440px){.product-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:12px}.product-dialog .detail-layout{padding:12px;gap:23px}.gallery-stage{height:340px}.gallery-front{width:245px;max-width:86%}.gallery-topline{padding:10px 13px;font-size:10px;min-height:46px}.gallery-controls{gap:8px;padding:6px 12px}.gallery-tabs{padding:8px 10px 0;gap:5px}.gallery-tabs button{font-size:11px;padding:8px 5px}.gallery-disclaimer{font-size:10px}.product-dialog .product-section>summary{grid-template-columns:27px minmax(0,1fr) 22px;gap:10px;padding:17px 12px}.section-heading-text strong{font-size:15px}.section-heading-text small{font-size:12px}.product-dialog .section-body{padding:18px 15px}.sleep-ingredient{padding:25px}.sleep-ingredient>strong{font-size:30px}.botanical-photo figcaption{padding:42px 14px 14px}}
@media(max-width:350px){.gallery-stage{height:300px}.gallery-front{width:215px}.product-dialog .detail-copy h2{font-size:27px}.gallery-tabs button{font-size:10px}.product-dialog .detail-copy>.eyebrow{font-size:11px}}
@media(prefers-reduced-motion:reduce){.gallery-front,.bottle-shadow,.section-body{animation:none!important}.product-dialog{scroll-behavior:auto}}

.product-section[open]>summary>span{transform:none}.product-section[open]>summary>.section-plus{transform:rotate(45deg)}
@media(min-width:801px){.gallery-stage{height:clamp(260px,calc(100dvh - 365px),450px);container-type:size}.gallery-front{width:min(75%,68cqh)}}
.gallery-stage{container-type:size}.sleep-ingredient{height:100%;min-height:0;padding:clamp(16px,6cqh,28px)}.sleep-ingredient .ingredient-kicker{font-size:10px;margin-bottom:clamp(10px,4cqh,20px)}.sleep-ingredient>strong{font-size:clamp(22px,8.5cqh,36px)}.sleep-ingredient p{font-size:clamp(12px,3.6cqh,14px);margin:3cqh 0}.sleep-ingredient a{font-size:11px}
