/* ============================================================
   Le Stampe di Lorì — app.css
   Mobile-first, fluid type, intrinsic grids (see skills/).
   Palette: cozy cream + sage (primary) + clay accents, elegant serif heads.
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf5ee;
  --bg-deep: #f3ece0;
  --surface: #fffdf8;
  --surface-2: #f7f1e6;
  --ink: #33291f;
  --ink-soft: #5c5044;
  --muted: #857361;
  --accent: #657a56;
  --accent-dark: #4f6142;
  --accent-soft: #e5ead9;
  --sage: #8a9b7e;
  --sage-soft: #e3e8dc;
  --clay: #c0674c;
  --clay-soft: #f3ddd4;
  --line: #e9dfd1;
  --line-strong: #d9ccba;
  --danger: #a85c5c;
  --ok: #6f8460;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(51, 41, 31, 0.05), 0 2px 8px rgba(51, 41, 31, 0.05);
  --shadow-md: 0 2px 6px rgba(51, 41, 31, 0.07), 0 12px 28px rgba(51, 41, 31, 0.08);
  --shadow-lg: 0 8px 24px rgba(51, 41, 31, 0.12), 0 24px 60px rgba(51, 41, 31, 0.14);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --wrap: 72rem;
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.4vw + 0.87rem, 1.05rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.7rem, 3.2vw + 0.8rem, 2.9rem); font-weight: 600; }
h2 { font-size: clamp(1.35rem, 2vw + 0.7rem, 2rem); }
h3 { font-size: clamp(1.05rem, 1vw + 0.7rem, 1.3rem); }

p { margin: 0 0 1em; }

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3.5vw, 2.5rem);
}

.page { padding-block: clamp(1.5rem, 4vw, 3rem); }
.page--narrow { max-width: 46rem; }
.page-title { margin-bottom: 0.2em; }
.page-sub { color: var(--muted); margin-bottom: 1.6rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.prose p { margin-bottom: 0.9em; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw + 0.6rem, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-name em {
  font-style: italic;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.2rem, 1.5vw, 0.9rem);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.lang-switch {
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-strong);
  padding: 0.3rem 0.65rem;
}

.cart-link { position: relative; }
.badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}
.badge--hidden, .badge:empty { display: none; }

@media (max-width: 639px) {
  .nav-link:not(.cart-link):not(.lang-switch) { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--sage-soft) 0%, transparent 55%),
    radial-gradient(50rem 26rem at -10% 110%, var(--clay-soft) 0%, transparent 60%),
    var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3.2rem, 10vw, 7rem);
  max-width: 46rem;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(2.1rem, 5.2vw + 0.8rem, 3.8rem);
  font-weight: 600;
  margin-bottom: 0.35em;
}

.hero-sub {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1vw + 0.8rem, 1.2rem);
  max-width: 36rem;
  margin-bottom: 1.8rem;
}

.hero-deco {
  position: absolute;
  right: -6rem;
  bottom: -8rem;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  border: 2px dashed var(--line-strong);
  opacity: 0.5;
  pointer-events: none;
}
@media (max-width: 900px) { .hero-deco { display: none; } }

/* ---------- why ---------- */

