/* =========================================================================
   mycart — "Fresh Market" design system
   A boutique-grocery identity: evergreen + squash-amber, sage paper, and a
   monospace "price-tag" signature that runs across cards, summaries & receipts.
   ========================================================================= */

:root {
  /* Palette */
  --brand: #13503f; /* evergreen */
  --brand-600: #0e3e31;
  --brand-100: #dce9e2;
  --accent: #f4a62a; /* squash amber — CTAs */
  --accent-600: #dd8f16;
  --berry: #c8385a; /* sale */
  --ink: #14231e; /* near-black evergreen */
  --muted: #5e6e66;
  --line: #d8dfd5;
  --paper: #eef1ea; /* sage-tinted background */
  --surface: #ffffff;
  --surface-2: #f7f9f4;
  --gold-star: #e0a92e;
  --ok: #2f8f5b;

  /* Typography */
  --font-display: "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, "Menlo", monospace;

  /* Type scale */
  --step--1: 0.82rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.75rem;
  --step-5: clamp(2.6rem, 6vw, 4.25rem);

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;

  /* Radii, shadows, layout */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 35, 30, 0.06), 0 2px 6px rgba(20, 35, 30, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 35, 30, 0.1);
  --shadow-lg: 0 18px 48px rgba(20, 35, 30, 0.16);
  --maxw: 1180px;
  --header-h: 66px;
}

/* ---- Reset ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
ul {
  list-style: none;
  padding: 0;
}

/* ---- Accessibility helpers -------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Layout primitives ------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
main {
  min-height: 60vh;
  padding-block: var(--sp-7) var(--sp-8);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}
.boot {
  display: grid;
  place-items: center;
  min-height: 70vh;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.7em 1.35em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn--accent {
  --btn-bg: var(--accent);
  --btn-fg: #3a2a06;
}
.btn--accent:hover {
  background: var(--accent-600);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--brand);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--brand);
  background: var(--brand-100);
}
.btn--block {
  width: 100%;
}
.btn--lg {
  padding: 0.9em 1.8em;
  font-size: var(--step-1);
}
.btn--sm {
  padding: 0.45em 0.9em;
  font-size: var(--step--1);
}

/* ---- The price-tag signature ------------------------------------------ */
.price {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.price-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 0.12em 0.5em;
  box-shadow: 2px 2px 0 var(--brand);
}
.price-tag--lg {
  font-size: var(--step-2);
  padding: 0.18em 0.6em;
  box-shadow: 3px 3px 0 var(--brand);
}

/* ---- Badges ------------------------------------------------------------ */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.28em 0.55em;
  border-radius: 5px;
  color: #fff;
  background: var(--muted);
}
.badge--sale {
  background: var(--berry);
}
.badge--new {
  background: var(--brand);
}
.badge--status {
  color: var(--brand-600);
  background: var(--brand-100);
}

/* ---- Rating ------------------------------------------------------------ */
.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--step--1);
  color: var(--muted);
}
.stars {
  color: var(--gold-star);
  letter-spacing: 0.06em;
}

