/* shop layer: product grid, product sheet, bag. motion: ease-out in, no bounce. */
:root { --ease: cubic-bezier(.2, .7, .2, 1) }
[hidden] { display: none !important }
#grid { grid-template-columns: repeat(4, 1fr) }
@media (max-width: 1100px) { #grid { grid-template-columns: repeat(3, 1fr) } }
.prod .ph img { background: #fff }
@media (max-width: 960px) { #grid { grid-template-columns: repeat(2, 1fr) } }
.soon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; opacity: .92 }
@media (max-width: 960px) { .soon { grid-template-columns: repeat(2, 1fr) } }
button.prod { all: unset; display: grid; gap: 12px; cursor: pointer; min-width: 0 }
button.prod:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px }
button.prod:active .ph { transform: scale(.97) }
.ph { transition: transform .16s var(--ease) }
.preview { position: absolute; inset: 0; display: grid; place-items: center; transition: background .3s var(--ease) }
.preview img { width: 62% !important; height: auto !important; object-fit: contain !important }
.preview.cap img { width: 34% !important }
.preview.emb img { width: 44% !important }
.swatches-mini { display: flex; gap: 5px }
.swatches-mini i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--line) }
.hide-sm { }
@media (max-width: 520px) { .hide-sm { display: none } }
.bagbtn { all: unset; cursor: pointer; font-size: 14px; color: var(--fg); padding: 8px 2px }
.bagbtn span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; background: var(--fg); color: var(--bg); border-radius: 10px; font-size: 11.5px; font-weight: 500 }
.bagbtn:focus-visible { outline: 2px solid var(--accent) }

/* overlays */
.scrim { position: fixed; inset: 0; background: rgba(20, 20, 18, .42); z-index: 20; opacity: 0; transition: opacity .24s var(--ease) }
.scrim.on { opacity: 1 }
.sheet, .bag { position: fixed; z-index: 21; background: var(--bg); color: var(--fg); overflow-y: auto; overscroll-behavior: contain; transition: transform .3s var(--ease), opacity .3s var(--ease) }
.sheet { left: 50%; top: 50%; width: min(940px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); transform: translate(-50%, -48%) scale(.98); opacity: 0; display: grid; grid-template-columns: 1.05fr 1fr }
.sheet.on { transform: translate(-50%, -50%); opacity: 1 }
.bag { right: 0; top: 0; bottom: 0; width: min(420px, 100vw); transform: translateX(100%); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px) }
.bag.on { transform: none }
@media (max-width: 720px) {
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 92dvh; grid-template-columns: 1fr; transform: translateY(100%); opacity: 1; border-radius: 14px 14px 0 0 }
  .sheet.on { transform: none }
}
.sheet .pic { position: relative; aspect-ratio: 1/1; background: var(--panel) }
.sheet .pic > img { width: 100%; height: 100%; object-fit: cover; display: block }
.sheet .info { padding: 28px 28px max(28px, env(safe-area-inset-bottom, 0px)); display: grid; align-content: start; gap: 18px }
.sheet h2 { font-size: 30px; line-height: 1.1 }
.sheet .price { font-size: 17px }
.sheet .blurb { color: var(--muted); font-size: 15px }
.x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg); color: var(--fg); font-size: 20px; cursor: pointer; display: grid; place-items: center }
.opt { display: grid; gap: 10px }
.opt .label b { color: var(--fg); font-weight: 500; letter-spacing: .08em }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip { min-width: 48px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: 500 14px var(--body); cursor: pointer; transition: border-color .15s, transform .12s var(--ease) }
.chip:active { transform: scale(.97) }
.chip[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg) }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through }
.dot { width: 44px; height: 44px; border-radius: 50%; padding: 0; min-width: 0; border: 1px solid var(--line); position: relative }
.dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg) }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--card); width: max-content }
.qty button { width: 44px; height: 44px; border: 0; background: none; color: var(--fg); font-size: 18px; cursor: pointer }
.qty output { min-width: 28px; text-align: center; font-size: 15px }
.btn.full { width: 100% }
.btn:active { transform: scale(.97) }
.fine { font-size: 12.5px; color: var(--muted) }
.err { color: #a3402c; font-size: 13.5px; min-height: 1.2em }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #e59a85 } }

.bag header { position: static; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); background: none; backdrop-filter: none }
.bag header h2 { font-size: 24px }
.bag .x { position: static; background: var(--panel) }
.bag .lines { flex: 1; overflow-y: auto; padding: 6px 22px }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start }
.line .thumb { position: relative; aspect-ratio: 1/1; background: var(--panel) }
.line .thumb .preview img { width: 70% !important }
.line h3 { font: 500 14.5px/1.35 var(--body) }
.line p { font-size: 13px; color: var(--muted) }
.line .rm { all: unset; cursor: pointer; font-size: 12.5px; color: var(--muted); text-decoration: underline; margin-top: 6px; display: inline-block }
.line .amt { font-size: 14.5px }
.bag .foot2 { padding: 18px 22px max(22px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 10px }
.sum { display: flex; justify-content: space-between; font-size: 15px }
.sum.total { font-size: 17px; font-weight: 500 }
.empty { padding: 40px 0; color: var(--muted); text-align: center }

.paid { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; width: min(520px, calc(100vw - 32px)); background: var(--fg); color: var(--bg); padding: 18px 20px; display: grid; gap: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .2) }
.paid b { font-family: var(--display); font-weight: 400; font-size: 22px }
.paid button { all: unset; cursor: pointer; position: absolute; top: 10px; right: 14px; font-size: 18px }
body.locked { overflow: hidden }
@media (prefers-reduced-motion: reduce) { .sheet, .bag, .scrim, .ph { transition: none } }

.origin .oq { display: block; margin-top: 16px; font-family: var(--display); font-style: italic; font-size: 19px; quotes: none }
#remi .slide figcaption { font-size: 22px }
