.product-image-open { display:block; width:100%; border:0; padding:0; background:none; text-align:left; cursor:zoom-in; color:var(--espresso); font:inherit; }
.product-image-open span { display:block; padding:14px 0 8px; font-size:14px; text-decoration:underline; text-underline-offset:4px; }
.product-layers-open { justify-self:start; border:1px solid var(--line); border-radius:30px; padding:12px 18px; margin-top:8px; background:var(--paper); color:var(--espresso); font:inherit; font-size:14px; cursor:pointer; }
.product-visual > img { transition:transform .75s cubic-bezier(.2,.7,.2,1),filter .5s; transform-origin:50% 50%; }
.product-visual.is-previewing > img { transform:scale(1.035); filter:brightness(.96); }
.card-layer-preview { position:absolute; inset:0; opacity:0; transition:opacity .3s ease; pointer-events:none; }
.cover-photo-highlight { position:absolute; inset:0; width:100%; height:100%; transform:scale(1); transform-origin:50% 50%; transition:transform .75s cubic-bezier(.2,.7,.2,1); }
.is-previewing .cover-photo-highlight { transform:scale(1.035); }
.cover-photo-fragment { opacity:0; filter:brightness(1.16); }
.is-previewing .is-showing-layer .cover-photo-fragment { animation:coverLayerReveal 1.9s ease both; }
@keyframes coverLayerReveal {
  0% { opacity:0; transform:translateY(0); }
  30%,80% { opacity:1; transform:translateY(-.6px); }
  100% { opacity:0; transform:translateY(-.6px); }
}
.cover-step-caption { position:absolute; left:12px; right:12px; bottom:12px; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:5px 10px; padding:12px 14px 10px; color:#392f25; background:#fffaf0f5; border:1px solid #d7c6ad; border-radius:12px; box-shadow:0 5px 20px #44332214; text-align:left; }
.cover-step-number { font-size:11px; color:#a24c36; white-space:nowrap; }
.cover-step-name { font-size:13px; font-weight:650; line-height:1.3; }
.cover-progress { grid-column:1 / -1; display:flex; gap:4px; margin-top:5px; }
.cover-progress span { height:2px; flex:1; background:#d8ccbb; transition:background .3s; }
.cover-progress span.is-active { background:#bd5b40; }
.product-visual.is-previewing .card-layer-preview { opacity:1; }
.material-slice { transition:transform .8s cubic-bezier(.2,.75,.2,1),filter .3s; }
.is-expanded .material-slice { transform:translateY(var(--spread)); }
.is-expanded .material-slice.is-selected { transform:translateY(var(--lifted)); filter:brightness(1.06); }
.material-slice.is-selected .slice-outline,.material-slice:focus-visible .slice-outline { stroke:#b74e36; stroke-width:2.5px; stroke-opacity:1; }
.image-layer-stage .material-slice { cursor:pointer; outline:none; }
.image-dialog { width:min(1180px,calc(100% - 40px)); height:min(900px,calc(100dvh - 40px)); max-height:calc(100dvh - 40px); overflow:hidden; border-radius:22px; }
.image-dialog[open] { display:flex; }
.image-viewer-shell { display:flex; flex-direction:column; width:100%; min-width:0; min-height:0; }
.image-viewer-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 24px 14px; border-bottom:1px solid var(--line); flex-shrink:0; }
.image-viewer-header .eyebrow { font-size:10px; margin:0 0 5px; }
.image-viewer-header h2 { font-size:30px; line-height:1.1; margin:0; }
.image-viewer-close { display:flex; align-items:center; gap:12px; flex-shrink:0; min-height:44px; padding:8px 16px; border:1px solid #ad492f; border-radius:30px; color:#fff; background:var(--terracotta); font:inherit; cursor:pointer; }
.image-viewer-close span { font-size:25px; line-height:1; }
.image-viewer-toolbar { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; padding:12px 24px; flex-shrink:0; }
.image-viewer-toolbar button { min-height:42px; padding:10px 17px; font:inherit; font-size:13px; border:1px solid var(--line); border-radius:30px; background:transparent; color:var(--espresso); cursor:pointer; }
.image-viewer-modes { display:flex; gap:6px; }
.image-viewer-modes button[aria-pressed="true"] { background:var(--espresso); color:var(--paper); border-color:var(--espresso); }
.image-viewer-content { flex:1; min-height:0; background:#eae3d4; overflow:auto; overscroll-behavior:contain; }
#image-photo-panel { height:100%; overflow:auto; padding:12px; text-align:center; overscroll-behavior:contain; }
#image-full-photo { display:block; height:100%; max-width:100%; width:auto; object-fit:contain; margin:auto; }
#image-photo-panel.is-zoomed #image-full-photo { height:auto; width:auto; max-width:none; max-height:none; margin:0 auto; }
#image-layers-panel { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr); min-height:100%; }
.image-layer-stage { display:grid; place-items:center; align-self:start; min-width:0; background:radial-gradient(ellipse at 50% 28%,#fffdf3,#e7decc); }
.image-layer-stage svg { width:100%; max-height:590px; }
.image-layer-info { padding:24px; background:#f9f5ea; }
.image-layer-info .eyebrow { margin:0 0 10px; font-size:10px; }
.image-layer-info h3 { font-size:24px; line-height:1.2; margin:0 0 8px; }
#image-layer-description { min-height:48px; color:#71614f; font-size:14px; line-height:1.5; }
#image-layer-buttons { display:grid; gap:5px; }
#image-layer-buttons button { display:flex; align-items:center; gap:10px; min-height:38px; padding:8px 11px; border:1px solid #e0d6c4; border-radius:9px; background:transparent; text-align:left; font:inherit; font-size:13px; color:var(--espresso); cursor:pointer; }
#image-layer-buttons button span { font-size:10px; color:#9a7960; }
#image-layer-buttons button[aria-pressed="true"] { border-color:var(--terracotta); background:#f6e1d3; }
.image-scheme-note { margin:14px 0 0; font-size:12px; color:#7c6f5d; line-height:1.5; }
.image-viewer-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 24px; border-top:1px solid var(--line); flex-shrink:0; }
.image-viewer-footer span { font-size:11px; color:#7c6f5d; }
.image-viewer-footer button { padding:10px 0; border:0; background:none; color:var(--espresso); font:inherit; font-size:13px; cursor:pointer; }
.image-dialog [hidden] { display:none!important; }
@media(max-width:700px) {
  .image-dialog { width:calc(100% - 16px); height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); border-radius:16px; }
  .image-viewer-header { padding:12px; gap:8px; }
  .image-viewer-header h2 { font-size:23px; }
  .image-viewer-header .eyebrow { font-size:8px; }
  .image-viewer-close { padding:8px 12px; gap:6px; font-size:12px; }
  .image-viewer-toolbar { padding:8px 12px; gap:6px; }
  .image-viewer-toolbar button { padding:8px 10px; font-size:12px; }
  #image-layers-panel { grid-template-columns:1fr; }
  .image-layer-stage svg { height:clamp(260px,75vw,390px); }
  .image-layer-info { padding:16px; }
  #image-layer-description { min-height:0; }
  #image-layer-buttons { grid-template-columns:1fr 1fr; }
  #image-layer-buttons button { font-size:11px; padding:8px; gap:6px; }
  .image-viewer-footer { padding:6px 12px; }
  .image-viewer-footer span { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  .material-slice,.card-layer-preview,.product-visual > img,.cover-photo-highlight,.cover-photo-fragment { transition:none; }
}