/* =========================================================================
   Header / navigation
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238, 241, 234, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-2);
  letter-spacing: -0.04em;
  color: var(--brand);
}
.brand .brand-my {
  color: var(--accent-600);
}
.brand .brand-dot {
  color: var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}
.nav-link {
  padding: 0.5em 0.8em;
  border-radius: 999px;
  font-weight: 550;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover,
.nav-link.is-active {
  background: var(--brand-100);
  color: var(--brand-600);
}
.header-search {
  position: relative;
  flex: 1;
  max-width: 340px;
}
.header-search input {
  width: 100%;
  padding: 0.55em 0.9em 0.55em 2.2em;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.15s ease;
}
.header-search input:focus {
  border-color: var(--brand);
  outline: none;
}
.header-search::before {
  content: "⌕";
  position: absolute;
  left: 0.85em;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.1em;
}
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--line);
  cursor: pointer;
  font-size: 1.2rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover {
  border-color: var(--brand);
  background: var(--brand-100);
}
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--berry);
  border-radius: 999px;
  border: 2px solid var(--paper);
}
.cart-count[hidden] {
  display: none;
}
.nav-toggle {
  display: none;
}

/* =========================================================================
   Product card
   ========================================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--sp-5);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 3.4rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}
.card-badges {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  display: flex;
  gap: var(--sp-2);
}
.wish-btn {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.14s ease, background 0.14s ease;
}
.wish-btn:hover {
  transform: scale(1.12);
  background: #fff;
}
.wish-btn.is-active {
  color: var(--berry);
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  flex: 1;
}
.card-cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 750;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.card-name:hover {
  color: var(--brand);
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-2);
}
.stock-note {
  font-size: var(--step--1);
  color: var(--muted);
}
.stock-note.is-low {
  color: var(--berry);
}
.stock-note.is-out {
  color: var(--berry);
  font-weight: 600;
}

/* =========================================================================
   Home / storefront
   ========================================================================= */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 60%, #0a2c22 100%);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 5rem);
  display: grid;
  gap: var(--sp-5);
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(244, 166, 42, 0.42), transparent 42%),
    radial-gradient(circle at 12% 96%, rgba(244, 166, 42, 0.18), transparent 38%);
  z-index: -1;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: var(--step--1);
  color: var(--accent);
}
.hero h1 {
  font-size: var(--step-5);
  max-width: 15ch;
  color: #fff;
}
.hero p {
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--step-1);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-stat b {
  font-family: var(--font-mono);
  display: block;
  font-size: var(--step-2);
  color: var(--accent);
}
.hero-stat span {
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.75);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-4);
}
.cat-tile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.cat-tile .cat-emoji {
  font-size: 2rem;
}
.cat-tile b {
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}
.cat-tile span {
  font-size: var(--step--1);
  color: var(--muted);
  font-family: var(--font-mono);
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--sp-4);
  padding: var(--sp-6);
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.value-item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.value-item .v-ico {
  font-size: 1.6rem;
}
.value-item b {
  display: block;
  font-family: var(--font-display);
}
.value-item span {
  font-size: var(--step--1);
  color: var(--muted);
}

.stack {
  display: grid;
  gap: var(--sp-8);
}

/* =========================================================================
   Catalog / shop
   ========================================================================= */
.shop-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--sp-6);
  align-items: start;
}
.filters {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-group h3 {
  font-size: var(--step--1);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-3);
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.chip {
  padding: 0.35em 0.8em;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: var(--step--1);
  cursor: pointer;
  transition: all 0.14s ease;
}
.chip:hover {
  border-color: var(--brand);
}
.chip.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.field {
  display: grid;
  gap: var(--sp-2);
}
.field label {
  font-size: var(--step--1);
  font-weight: 600;
}
.input,
.select {
  width: 100%;
  padding: 0.6em 0.8em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s ease;
}
.input:focus,
.select:focus {
  border-color: var(--brand);
  outline: none;
}
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.results-count {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
}
.sort-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.sort-inline .select {
  width: auto;
}

/* ---- Empty / not-found states ------------------------------------------ */
.empty {
  display: grid;
  place-items: center;
  gap: var(--sp-4);
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.empty .empty-emoji {
  font-size: 3rem;
}
.empty h2 {
  font-size: var(--step-2);
}
.empty p {
  color: var(--muted);
  max-width: 42ch;
}
.error-state {
  border-color: var(--berry);
  color: var(--berry);
}

/* =========================================================================
   Product detail
   ========================================================================= */
.detail {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--sp-7);
  align-items: start;
}
.detail-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-size: 7rem;
  color: #fff;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  box-shadow: var(--shadow-md);
}
.detail-body {
  display: grid;
  gap: var(--sp-4);
}
.detail-body h1 {
  font-size: var(--step-4);
}
.detail-desc {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.6;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
}
.crumbs {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  margin-bottom: var(--sp-4);
}
.crumbs a:hover {
  color: var(--brand);
}

/* ---- Quantity stepper -------------------------------------------------- */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.stepper button {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--brand);
  transition: background 0.14s ease;
}
.stepper button:hover {
  background: var(--brand-100);
}
.stepper .qty {
  min-width: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
}
.stepper--sm button {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}
.stepper--sm .qty {
  min-width: 30px;
}

