@charset "utf-8";
/* Merch shop: product cards on the price-board look (ink border, hard shadow), a product dialog
   with photos, colours and sizes, and a basket panel. Colours come from site.css. */

.shop-note { border: 2px solid var(--edge); border-radius: var(--r); background: var(--today-bg); padding: 16px 20px; margin-bottom: 28px; display: grid; gap: 6px; }
.shop-note h3 { font-size: 1.4rem; }
.shop-note p { margin: 0; }
.shop-note.is-error { background: var(--paper); border-color: var(--ember); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: clamp(18px, 3vw, 32px); }
.shop-fallback, .shop-empty { grid-column: 1 / -1; color: var(--muted); max-width: 40em; }

.product-card { display: grid; gap: 12px; align-content: start; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.product-card .pc-photo { display: block; aspect-ratio: 1; border: 2px solid var(--edge); border-radius: var(--r); background: #fff; overflow: hidden; box-shadow: 4px 4px 0 var(--edge); transition: transform .12s ease, box-shadow .12s ease; }
.product-card .pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card:hover .pc-photo { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--edge); }
.product-card:focus-visible { outline: none; }
.product-card:focus-visible .pc-photo { outline: 3px solid var(--focus); outline-offset: 3px; }
.pc-name { font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.1; }
.pc-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); font-size: .95rem; }
.pc-price { font-weight: 700; color: var(--fg); }
.pc-dots { display: flex; gap: 4px; }
.pc-dots span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); }

.shop-facts { list-style: none; padding: 0; margin: clamp(40px, 6vw, 64px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 28px; border-top: 2px dashed var(--line-strong); padding-top: 24px; color: var(--muted); }
.shop-facts strong { color: var(--fg); }

/* Dialogs */
.shop-dialog { border: 2px solid var(--edge); border-radius: var(--r); padding: 0; background: var(--paper); color: var(--fg); box-shadow: 8px 8px 0 var(--edge); max-height: calc(100dvh - 32px); overflow: auto; }
.shop-dialog::backdrop { background: rgba(23, 21, 17, .55); }
.dialog-close { font: 600 1.8rem/1 var(--body); width: 44px; height: 44px; border: 2px solid var(--edge); border-radius: 50%; background: var(--paper); color: var(--fg); cursor: pointer; flex: none; }
.dialog-close:hover { background: var(--lemon); color: var(--ink); }

.product-dialog { width: min(960px, calc(100vw - 32px)); }
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.pd-gallery { background: #fff; border-right: 2px solid var(--edge); padding: 16px; display: grid; gap: 12px; align-content: start; }
.pd-main { aspect-ratio: 1; width: 100%; object-fit: contain; display: block; }
.pd-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pd-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid #E6E1D1; border-radius: 6px; background: #fff; cursor: pointer; overflow: hidden; }
.pd-thumbs button[aria-current="true"] { border-color: #171511; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-info { padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; align-content: start; }
.pd-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.pd-top h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); }
.pd-price { font-family: var(--display); font-weight: 700; font-size: 1.6rem; margin: 0; }
.pd-group { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.pd-group legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.pd-group legend span { font-weight: 400; color: var(--muted); }
.pd-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-choice { position: relative; }
.pd-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pd-choice span { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; min-height: 44px; padding: 6px 12px; border: 2px solid var(--line-strong); border-radius: 8px; font-weight: 600; background: var(--paper); }
.pd-choice input:checked + span { border-color: var(--edge); background: var(--lemon); color: var(--ink); box-shadow: 2px 2px 0 var(--edge); }
.pd-choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.pd-choice input:disabled + span { opacity: .4; text-decoration: line-through; }
.pd-choice i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #171511; flex: none; }
.pd-buy { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--edge); border-radius: 8px; overflow: hidden; }
.qty button { width: 40px; height: 44px; border: 0; background: var(--surface); color: var(--fg); font: 700 1.2rem var(--body); cursor: pointer; }
.qty button:disabled { opacity: .35; cursor: default; }
.qty output { min-width: 36px; text-align: center; font-weight: 700; }
.pd-msg { margin: 0; color: var(--muted); }
.pd-msg.is-error { color: var(--ember); font-weight: 600; }
.pd-desc { color: var(--muted); white-space: pre-line; margin: 0; font-size: .97rem; }
.pd-small { font-size: .9rem; color: var(--muted); margin: 0; }

.basket-dialog { width: min(480px, calc(100vw - 32px)); }
.bk { padding: clamp(18px, 3vw, 26px); display: grid; gap: 18px; }
.bk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bk-head h2 { font-size: 1.9rem; }
.bk-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bk-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bk-line img { width: 64px; height: 64px; object-fit: cover; border: 2px solid var(--edge); border-radius: 6px; background: #fff; }
.bk-line p { margin: 0; }
.bk-line .bk-name { font-weight: 700; }
.bk-line .bk-variant { color: var(--muted); font-size: .92rem; }
.bk-line .qty button { width: 34px; height: 36px; }
.bk-right { display: grid; gap: 6px; justify-items: end; }
.bk-remove { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .88rem; padding: 0; }
.bk-totals { border-top: 2px dashed var(--line-strong); padding-top: 12px; display: grid; gap: 6px; }
.bk-totals div { display: flex; justify-content: space-between; }
.bk-totals .bk-total { font-weight: 700; font-size: 1.2rem; border-top: 2px solid var(--edge); padding-top: 8px; margin-top: 4px; }
.bk-pay { width: 100%; justify-content: center; }
.bk-empty { color: var(--muted); margin: 0; }

.basket-btn { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; box-shadow: 4px 4px 0 var(--lemon), 4px 4px 0 2px var(--ink); }
.basket-count { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; margin-left: .4em; border-radius: 999px; background: var(--lemon); color: var(--ink); font-size: .85em; padding: 0 .35em; }

@media (max-width: 720px) {
  .pd { grid-template-columns: 1fr; }
  .pd-gallery { border-right: 0; border-bottom: 2px solid var(--edge); }
  .pd-main { max-height: 52vh; }
  .shop-dialog { max-height: calc(100dvh - 16px); }
  .product-dialog, .basket-dialog { width: calc(100vw - 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .product-card .pc-photo { transition: none; }
}