.why { padding-block: clamp(2rem, 5vw, 3.5rem); }

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 720px) {
  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

.why-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.why-card h3 { margin: 0.7rem 0 0.3rem; font-size: 1.1rem; }
.why-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem; height: 3rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.why-card:nth-child(2) .why-icon { background: var(--clay-soft); color: var(--clay); }
.why-card:nth-child(3) .why-icon { background: var(--sage-soft); color: var(--sage); }

/* ---------- showcase & filters ---------- */

.showcase { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}
@media (min-width: 760px) {
  .section-head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

.chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.18s ease;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip--active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.chip--active:hover { color: #fff; }

/* ---------- product grid & cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: clamp(0.9rem, 2vw, 1.5rem);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-media img { transform: scale(1.03); }

.card-noimg {
  width: 100%;
  height: 100%;
  min-height: 8rem;
  background:
    radial-gradient(12rem 8rem at 70% 30%, var(--sage-soft), transparent 70%),
    radial-gradient(12rem 8rem at 25% 75%, var(--clay-soft), transparent 70%),
    var(--surface-2);
}
.card-noimg--tall { min-height: 18rem; aspect-ratio: 4/5; }
.card-noimg--small { width: 96px; height: 96px; border-radius: var(--radius-sm); }

.pill-unavailable {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}
.pill-unavailable--inline {
  position: static;
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0.5rem 1rem;
}

.card--unavailable .card-media img { filter: saturate(0.55) opacity(0.85); }

.card-body { padding: 0.95rem 1.1rem 1.15rem; }
.card-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.card-price {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 650;
  font-size: 1rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}
.empty-state--box {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

/* ---------- product detail (page & modal) ---------- */

.crumbs {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.crumbs a { color: var(--muted); text-decoration-color: var(--line-strong); }
.crumbs [aria-current] { color: var(--ink); }

.pdetail {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
@media (min-width: 900px) {
  .pdetail { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
}

.pdetail-media { position: relative; }

.gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (max-width: 899px) {
  .gallery-main img { aspect-ratio: 1 / 1; }
}

.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.thumb {
  width: 4.5rem; height: 4.5rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  min-height: 44px; min-width: 44px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover, .thumb--active { border-color: var(--accent); }

.pdetail-cat {
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 650;
}
.pdetail-cat a { color: inherit; }

.pdetail-title { margin-bottom: 0.3em; }

.pdetail-price {
  font-size: 1.45rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent-dark);
  margin: 0 0 1.4rem;
}
.pdetail-vat {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  display: block;
}

.option-group {
  border: 0;
  padding: 0;
  margin: 0 0 1.2rem;
}
.option-group legend {
  font-weight: 650;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 0.55rem;
}

.swatches { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.swatch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.35rem 0.9rem 0.35rem 0.45rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-dot {
  width: 1.55rem; height: 1.55rem;
  border-radius: 50%;
  background: var(--sw, #ccc);
  box-shadow: inset 0 0 0 1px rgba(51, 41, 31, 0.18);
  flex: none;
}
.swatch:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.swatch:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.swatch--off { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }

.sizes { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.size-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 3.4rem;
  padding: 0.35rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.size-pill input { position: absolute; opacity: 0; pointer-events: none; }
.size-pill:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.size-pill:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.size-pill--off { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }

.buy-row {
  display: flex;
  gap: 0.8rem;
  align-items: stretch;
  flex-wrap: wrap;
  margin: 1.4rem 0;
}

.qty-field {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.qty-btn {
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.qty-btn:hover { background: var(--surface-2); color: var(--accent-dark); }
.qty-field input {
  width: 3rem;
  height: 44px;
  border: 0;
  text-align: center;
  font-size: 1rem;
  background: transparent;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-field input::-webkit-outer-spin-button,
.qty-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-btn { flex: 1; min-width: 12rem; gap: 0.55rem; }

.pdetail-desc {
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-bottom: 1rem;
}

.pdetail-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin: 0;
}
.pdetail-note svg { flex: none; color: var(--sage); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  gap: 0.4rem;
}
.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-dark); }

.btn--quiet { background: transparent; color: var(--muted); }
.btn--quiet:hover { background: var(--surface-2); color: var(--ink); }

.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: #fff; }

.btn--lg { padding: 0.85rem 1.8rem; font-size: 1.04rem; }
.btn--sm { min-height: 36px; padding: 0.3rem 0.9rem; font-size: 0.85rem; }
.btn--block { width: 100%; }
.btn--disabled, .btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.link-quiet {
  display: inline-block;
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 44px;
  line-height: 44px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--accent-dark); border-color: var(--accent); }
.icon-btn--danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

/* ---------- boxes, forms, alerts ---------- */

.box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.box-title {
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow-sm);
}
.fieldset legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0 0.5rem;
}

.field { display: block; margin-bottom: 1rem; }
.field > span:first-child {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="search"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea,
input[type="text"], input[type="email"], input[type="tel"],
input[type="search"], input[type="number"], input[type="password"],
select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.15s ease;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 0.9rem;
}
@media (min-width: 620px) {
  .field-row { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
}
.field--grow { grid-column: span 2; }
/* Phone row: narrow fixed dial-code select + flexible national number. */
@media (min-width: 620px) {
  .field-row--phone { grid-template-columns: minmax(8rem, 10.5rem) 1fr; }
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.alert {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.3rem;
  font-size: 0.96rem;
  border: 1px solid transparent;
}
.alert p { margin: 0.3rem 0 0; }
.alert--error { background: #f7e7e5; border-color: #e2bfbb; color: #7c3f3a; }
.alert--warn { background: #f8eeda; border-color: #e5d3ae; color: #7a6031; }
.alert--ok { background: var(--sage-soft); border-color: #ccd6c2; color: #4c5c42; }
.alert--info { background: var(--accent-soft); border-color: #e3c7ba; color: var(--accent-dark); }
.alert--small { font-size: 0.85rem; padding: 0.7rem 1rem; }

/* ---------- cart ---------- */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
@media (min-width: 960px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr) 21rem; align-items: start; }
}

.cart-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  grid-template-areas:
    "img info remove"
    "img qty total";
  gap: 0.3rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  align-items: center;
}
@media (min-width: 700px) {
  .cart-line {
    grid-template-columns: 6rem minmax(0, 1fr) 8rem 7rem 2.5rem;
    grid-template-areas: "img info qty total remove";
  }
}
.cart-line--off { opacity: 0.6; }
.cart-line-img { grid-area: img; border-radius: var(--radius-sm); overflow: hidden; display: block; }
.cart-line-img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.cart-line-info { grid-area: info; min-width: 0; }
.cart-line-name { margin: 0; font-weight: 650; }
.cart-line-name a { color: var(--ink); text-decoration: none; }
.cart-line-name a:hover { color: var(--accent-dark); }
.cart-line-opts { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.88rem; }
.cart-line-unit { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.88rem; }
.cart-line-qty { grid-area: qty; justify-self: start; }
.cart-line-qty input { width: 4.5rem; text-align: center; }
.cart-line-total { grid-area: total; font-weight: 700; justify-self: end; white-space: nowrap; }
.cart-line > .icon-btn { grid-area: remove; justify-self: end; }

.cart-summary {
  display: grid;
  gap: 0.75rem;
  position: static;
}
@media (min-width: 960px) {
  .cart-summary { position: sticky; top: 5rem; }
}

.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.98rem;
}
.sum-row--muted { color: var(--muted); font-size: 0.88rem; }
.sum-row--total {
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  font-size: 1.15rem;
}
.sum-row--total strong { font-family: var(--font-display); color: var(--accent-dark); }

/* ---------- checkout ---------- */

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
@media (min-width: 980px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr) 23rem; align-items: start; }
  .checkout-col:last-child { position: sticky; top: 5rem; }
}

.ship-methods, .pay-methods { display: grid; gap: 0.7rem; margin-bottom: 0.4rem; }

.ship-option, .pay-option {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 44px;
}
.ship-option:hover, .pay-option:hover { border-color: var(--accent); }
.ship-option:has(input:checked), .pay-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ship-option input, .pay-option input { margin-top: 0.25rem; accent-color: var(--accent); width: 1.15rem; height: 1.15rem; flex: none; }
.ship-option-body strong, .pay-option-body strong { display: block; font-size: 0.98rem; }
.ship-option-body small, .pay-option-body small { color: var(--muted); font-size: 0.84rem; line-height: 1.45; display: block; }
.ship-option--off, .pay-option:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

.point-picker { margin: 0.6rem 0 0.4rem; }

.hint-muted { color: var(--muted); opacity: 0.85; }

.point-map-row {
  display: grid;
  gap: 0.5rem;
  margin: 0.6rem 0;
  align-items: start;
}
.point-map {
  width: 100%;
  height: 24rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  z-index: 0; /* keep the map below the results dropdown */
}
.point-results { z-index: 1000; }

.point-search { position: relative; }
.point-search-row { display: flex; gap: 0.5rem; }
.point-search-row input { flex: 1; min-width: 0; }
.point-search-row .btn { white-space: nowrap; }
.point-results {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  max-height: 18rem;
  overflow-y: auto;
}
.point-results li button {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  font-size: 0.92rem;
  min-height: 44px;
}
.point-results li button:hover { border-color: var(--accent); }
.point-results li.point-group {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.15rem 0.2rem 0;
}
.point-results li button.point-addr {
  border-style: dashed;
  color: var(--ink-soft);
}
.point-results li.point-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.4rem 0.2rem;
}

.point-selected {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--sage-soft);
  border: 1px solid #ccd6c2;
  color: #4c5c42;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin: 0.7rem 0 0;
  font-size: 0.93rem;
}
.point-selected[hidden] { display: none; }

.bank-info {
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.93rem;
  margin-top: 0.7rem;
}
.bank-info p { margin: 0.25rem 0; }
.iban {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.terms-field {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 1.2rem 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.terms-field input { margin-top: 0.25rem; accent-color: var(--accent); width: 1.15rem; height: 1.15rem; flex: none; }

.summary-box { position: relative; }
.summary-title {
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.summary-lines {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.93rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.5rem;
}
.summary-name { min-width: 0; }
.summary-name small { display: block; color: var(--muted); }
.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.9rem 0 0;
}
#paypal-button-container { margin-top: 0.8rem; }
#paypal-button-container[hidden] { display: none; }

/* ---------- order tracking ---------- */

.order-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.order-placed { color: var(--muted); font-size: 0.9rem; margin: 0; }

.status-pill {
  display: inline-block;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}
.status-pill--small { padding: 0.15rem 0.6rem; font-size: 0.75rem; }
.status-pill--awaiting_payment { background: #f8eeda; border-color: #e5d3ae; color: #7a6031; }
.status-pill--paid, .status-pill--processing { background: var(--accent-soft); border-color: #e3c7ba; color: var(--accent-dark); }
.status-pill--shipped { background: #e4ecf1; border-color: #c4d3dd; color: #3f5a6b; }
.status-pill--delivered { background: var(--sage-soft); border-color: #ccd6c2; color: #4c5c42; }
.status-pill--cancelled { background: #eee9e2; border-color: var(--line-strong); color: var(--muted); }
.status-pill--refunded { background: #f7e7e5; border-color: #e2bfbb; color: #7c3f3a; }

.bank-box { margin-bottom: 1.4rem; }
.bank-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0.9rem 0;
  font-size: 0.97rem;
}
.bank-details dt { color: var(--muted); }
.bank-details dd { margin: 0; }
.bank-deadline { color: var(--accent-dark); font-weight: 600; }

.timeline {
  list-style: none;
  display: flex;
  margin: 0 0 1.6rem;
  padding: 0;
  counter-reset: step;
}
.timeline-step {
  flex: 1;
  position: relative;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 1.7rem;
}
.timeline-step::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line-strong);
}
.timeline-step:first-child::before { display: none; }
.timeline-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
}
.timeline-step--done { color: var(--ink-soft); }
.timeline-step--done::before { background: var(--sage); }
.timeline-step--done .timeline-dot { background: var(--sage); border-color: var(--sage); }
.timeline-step--now { color: var(--accent-dark); font-weight: 700; }
.timeline-step--now .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
@media (max-width: 620px) {
  .timeline { flex-direction: column; gap: 0.2rem; }
  .timeline-step { text-align: left; padding: 0.25rem 0 0.25rem 1.9rem; }
  .timeline-step::before { left: 0.43rem; top: -50%; height: 100%; width: 2px; }
  .timeline-step:first-child::before { display: none; }
  .timeline-dot { left: 0; top: 0.35rem; transform: none; }
}

.order-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
@media (min-width: 900px) {
  .order-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
}
.order-side { display: grid; gap: 1.2rem; }

.order-items { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; gap: 0.85rem; }
.order-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
}
.order-item-img { border-radius: var(--radius-sm); object-fit: cover; }
.order-item-name { margin: 0; font-weight: 650; }
.order-item-name a { color: var(--ink); }
.order-item-opts { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.87rem; }
.order-item-price { font-weight: 700; white-space: nowrap; }

.order-dest, .order-customer { font-size: 0.95rem; margin: 0 0 0.7rem; }
.order-notes { color: var(--muted); font-size: 0.9rem; }
.tracking-no { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.05em; font-weight: 700; }

.lookup-form { max-width: 30rem; display: grid; gap: 0.3rem; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(51, 41, 31, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fade-in 0.22s ease;
}
@media (min-width: 760px) {
  .modal-backdrop { align-items: center; padding: 2.5rem 1.25rem; }
}

.modal {
  position: relative;
  background: var(--bg);
  width: 100%;
  max-width: 62rem;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overscroll-behavior: contain;
}
@media (min-width: 760px) {
  .modal { border-radius: var(--radius-lg); }
}

.modal-body { padding: clamp(1.1rem, 3vw, 2rem); }

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.modal-close:hover { color: var(--accent-dark); border-color: var(--accent); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up {
  from { transform: translateY(2.2rem); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- toast ---------- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 150;
  display: grid;
  gap: 0.5rem;
  width: min(26rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.25s ease, toast-out 0.4s ease 3s forwards;
}
.toast--error { background: var(--danger); color: #fff; }

@keyframes toast-in {
  from { transform: translateY(1rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes toast-out {
  to { transform: translateY(0.6rem); opacity: 0; visibility: hidden; }
}

/* ---------- legal ---------- */

.legal-body h2 {
  font-size: 1.15rem;
  margin: 1.7rem 0 0.5rem;
}
.legal-body ul, .legal-body ol { padding-left: 1.3rem; }
.legal-body li { margin-bottom: 0.45rem; }
.legal-quote {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.8rem 0;
}
.cookie-table th, .cookie-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
}
.cookie-table code { background: var(--surface-2); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* ---------- error ---------- */

.error-page { text-align: center; padding-block: 4rem; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--accent-soft);
  margin: 0;
  line-height: 1;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(2rem, 5vw, 3.2rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  padding-bottom: 2rem;
}
@media (min-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
}
.footer-logo em { color: var(--accent); font-style: italic; }
.footer-tagline { color: var(--muted); font-size: 0.92rem; margin: 0; }

.footer-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.65rem;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.footer-col a {
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  padding: 0.28rem 0;
  min-height: 32px;
}
.footer-col a:hover { color: var(--accent-dark); text-decoration: underline; }
.footer-contacts li { color: var(--muted); font-size: 0.93rem; padding: 0.15rem 0; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
}
.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
