/* Pilot gallery occupies the existing stage; controls remain outside the swipe area. */
.chair-render-gallery{position:absolute;inset:0;pointer-events:none;opacity:1;transition:opacity .35s ease}
.chair-render-gallery__track{position:absolute;inset:0;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y;pointer-events:auto}
.chair-render-gallery__track::-webkit-scrollbar{display:none}
.chair-render-gallery figure{position:relative;flex:0 0 100%;height:100%;margin:0;scroll-snap-align:start;overflow:hidden}
.chair-render-gallery img{position:absolute;max-width:none;width:var(--film-width,100%);height:auto;aspect-ratio:720/1292;left:50%;top:50%;transform:translate(-50%,-50%);user-select:none;pointer-events:none;mask-image:linear-gradient(transparent,#000 6%,#000 92%,transparent)}
.chair-film[data-layout=landscape] .chair-render-gallery img{aspect-ratio:16/9}
.chair-render-gallery__dissolve{z-index:1}
.chair-render-gallery>button{position:absolute;z-index:2;top:50%;width:44px;height:44px;border-radius:50%;background:#f4f2e83d;border:1px solid #ffffff60;backdrop-filter:blur(12px);display:grid;place-items:center;color:#20271d}
.chair-render-gallery>button:disabled{opacity:.25;pointer-events:none}
.chair-render-gallery>button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chair-render-gallery__prev{left:12px}.chair-render-gallery__next{right:12px}
.chair-film[data-layout=landscape] .chair-render-gallery__next{right:40%}
.chair-render-gallery__status{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.chair-film[data-gallery-pilot=true] .chair-explore__final{visibility:hidden}
.chair-film[data-gallery-pilot=true] .chair-explore__heading,.chair-film[data-gallery-pilot=true] .chair-detail-nav,.chair-film[data-gallery-pilot=true] .chair-explore__mode,.chair-film[data-gallery-pilot=true] .chair-detail-card{z-index:4}
.chair-film[data-gallery-pilot=true][data-live=true] .chair-render-gallery{opacity:0;visibility:hidden;pointer-events:none}
.chair-film[data-gallery-pilot=true][data-live=true] .chair-render-gallery__track{pointer-events:none}

.chair-film[data-gallery-pilot=true] .chair-explore__model{z-index:2}
.chair-film[data-gallery-pilot=true] .chair-explore__camera{z-index:5}
@media(prefers-reduced-motion:reduce){.chair-render-gallery{transition:none}}
/* Gallery controls retain their endpoint positions across every view. */
@media(orientation:landscape) and (max-height:650px){
 .chair-film[data-gallery-pilot=true][data-layout=landscape][data-detail-focus]:not([data-live=true]) .chair-explore__mode{display:flex}
 .chair-film[data-gallery-pilot=true][data-layout=landscape][data-exploring=true][data-detail-focus]:not([data-live=true]) .chair-story__purchase:not([data-configuring=true]){top:calc(18% + 151px)}
 .chair-film[data-gallery-pilot=true][data-layout=landscape][data-detail-focus]:not([data-live=true]) .chair-detail-card{top:calc(18% + 214px)}
}
.chair-render-gallery figure[data-gallery-view=welt] img,
.chair-film[data-gallery-view=welt] .chair-render-gallery__dissolve{mask-image:none;-webkit-mask-image:none}
/* Protect the endpoint silhouette in tablet landscape without exposing image bars. */
@media(orientation:landscape) and (max-aspect-ratio:8/5){
 .chair-film{--chair-cover-shift:clamp(0px,calc((100dvh * 16 / 9 - 100vw) * .22),90px)}
 .chair-film .chair-film__video,.chair-film .chair-film__poster,.chair-film .chair-explore__final,
 .chair-film .chair-render-gallery img{left:calc(50% + var(--chair-cover-shift))}
 .chair-film .chair-render-gallery figure[data-gallery-view=welt] img,
 .chair-film[data-gallery-view=welt] .chair-render-gallery__dissolve{left:50%}
 .chair-film[data-layout=landscape]:not([data-workspace=true]) .chair-explore__model{left:calc(50% + var(--chair-cover-shift))}
 .chair-film[data-layout=landscape] .chair-story__purchase{gap:6px;padding:5px;width:max-content;max-width:35%}
 .chair-film[data-layout=landscape] .chair-story__add{padding:0 12px;font-size:11px;min-height:42px}
 .chair-film[data-layout=landscape] .chair-finish-open{padding:0 5px;gap:6px}
}
@media(orientation:landscape) and (max-aspect-ratio:8/5){
 .chair-film[data-layout=landscape][data-exploring=true] .chair-story__purchase:not([data-configuring=true]){flex-wrap:nowrap;gap:6px;padding:5px 7px}
 .chair-film[data-layout=landscape][data-exploring=true] .chair-story__purchase:not([data-configuring=true]) .chair-story__add{padding:0 10px;font-size:11px;gap:7px}
 .chair-film[data-layout=landscape][data-exploring=true] .chair-story__purchase .chair-finish-chip{width:28px;height:28px;flex:0 0 28px}
 .chair-film[data-layout=landscape][data-exploring=true] .chair-story__purchase .chair-finish-label{font-size:11px}
 .chair-film[data-layout=landscape][data-exploring=true] .chair-story__purchase .chair-finish-label small{font-size:9px}
}
.chair-film[data-gallery-pilot=true][data-layout=portrait][data-finish=terracotta] .chair-story__purchase{background:#efede5b3}
.chair-film[data-gallery-pilot=true][data-layout=portrait][data-finish=terracotta] .chair-detail-card{background:#e4e3dcbf}
/* Supplied images share a quiet white stage. Only opacity changes between views. */
.chair-film[data-gallery-source=supplier] .chair-render-gallery{background:var(--chair-gallery-paper,#fefefe)}
/* The fitted 3D canvas can be narrower than a detail photo; fade the whole photo away. */
.chair-film[data-final-media][data-gallery-source=supplier] .chair-render-gallery .chair-render-gallery__track{opacity:1;transition:opacity .65s ease}
.chair-film[data-final-media][data-gallery-source=supplier][data-live=true] .chair-render-gallery .chair-render-gallery__track{opacity:0}
@media(prefers-reduced-motion:reduce){.chair-film[data-final-media][data-gallery-source=supplier] .chair-render-gallery .chair-render-gallery__track{transition:none}}
/* Keep the decoded outgoing image under the incoming photo until it is opaque. */
.chair-film[data-gallery-source=supplier][data-exploring=true][data-video-ready=true] .chair-film__video{visibility:visible}
/* A static/failure path has no decoded outgoing film to dissolve over. */
.chair-film[data-gallery-source=supplier]:has(.is-still) .chair-explore{transition:none}
.chair-film[data-gallery-source=supplier] .chair-render-gallery__track{inset:170px 14px 205px;display:block;overflow:clip;touch-action:pan-y pinch-zoom;overscroll-behavior:auto}
.chair-film[data-gallery-source=supplier] .chair-render-gallery img{inset:0;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;transform:none;mask-image:none;-webkit-mask-image:none}
.chair-film[data-gallery-source=supplier] .chair-render-gallery__caption{position:absolute;left:20px;right:20px;bottom:182px;margin:0;text-align:center;font-size:12px;color:#555d50}
/* Keep the photograph unframed; indicate gallery keyboard focus at its view label. */
.chair-film[data-gallery-source=supplier][data-connected=true] .chair-render-gallery__track:focus-visible{outline:none}
.chair-film[data-gallery-source=supplier][data-connected=true]:has(.chair-render-gallery__track:focus-visible) .chair-render-gallery__caption{outline:2px solid #526342;outline-offset:5px;border-radius:3px}
.chair-film[data-gallery-source=supplier] .chair-render-gallery>button{background:#ffffffb8;border-color:#293e252b;box-shadow:0 2px 10px #00000008}
.chair-film[data-gallery-source=supplier] .chair-render-gallery>button:disabled{opacity:.2}
.chair-film[data-gallery-source=supplier] .chair-detail-nav button{color:#242822}
.chair-film[data-gallery-source=supplier] .chair-detail-nav{border-color:#24282226}
.chair-film[data-gallery-source=supplier][data-exploring=true]:not([data-live=true]) .chair-story__purchase{background:#f6f6f0d9;border-color:#293e252b}
.chair-film[data-gallery-source=supplier] .chair-explore__mode{border-color:#293e252b}
.chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery__track{inset:70px 40% 65px 3%}
.chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery__caption{left:3%;right:40%;bottom:40px}
.chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery>button{top:calc(50% - 22px)}
.chair-film[data-gallery-source=supplier] .chair-render-gallery>button.chair-render-gallery__prev{left:var(--chair-gallery-arrow-left,12px);top:var(--chair-gallery-arrow-top,calc(50% - 22px))}
.chair-film[data-gallery-source=supplier] .chair-render-gallery>button.chair-render-gallery__next{right:var(--chair-gallery-arrow-right,12px);top:var(--chair-gallery-arrow-top,calc(50% - 22px))}
@media(orientation:portrait) and (max-height:700px){
 .chair-film[data-gallery-source=supplier] .chair-render-gallery__track{top:156px;bottom:185px}
 .chair-film[data-gallery-source=supplier] .chair-render-gallery__caption{bottom:163px}
}
@media(orientation:landscape) and (max-height:500px){
 .chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery__track{top:55px;bottom:40px}
 .chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery__caption{bottom:20px}
}

/* A native, unboxed photo strip. Overflow reaches the viewport edges on phones. */
.product-photo-strip { display:flex;justify-content:safe center;gap:8px;padding:6px 0 8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;pointer-events:auto; }
/* End gutters protect the selection outline; the scrolling strip stays full-width. */
@media(max-width:700px) {
  .product-photo-strip { padding-inline:16px;scroll-padding-inline:16px; }
}
.product-photo-strip::-webkit-scrollbar { display:none; }
.product-photo-strip[hidden],.product-photo-strip button[hidden] { display:none; }
.product-photo-strip button { display:flex;flex-direction:column;align-items:stretch;flex:0 0 6.5em;min-height:84px;padding:5px;border:1px solid transparent;border-radius:10px;background:none;color:#555d50;font-size:12px;line-height:1.3; }
.product-photo-strip button>span:not(.product-photo-thumbnail) { min-height:2.6em; }
.product-photo-thumbnail { position:relative;display:block;flex:none;height:52px;margin-bottom:5px;overflow:clip;border-radius:5px; }
.product-photo-thumbnail img { display:block;width:100%;height:100%;object-fit:contain; }
.product-photo-strip button[aria-pressed=true] { border-color:#526342;background:#f0f2ee;color:#242822;box-shadow:inset 0 0 0 1px #526342; }
.product-photo-strip button:focus-visible { outline:2px solid #526342;outline-offset:-4px; }
.chair-film[data-gallery-source=supplier] .chair-gallery-views { position:absolute;z-index:3;left:0;right:0;bottom:calc(var(--product-dock-space,94px) + env(safe-area-inset-bottom)); }
.chair-film[data-gallery-source=supplier] .chair-gallery-views img { position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;aspect-ratio:auto;object-fit:contain;transform:none;mask:none;-webkit-mask:none;border-radius:0; }
.chair-film[data-live=true] .chair-gallery-views { visibility:hidden; }
.chair-film[data-gallery-source=supplier] .chair-detail-nav { display:none; }
.chair-film[data-gallery-source=supplier][data-connected=true] .chair-explore__mode>.chair-render-gallery__caption:not([data-reference=true]) { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
/* Details use the space released by the duplicate text-only detail navigation. */
.chair-film[data-gallery-source=supplier][data-layout=portrait]:not([data-live=true]) .chair-detail-card { top:132px;bottom:auto; }
@media(orientation:portrait) and (max-height:700px) {
  .chair-film[data-gallery-source=supplier] .chair-render-gallery__track { top:224px; }
}
@media(orientation:landscape) {
  .chair-film[data-gallery-source=supplier] .chair-gallery-views { right:max(40%,calc(var(--chair-gallery-dock-width,362px) + 24px + env(safe-area-inset-right)));bottom:8px; }
  .chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery__track { bottom:calc(20px + var(--chair-gallery-controls-height,112px)); }
}
/* Changing a caption must never push the action sideways. */
.chair-film[data-gallery-source=supplier][data-connected=true] .chair-explore__mode { justify-content:flex-end; }
.chair-film[data-gallery-source=supplier][data-connected=true] .chair-explore__mode>.chair-render-gallery__caption,
.chair-film[data-gallery-source=supplier][data-connected=true] .chair-explore__mode>[data-explore-hint] { margin-right:auto;text-align:left; }
@media(min-width:1100px) and (min-height:651px) and (orientation:landscape) {
  /* The approved first-photo proportions define the frame, never the selected image. */
  .chair-film[data-gallery-source=supplier] { --chair-gallery-frame-width:min(57%,calc((100dvh - 150px - var(--chair-gallery-controls-height,110px)) * 86 / 81)); }
  .chair-film[data-gallery-source=supplier] .chair-gallery-views { left:3%;right:40%;bottom:64px;padding:4px 2px 8px;scrollbar-width:thin; }
  .chair-gallery-views button { font-size:11px; }
  .chair-gallery-views button:focus-visible { outline-offset:2px; }
  .chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery__track { bottom:calc(80px + var(--chair-gallery-controls-height,110px)); }
  .chair-film[data-gallery-source=supplier][data-layout=landscape] .chair-render-gallery .chair-render-gallery__track { left:31.5%;right:auto;width:var(--chair-gallery-frame-width);transform:translateX(-50%); }
  .chair-film[data-gallery-source=supplier][data-connected=true][data-layout=landscape] .chair-explore__mode { inset:auto calc(68.5% - var(--chair-gallery-frame-width) / 2 + 32px) calc(88px + var(--chair-gallery-controls-height,110px)) calc(31.5% - var(--chair-gallery-frame-width) / 2 + 8px);gap:4px 14px;pointer-events:none; }
  .chair-film[data-gallery-source=supplier][data-connected=true] .chair-explore__mode>[data-explore-toggle] { pointer-events:auto; }
  .chair-film[data-gallery-source=supplier][data-connected=true] .chair-detail-card>.chair-render-gallery__caption { position:static;inset:auto;grid-column:1 / -1;grid-row:3;margin:0;font-size:11px;line-height:1.4;text-align:left; }
}
