/* SLEEP gallery: one fixed display area, with accessible image-selection tiles. */
.commerce-hero .sleep-gallery{display:grid;grid-template-columns:76px minmax(0,1fr);gap:16px;align-items:center;min-width:0;width:100%;order:0}
.gallery-thumbnails{display:flex;flex-direction:column;gap:12px;align-items:stretch}
.gallery-thumb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;width:76px;min-height:94px;padding:8px 5px 7px;border:2px solid #d4badb24;border-radius:15px;background:#ffffff05;color:#ddcce3;cursor:pointer;transition:background .2s,border-color .2s}
.gallery-thumb:hover{background:#ffffff0d;border-color:#e1c9e46b}
.gallery-thumb[aria-selected="true"]{border-color:#e0b6d5;background:#dcc2e319;color:#fff4fa}
.gallery-thumb:focus-visible{outline:2px solid #f4c3df;outline-offset:4px}
.gallery-thumb:disabled{cursor:default;opacity:.5}
.gallery-thumb>span:last-child{font-size:8px;line-height:1.4;letter-spacing:.015em}
.gallery-thumb-visual{display:flex;justify-content:center;align-items:center;position:relative;width:60px;height:61px;overflow:hidden;border-radius:8px;flex:none}
.gallery-thumb-visual>img{display:block;max-width:100%;width:100%;height:100%;object-fit:contain}
.gallery-thumb-bottle{position:relative;display:block;width:35px;aspect-ratio:921/1708;transform:translateY(-2px) rotate(7deg)}
.gallery-thumb-bottle>img{display:block;width:100%;height:100%}
:is(.gallery-thumb--ingredients,.gallery-thumb--comparison) .gallery-thumb-visual>img{object-fit:cover;border-radius:8px}
.gallery-display{min-width:0;width:100%}
.commerce-hero .sleep-gallery .sleep-stage{width:100%;height:660px;margin:0}
.commerce-hero .sleep-gallery .sleep-bottle{width:min(78%,307.36px);height:auto;aspect-ratio:921/1708}
.commerce-hero .sleep-gallery .label-view{left:auto;right:0;bottom:76px;transform:none}
.gallery-panel:not([hidden]){animation:gallery-reveal .26s ease-out}
.gallery-number{position:absolute;top:14px;right:0;font-size:8px;letter-spacing:.16em;color:#d6c2de8c;line-height:1.5;z-index:2}
.gallery-packaging-image{display:block;width:100%;height:auto;max-height:90%;object-fit:contain;filter:drop-shadow(12px 17px 22px #100b3038);transform:translateY(-8px)}
.commerce-hero .gallery-panel--packaging figcaption{bottom:19px;right:0;font-size:8px;letter-spacing:.16em}
:is(.gallery-ingredients-image,.gallery-comparison-image){display:block;width:100%;height:auto;max-height:calc(100% - 80px);object-fit:contain;border-radius:20px;box-shadow:0 15px 50px #17102926;border:1px solid #dcc3e12b}
.commerce-hero :is(.gallery-panel--ingredients,.gallery-panel--comparison) figcaption{bottom:25px;left:0;right:0;justify-content:center;font-size:9px;letter-spacing:.03em}
:is(.gallery-panel--ingredients,.gallery-panel--comparison) figcaption a{padding:10px 12px;text-decoration:underline;text-underline-offset:4px}
@keyframes gallery-reveal{from{opacity:.1}to{opacity:1}}
@media(min-width:1700px){.commerce-hero .sleep-gallery{grid-template-columns:82px minmax(0,1fr);gap:22px}.gallery-thumb{width:82px;min-height:100px}.commerce-hero .sleep-gallery .sleep-stage{height:690px}.commerce-hero .sleep-gallery .sleep-bottle{width:min(78%,334.32px)}}
@media(max-width:1050px) and (min-width:701px){.commerce-hero .sleep-gallery{grid-template-columns:60px minmax(0,1fr);gap:12px}.gallery-thumb{width:60px;min-height:82px;padding-inline:3px;border-radius:12px;gap:5px}.gallery-thumb-visual{width:48px;height:50px}.gallery-thumb-bottle{width:29px}.gallery-thumb>span:last-child{font-size:7px}.commerce-hero .sleep-gallery .sleep-stage{height:570px}.commerce-hero .sleep-gallery .sleep-bottle{width:min(78%,253.45px)}.gallery-number{font-size:7px}:is(.gallery-ingredients-image,.gallery-comparison-image){border-radius:15px}.commerce-hero :is(.gallery-panel--ingredients,.gallery-panel--comparison) figcaption{font-size:8px}}
@media(max-width:700px){.commerce-hero .sleep-gallery{grid-template-columns:minmax(0,1fr);gap:16px;display:grid;margin-bottom:12px}.gallery-display{grid-row:1}.gallery-thumbnails{grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:min(100%,344px);margin-inline:auto;justify-content:center}.gallery-thumb{width:100%;min-width:0;min-height:86px;gap:5px;border-radius:14px}.gallery-thumb-visual{height:53px;width:min(60px,100%)}.gallery-thumb-bottle{width:31px}.commerce-hero .sleep-gallery .sleep-stage{height:370px}.commerce-hero .sleep-gallery .sleep-bottle{width:min(58%,184.43px)}.gallery-packaging-image{width:100%;height:auto;max-height:94%;transform:none}.gallery-number{top:6px;right:0}:is(.gallery-ingredients-image,.gallery-comparison-image){width:min(100%,340px);max-height:calc(100% - 35px);border-radius:17px}.commerce-hero :is(.gallery-panel--ingredients,.gallery-panel--comparison) figcaption{bottom:-4px;font-size:8px}.commerce-hero .gallery-panel--packaging figcaption{bottom:0;font-size:7px}.commerce-hero .sleep-gallery .label-view{bottom:57px}}
@media(prefers-reduced-motion:reduce){.gallery-panel:not([hidden]){animation:none}.gallery-thumb{transition:none}}

/* Keep the supplied package intact and render its explanations as readable text. */
.packaging-readable-layout{display:grid;position:relative;grid-template-columns:minmax(90px,.95fr) minmax(0,1.05fr);align-items:center;gap:26px;width:100%;height:90%;min-height:0}
.packaging-readable-layout>.gallery-packaging-image{width:100%;height:auto;max-height:100%;transform:none}
.packaging-info{display:flex;flex-direction:column;gap:12px;max-height:100%;overflow:auto;padding:3px;scrollbar-width:thin;scrollbar-color:#ba9ac5 transparent}
.packaging-info-card{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:start;gap:9px;padding:15px 12px;border:1px solid #c9add55c;border-radius:15px;background:#30263ee8;box-shadow:0 8px 24px #170f291f;color:#f5ebf8}
.packaging-info-card>svg{width:28px;height:28px;color:#d1b5db}
.packaging-info-card h3{font:500 15px/1.3 "Avenir Next",Avenir,sans-serif;margin:0 0 7px;letter-spacing:-.02em}
.packaging-info-card p{font-size:13px;line-height:1.65;margin:0;color:#e5d7ec}
.packaging-info-card h3:last-child{margin:0}
.packaging-connectors{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:1;color:#d9afd0}
.packaging-readable-layout{grid-template-rows:minmax(0,1fr)}
.packaging-readable-layout>.gallery-packaging-image{min-height:0}
.packaging-connectors path{fill:none;stroke:currentColor;stroke-width:1.2;opacity:.9}
.packaging-connectors circle{fill:#3b2b47;stroke:currentColor;stroke-width:1.2}
.packaging-info-card{position:relative;z-index:2}
.gallery-zoom-dialog .packaging-connectors{z-index:1}
@media(max-width:700px){.gallery-zoom-dialog .packaging-connectors{display:none}}
.gallery-expand{position:absolute;right:0;bottom:14px;z-index:3;width:42px;height:42px;display:grid;place-items:center;border:1px solid #e8c9e45c;border-radius:50%;color:#f4dff3;background:#30263ed9;cursor:zoom-in;backdrop-filter:blur(8px)}
.gallery-expand svg{width:20px;height:20px}
.gallery-expand:focus-visible{outline:2px solid #e0b6d5;outline-offset:4px}
.gallery-panel[data-zoom-ready]{cursor:pointer}
.gallery-panel[data-zoom-ready] :is(button,a){cursor:pointer}
.gallery-zoom-scene .gallery-expand{display:none}
.gallery-zoom-dialog{width:min(1120px,calc(100% - 24px));max-width:none;padding:18px;border:1px solid #dbc5e254;border-radius:22px;background:#282139;color:#f4e9f7;max-height:94dvh;overflow:hidden}
.gallery-zoom-dialog[open]{display:block}
.gallery-zoom-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 0 14px}
.gallery-zoom-heading h2{font-size:20px;font-weight:400;line-height:1.3;margin:0}
.gallery-zoom-controls{display:flex;gap:8px;align-items:center;flex:none}
.gallery-zoom-controls button{min-width:42px;height:42px;border:1px solid #d7b7df55;border-radius:50%;background:#ffffff08;color:#f5eafa;font-size:20px}
.gallery-zoom-controls button:disabled{opacity:.35}
.gallery-zoom-viewport{overflow:auto;max-height:calc(94dvh - 100px);overscroll-behavior:contain;border-radius:14px;scrollbar-color:#b399c1 #282139;scrollbar-width:thin}
.gallery-zoom-canvas{position:relative;margin:auto}
.gallery-zoom-dialog .gallery-zoom-scene{position:absolute!important;left:0;top:0;margin:0!important;transform-origin:0 0;animation:none!important}
.gallery-zoom-dialog .packaging-info{overflow:visible;max-height:none}
.gallery-zoom-dialog .packaging-info-card p{font-size:16px}
.gallery-zoom-dialog .packaging-info-card h3{font-size:18px}
@media(max-width:700px){.gallery-zoom-dialog .gallery-panel--packaging{align-items:flex-start}.gallery-zoom-dialog .packaging-readable-layout{display:flex!important;flex-direction:column;align-items:stretch!important;height:auto!important;gap:18px!important;padding-top:8px}.gallery-zoom-dialog .packaging-readable-layout>.gallery-packaging-image{width:90px;height:auto;max-height:none;margin:0 auto}.gallery-zoom-dialog .packaging-info{width:100%;padding:0;overflow:visible}.gallery-zoom-dialog .packaging-info-card{grid-template-columns:28px minmax(0,1fr);padding:15px 12px;gap:9px}}
@media(max-width:700px){.packaging-readable-layout{grid-template-columns:108px minmax(0,1fr);height:calc(100% - 40px);gap:22px;align-items:start}.packaging-readable-layout>.gallery-packaging-image{align-self:center}.packaging-info{gap:10px;padding-right:8px}.packaging-info-card{grid-template-columns:22px minmax(0,1fr);padding:12px 10px;gap:7px;border-radius:12px}.packaging-info-card>svg{width:22px;height:22px}.packaging-info-card h3{font-size:14px}.packaging-info-card p{font-size:12px;line-height:1.6}.gallery-expand{bottom:0;width:38px;height:38px}.gallery-zoom-dialog{padding:12px}.gallery-zoom-heading h2{font-size:16px}.gallery-zoom-controls{gap:5px}.gallery-zoom-controls button{min-width:38px;height:38px}.gallery-zoom-heading{gap:8px}.gallery-zoom-dialog .packaging-readable-layout{grid-template-columns:minmax(90px,.95fr) minmax(0,1.05fr);height:90%;gap:26px;align-items:center}}
