/* Stall catalogue: built for a phone held in daylight. High contrast, big tap targets. */
:root {
  --ink: #14211e;
  --ink-soft: #4d5b57;
  --paper: #f7f4ee;
  --card: #ffffff;
  --line: #ddd8cc;
  --brand: #16302b;
  --accent: #e2572b;
  --accent-ink: #ffffff;
  --radius: 14px;
  --gutter: 16px;
  --tap: 48px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { max-width: 720px; margin: 0 auto; padding: var(--gutter); }

a { color: inherit; }

[hidden] { display: none !important; }

.site-header {
  background: var(--brand);
  color: #fff;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-header__home { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.site-header__logo { width: 32px; height: 32px; flex: none; border-radius: 8px; }
.site-header__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.site-header__tag { font-size: 0.8rem; opacity: 0.8; white-space: nowrap; }

.flash { margin: 0; padding: 12px var(--gutter); background: #fde9c8; color: #5a3b00; font-weight: 600; }
.empty-note { padding: 32px 0; text-align: center; color: var(--ink-soft); }

/* Catalogue grid: two cards per row on a phone */
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.product-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.product-card__picture { aspect-ratio: 1; background: #ece8df; }
.product-card__picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card__name { padding: 10px 12px 0; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; flex: 1; }
.product-card__price { padding: 4px 12px 12px; color: var(--ink-soft); font-size: 0.9rem; }
.product-card__price strong { color: var(--ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* Product page */
.back-link { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; font-weight: 600; color: var(--ink-soft); }

.product__stage { position: relative; aspect-ratio: 1; background: #ece8df; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.product__picture, .product__viewer { position: absolute; inset: 0; }
.product__picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product__viewer { touch-action: none; background: radial-gradient(circle at 50% 35%, #f4f1ea, #b4ad9f); }
.product__viewer canvas { width: 100%; height: 100%; display: block; }
.product__stage-controls { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.product__viewer-hint { position: absolute; right: 12px; top: 10px; margin: 0; font-size: 0.8rem; color: var(--ink-soft); background: rgba(255, 255, 255, 0.8); padding: 2px 8px; border-radius: 999px; pointer-events: none; }

.chip { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.chip:disabled { opacity: 0.7; }

.product__name { font-size: 1.6rem; line-height: 1.15; margin: 16px 0 4px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.product__credit { margin: 0; color: var(--ink-soft); font-size: 0.85rem; }
.product__description { margin: 12px 0 0; }
.product__facts { margin: 16px 0 0; display: flex; gap: 6px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.choice { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.choice legend { padding: 0; font-weight: 700; margin-bottom: 8px; }
.choice__current { font-weight: 400; color: var(--ink-soft); }
.choice__options { display: flex; flex-wrap: wrap; gap: 8px; }

.option input, .swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option__label { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 600; }
.option input:checked + .option__label { border-color: var(--brand); background: var(--brand); color: #fff; }
.option input:focus-visible + .option__label, .swatch input:focus-visible + .swatch__dot { outline: 3px solid var(--accent); outline-offset: 2px; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 12px 6px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.swatch__dot { display: block; width: var(--tap); height: var(--tap); border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 3px var(--card); }
.swatch input:checked + .swatch__dot { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--card), 0 0 0 3px var(--ink); }
.swatch--transparent .swatch__dot { background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0 35%, rgba(255, 255, 255, 0) 36% 64%, rgba(255, 255, 255, 0.7) 65%); }
.swatch--metallic .swatch__dot { background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.25)); }
.swatch--out .swatch__dot { opacity: 0.3; background-image: linear-gradient(45deg, transparent 46%, var(--ink) 47% 53%, transparent 54%); }
.swatch__name { font-size: 0.75rem; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.swatch input:checked ~ .swatch__name { font-weight: 800; }
.swatch--out .swatch__name { color: var(--ink-soft); }
.swatch__note { font-size: 0.65rem; line-height: 1.1; color: var(--ink-soft); }

.product__buy { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 12px; }
.product__price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.quantity { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.quantity input { width: 72px; min-height: var(--tap); font: inherit; font-weight: 700; text-align: center; border: 2px solid var(--line); border-radius: 10px; background: var(--card); }

.button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; border: 0; border-radius: var(--radius); font: inherit; font-size: 1.15rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.button--primary { background: var(--accent); color: var(--accent-ink); }
.button--quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); min-height: var(--tap); font-size: 1rem; }

/* Order step and confirmation */
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; }
.summary__title { font-weight: 800; font-size: 1.1rem; margin: 0 0 4px; }
.summary__line { margin: 0; color: var(--ink-soft); }
.summary__total { margin: 10px 0 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.field { display: block; margin: 0 0 16px; }
.field__label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; border: 2px solid var(--line); border-radius: 10px; background: var(--card); }
.field textarea { min-height: 88px; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.errors { background: #fde3dc; color: #7a1c08; border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; font-weight: 600; }
.errors ul { margin: 0; padding-left: 18px; }

.saved-details { background: var(--card); border: 2px solid var(--brand); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.saved-details__text { margin: 0 0 10px; white-space: pre-line; }

.confirmation { text-align: center; padding-top: 24px; }
.confirmation__number { font-size: 2.4rem; font-weight: 800; margin: 4px 0 16px; }

/* Catalogue filter */
.filter { display: block; margin: 0 0 14px; }
.filter__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.filter input { width: 100%; min-height: var(--tap); padding: 10px 14px; font: inherit; border: 2px solid var(--line); border-radius: 999px; background: var(--card); -webkit-appearance: none; appearance: none; }
.filter input:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