/* =========================================================================
   Cart & receipt-style summary
   ========================================================================= */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-6);
  align-items: start;
}
.line-items {
  display: grid;
  gap: var(--sp-3);
}
.line-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.line-thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #fff;
}
.line-meta {
  display: grid;
  gap: var(--sp-2);
}
.line-meta b {
  font-family: var(--font-display);
  font-size: var(--step-1);
}
.line-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.line-end {
  display: grid;
  justify-items: end;
  gap: var(--sp-2);
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-size: var(--step--1);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover {
  color: var(--berry);
}

.summary {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--brand);
}
.summary h2 {
  font-size: var(--step-1);
  margin-bottom: var(--sp-4);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: var(--sp-2);
  font-size: var(--step-0);
}
.summary-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}
.summary-row.muted {
  color: var(--muted);
}
.summary-divider {
  border: none;
  border-top: 2px dashed var(--line);
  margin-block: var(--sp-3);
}
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-block: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--step-2);
}
.summary-total .price {
  font-size: var(--step-2);
}
.ship-hint {
  font-size: var(--step--1);
  color: var(--brand-600);
  background: var(--brand-100);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
  text-align: center;
}
.ship-free {
  color: var(--ok);
  font-weight: 600;
}

/* =========================================================================
   Checkout / forms
   ========================================================================= */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-6);
  align-items: start;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
}
.form-card h2 {
  font-size: var(--step-1);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.form-card h2 .step-num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.field.col-span {
  grid-column: 1 / -1;
}
.input.invalid {
  border-color: var(--berry);
}
.field-error {
  color: var(--berry);
  font-size: var(--step--1);
  min-height: 1.1em;
}
.demo-note {
  font-size: var(--step--1);
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
}

/* =========================================================================
   Confirmation
   ========================================================================= */
.confirm {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  display: grid;
  gap: var(--sp-4);
}
.confirm-mark {
  width: 88px;
  height: 88px;
  margin-inline: auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background: var(--brand-100);
  color: var(--brand);
}
.order-ticket {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--accent);
  padding: var(--sp-6);
  margin-top: var(--sp-4);
}
.order-ticket .ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px dashed var(--line);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.order-no {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--step-1);
}
.ticket-line {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-2);
  font-size: var(--step-0);
}
.ticket-line .price {
  font-family: var(--font-mono);
}

/* =========================================================================
   Orders / account / wishlist
   ========================================================================= */
.order-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: var(--sp-3);
}
.order-row .o-meta {
  display: grid;
  gap: var(--sp-1);
}
.order-row .o-no {
  font-family: var(--font-mono);
  font-weight: 700;
}
.order-row .o-sub {
  font-size: var(--step--1);
  color: var(--muted);
}
.order-detail {
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  border-top: 1px dashed var(--line);
  margin-top: var(--sp-4);
}
.account-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
}
.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.saved-flash {
  color: var(--ok);
  font-size: var(--step--1);
  font-weight: 600;
}

/* =========================================================================
   Toast
   ========================================================================= */
.toast-stack {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  z-index: 200;
  display: grid;
  gap: var(--sp-2);
  max-width: min(340px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.24s ease;
}
.toast .toast-ico {
  color: var(--accent);
  font-size: 1.2rem;
}
.toast.leaving {
  animation: toast-out 0.24s ease forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding-block: var(--sp-7) var(--sp-6);
  margin-top: var(--sp-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--sp-6);
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-3);
}
.footer-grid a {
  display: block;
  padding-block: var(--sp-1);
  color: var(--ink);
  font-size: var(--step--1);
}
.footer-grid a:hover {
  color: var(--brand);
}
.footer-brand p {
  color: var(--muted);
  font-size: var(--step--1);
  max-width: 32ch;
  margin-top: var(--sp-3);
}
.footer-base {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .detail,
  .cart-layout,
  .checkout-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .filters {
    position: static;
  }
  .summary {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  .header-search {
    display: none;
  }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3);
    box-shadow: var(--shadow-md);
    transform: translateY(-140%);
    transition: transform 0.22s ease;
  }
  .nav.open {
    transform: translateY(0);
  }
  .nav-toggle {
    display: inline-grid;
    margin-left: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  main {
    padding-block: var(--sp-5) var(--sp-7);
  }
}

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