:root {
  --color-bg: #fffaeb;          /* brand cream */
  --color-ink: #171717;         /* brand near-black */
  --color-espresso: #171717;    /* CTAs use ink for the minimal editorial look */
  --color-accent: #9a5a2c;      /* cognac leather accent */
  --color-line: #e8ddc4;        /* cream-tinted hairline */
  --color-muted: #7a7161;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* The hidden attribute only sets display:none in the UA sheet, so any author
   rule with an explicit display silently defeats it. Make it authoritative. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; }

/* Letter-spaced sans-caps eyebrow label, echoing the promo templates */
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.02;
  margin: 0 0 1.5rem;
}

.site-header {
  /* Three equal-weight columns rather than space-between, so the nav centres on
     the page instead of on the gap left over by the logo and cart widths. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: start;
}
.logo-img {
  height: 40px;
  width: auto;
  display: block;
}
@media (max-width: 520px) {
  .logo-img { height: 30px; }
}

/* --- Primary navigation --- */
.main-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 2rem;
}
.main-nav a {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-ink);
  padding: 0.35rem 0;
  transition: color 0.2s ease;
}
/* Underline grows from the centre on hover. Scaled rather than widened so the
   animation stays on the compositor instead of triggering layout each frame. */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.main-nav a:hover { color: var(--color-accent); }
.main-nav a:hover::after { transform: scaleX(1); }

/* Below 700px the logo, three links and cart no longer fit on one line, so the
   header becomes two rows: brand and cart above, nav centred beneath. This is
   what the old dropdown was concealing. */
@media (max-width: 700px) {
  .site-header {
    grid-template-columns: auto auto;
    row-gap: 0.85rem;
    padding: 1rem 1.25rem;
  }
  .wordmark { grid-column: 1; }
  .cart-toggle { grid-column: 2; }
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: 1.5rem;
  }
  .main-nav a { font-size: 0.95rem; }
}

@media (max-width: 380px) {
  .main-nav { gap: 1rem; }
  .main-nav a { font-size: 0.9rem; }
}

.cart-toggle {
  justify-self: end;
  background: none;
  border: 1px solid var(--color-espresso);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.cart-toggle:hover { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }

#bannerSlot .banner {
  background: #fff3d6;
  color: #6b4d00;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

main#app { max-width: 1200px; margin: 0 auto; padding: 2rem; min-height: 60vh; }

/* Was 3.5rem/3rem, which pushed every bag below the fold on a short window.
   The shop should show merchandise on the first screen. */
.hero {
  text-align: center;
  padding: 2.25rem 1rem 2rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin: 0 0 1.25rem;
}
.hero p { max-width: 42ch; margin: 0 auto 1.75rem; color: var(--color-muted); font-size: 1.05rem; }

.featured, .brand-story { text-align: center; padding: 2rem 1rem 2.5rem; }
.brand-story-copy { max-width: 48ch; margin: 0 auto 1.75rem; color: var(--color-muted); font-size: 1.05rem; }
.section-cta { margin-top: 2.25rem; }

.btn-primary {
  display: inline-block;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--color-accent); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }

/* Two columns stay all the way down. A single column made each card fill most
   of a phone screen, so the collection could only be seen one bag at a time —
   the worst possible way to browse eight one-of-one items. Below 340px the
   cards would be too narrow to read, so there it drops to one. */
@media (max-width: 600px) {
  main#app { padding: 1.25rem 1rem 2rem; }
  .product-grid { gap: 0.75rem; margin-top: 1rem; }
  .product-info { padding: 0.7rem 0.65rem 0.85rem; }
  .product-brand { font-size: 0.62rem; letter-spacing: 0.06em; margin-bottom: 0.2rem; }
  .product-name { font-size: 0.85rem; line-height: 1.25; }
  .product-price { font-size: 0.85rem; }
  .product-card { border-radius: 10px; }
  /* The cutouts float in white, so crop in slightly to fill more of the tile. */
  .product-media img { transform: scale(1.08); }
  .badge { font-size: 0.62rem; margin-top: 0.3rem; }
  /* Less air around the headings so more of the collection is on screen. */
  .featured, .brand-story { padding: 2rem 0.5rem; }
  .section-title { margin-bottom: 1rem; }
  .hero { padding: 2.5rem 1rem 2rem; }
}

@media (max-width: 340px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  display: block;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease;
}
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.product-card.sold-out { opacity: 0.55; }

.product-placeholder {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-espresso), var(--color-accent));
}

/* The photo tile is a stage, not a frame. A faint warm ground separates the
   product's own white background from the card, and the padding guarantees
   every bag has the same breathing room regardless of how it was shot. */
.product-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fbf8f1;
  padding: 7%;
  display: grid;
  place-items: center;
}
.product-media img {
  width: 100%;
  height: 100%;
  /* contain, not cover: a bag is merchandise and must never be cropped. */
  object-fit: contain;
  display: block;
}

/* Product detail gallery */
.product-gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.gallery-main {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px; height: 64px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  padding: 0;
  cursor: pointer;
}
.gallery-thumb.active { border-color: var(--color-espresso); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-info { padding: 1rem; }
.product-brand { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #8a7a63; margin: 0 0 0.25rem; }
.product-name { font-weight: 600; margin: 0 0 0.25rem; }
.product-price { margin: 0; }

.badge {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  background: var(--color-ink);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.filters-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.filters-bar select, .filters-bar input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  font-family: var(--font-body);
}

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 700px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail label { display: block; margin-top: 1rem; font-weight: 600; }
.product-detail select, .product-detail input[type="number"] {
  display: block; margin-top: 0.25rem; padding: 0.5rem; border: 1px solid var(--color-line); border-radius: 8px;
}

.cart-overlay {
  position: fixed; inset: 0; background: rgba(23, 23, 23, 0.42); z-index: 20;
}

body.drawer-open { overflow: hidden; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: min(400px, 100%);
  background: #fff;
  box-shadow: -12px 0 40px rgba(23, 23, 23, 0.16);
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 21;
  /* Rows: content scrolls, footer stays put. */
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
}
.cart-drawer.open { transform: translateX(0); }

#cartDrawerContent {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}

.cart-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #fff;
  color: var(--color-ink);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.cart-close:hover { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }

.cart-head { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--color-line); }
.cart-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.cart-count {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-muted);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

/* Lines */
.cart-lines {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.5rem 1rem;
  overflow-y: auto;
  min-height: 0;
}
.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-line);
  align-items: start;
}
.cart-line:last-child { border-bottom: none; }

.cart-thumb {
  width: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f4efe6;
  display: grid;
  place-items: center;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-thumb-fallback {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-muted);
}

.cart-line-body { min-width: 0; }
.cart-line-name {
  font-weight: 600;
  font-size: 0.98rem;
  margin: 0 0 0.15rem;
  line-height: 1.25;
}
.cart-line-brand {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin: 0 0 0.1rem;
}
.cart-line-variant {
  font-size: 0.84rem;
  color: var(--color-muted);
  margin: 0;
  /* Supplier colour strings can be long even after shortening. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-line-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.7rem;
}
.cart-line-price { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  overflow: hidden;
}
.qty-stepper button {
  width: 30px; height: 30px;
  border: none;
  background: none;
  color: var(--color-ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.qty-stepper button:hover { background: #f4efe6; }
.qty-value {
  min-width: 1.6rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Previously an unstyled button that overflowed the panel and rendered clipped. */
.remove-line {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: none;
  background: none;
  border-radius: 999px;
  color: var(--color-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.remove-line:hover { background: #fdecec; color: #8a1c1c; }

/* Footer pinned so the CTA never floats in dead space */
.cart-foot {
  padding: 1.15rem 1.5rem 1.4rem;
  border-top: 1px solid var(--color-line);
  background: #fff;
}
.cart-subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 1rem;
}
.cart-subtotal-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cart-ship-note {
  margin: 0.3rem 0 1rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}
.cart-checkout { display: block; text-align: center; width: 100%; }
.cart-continue {
  display: block;
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cart-continue:hover { color: var(--color-ink); }

/* Empty state */
.cart-empty { padding: 4rem 1.75rem; text-align: center; align-self: start; }
.cart-empty-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}
.cart-empty-copy {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .cart-drawer { transition: none; }
}

.checkout-form { max-width: 480px; }
.checkout-form label { display: block; margin: 1rem 0 0.25rem; font-weight: 600; }
.checkout-form input, .checkout-form textarea, .checkout-form select {
  width: 100%; padding: 0.6rem; border: 1px solid var(--color-line); border-radius: 8px; font-family: var(--font-body);
}
.order-summary-box { width: 100%; min-height: 220px; margin-top: 1rem; font-family: monospace; }

.site-footer {
  text-align: center;
  padding: 3rem 2rem 2.5rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-line);
  margin-top: 3rem;
}
.footer-logo { height: 96px; width: auto; margin-bottom: 0.75rem; }
.footer-tagline { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--color-ink); margin: 0 auto 1rem; max-width: 34ch; }
/* align-items:center so each link shrink-wraps its text; flex items are
   blockified, so a display:inline-block on the anchor itself is ignored. */
.footer-handles { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; font-family: var(--font-display); font-style: italic; color: var(--color-ink); margin: 0 0 1.25rem; }
.footer-copy { margin: 0; letter-spacing: 0.05em; }

/* --- How to Order page --- */
.page-hero { text-align: center; padding: 3rem 1rem 1rem; }
.page-lede { max-width: 54ch; margin: 0 auto; color: var(--color-muted); font-size: 1.05rem; }
/* The lede carries no bottom margin, so a button following it collided with the
   paragraph's descenders. Space the pair rather than giving every lede a margin
   it does not need when nothing follows. */
.page-lede + .btn-primary { margin-top: 1.9rem; }

.steps { padding: 2.5rem 0 1rem; }
.steps-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.25rem 2.5rem;
}
@media (max-width: 820px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps-grid { grid-template-columns: 1fr; } }
.step { border-top: 2px solid var(--color-ink); padding-top: 1rem; }
.step-num { font-family: var(--font-display); font-size: 2rem; color: var(--color-accent); display: block; margin-bottom: 0.3rem; }
.step-title { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 0.4rem; }
.step-desc { margin: 0; color: var(--color-muted); }

.authenticity { padding: 2.5rem 0; }
.authenticity-card {
  background: var(--color-ink); color: var(--color-bg);
  border-radius: 16px; padding: 3.5rem 2rem; text-align: center;
}
.authenticity-card .eyebrow { color: var(--color-bg); opacity: 0.75; }
.authenticity-card .section-title { color: var(--color-bg); }
.authenticity-card p { max-width: 58ch; margin: 0 auto; color: rgba(255,250,235,0.9); }
.authenticity-includes { margin-top: 1.1rem !important; font-style: italic; font-family: var(--font-display); }

.info-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 0 1rem; }
@media (max-width: 700px) { .info-cols { grid-template-columns: 1fr; } }
.info-card { border: 1px solid var(--color-line); border-radius: 14px; padding: 2rem; background: #fff; }
.info-heading { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 1rem; }
.info-list { list-style: none; margin: 0; padding: 0; }

/* Sits under the payment methods; the last-four check only works if the buyer
   actually reads it, so it is body-weight rather than fine print. */
.info-note {
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--color-line);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-muted);
}
.info-note strong { color: var(--color-ink); font-weight: 600; }
.info-list li { padding: 0.65rem 0; border-bottom: 1px dashed var(--color-line); }
.info-list li:last-child { border-bottom: none; }
.info-label { font-weight: 700; letter-spacing: 0.02em; margin-right: 0.35rem; }

.order-cta { text-align: center; padding: 3rem 1rem 3.5rem; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Route/view change fade */
.view-enter { animation: viewFade 0.42s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes viewFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* --- Checkout totals, secondary action, and confirmation --- */

.order-totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
  margin: 1.75rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-line);
}
.order-totals dt { color: var(--color-muted); }
.order-totals dd { text-align: right; }
.order-totals .is-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-ink);
  padding-top: 0.4rem;
  border-top: 1px solid var(--color-line);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-ink);
  padding: 0.8rem 2rem;
  border: 1px solid var(--color-ink);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  margin-left: 0.6rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-secondary:hover { background: var(--color-ink); color: var(--color-bg); }

.checkout-error {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fdecec;
  color: #8a1c1c;
  font-size: 0.95rem;
}

.checkout-note {
  margin-top: 0.9rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.checkout-form button { margin-top: 1rem; }

.order-confirmed {
  max-width: 46ch;
  margin: 4rem auto;
  text-align: center;
}
.order-confirmed p { color: var(--color-muted); margin-bottom: 1.25rem; }
.order-confirmed .btn-primary { margin-top: 0.5rem; }

@media (max-width: 600px) {
  .btn-secondary { margin-left: 0; margin-top: 0.75rem; display: block; }
}

/* --- Order tracking page --- */

.track { max-width: 720px; margin: 0 auto; padding: 1rem 0 3rem; }
.track-loading, .track-empty { max-width: 46ch; margin: 4rem auto; text-align: center; color: var(--color-muted); }
.track-empty h1 { font-size: 1.8rem; margin: 0 0 0.75rem; color: var(--color-ink); }
.track-empty .btn-primary { margin-top: 1rem; }

.track-head { text-align: center; margin-bottom: 2.5rem; }
.track-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.4rem; }
.track-lede { color: var(--color-muted); margin: 0; }

/* Timeline */
.track-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 0 2.5rem;
  padding: 0;
  position: relative;
}
.track-step { text-align: center; position: relative; padding-top: 2rem; }
/* Connector sits behind the dots and stops at the first and last step. */
.track-step::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-line);
}
.track-step:first-child::before { left: 50%; }
.track-step:last-child::before { right: 50%; }
.track-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 15px; height: 15px;
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
}
.track-step.done .track-dot { background: var(--color-ink); border-color: var(--color-ink); }
.track-label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--color-muted); }
.track-step.done .track-label { color: var(--color-ink); }
.track-when { display: block; font-size: 0.78rem; color: var(--color-muted); margin-top: 0.15rem; }

.track-courier {
  text-align: center;
  padding: 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  margin-bottom: 2rem;
  background: #fff;
}
.track-courier-label { margin: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); }
.track-courier-number {
  margin: 0.2rem 0 0.9rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.track-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .track-grid { grid-template-columns: 1fr; } }
.track-panel { border: 1px solid var(--color-line); border-radius: 14px; padding: 1.25rem; background: #fff; }
.track-panel-title { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 0.9rem; }

.track-items { list-style: none; margin: 0 0 1rem; padding: 0; }
.track-items li { padding: 0.55rem 0; border-bottom: 1px solid var(--color-line); }
.track-item-name { display: block; font-weight: 600; font-size: 0.92rem; }
.track-item-variant { display: block; font-size: 0.82rem; color: var(--color-muted); }
.track-item-price { display: block; font-size: 0.85rem; margin-top: 0.15rem; }

.track-totals { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; margin: 0; }
.track-totals dt { color: var(--color-muted); font-size: 0.9rem; }
.track-totals dd { margin: 0; text-align: right; font-size: 0.9rem; }
.track-totals .is-total { font-weight: 700; font-size: 1.05rem; color: var(--color-ink); padding-top: 0.4rem; }

.track-address { margin: 0; font-size: 0.92rem; line-height: 1.6; }
.track-help { text-align: center; color: var(--color-muted); font-size: 0.88rem; margin-top: 2rem; }

/* Footer social links — previously plain spans, so the shop's Instagram and
   Facebook, where its reviews and past sales live, were not clickable. */
.footer-handles a {
  position: relative;
  display: inline-block;
  transition: color 0.2s ease;
}
.footer-handles a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(1);
  transition: opacity 0.2s ease;
}
.footer-handles a:hover { color: var(--color-ink); }
.footer-handles a:hover::after { opacity: 1; }

/* Loading placeholders. The catalogue arrives over the network; showing the
   shape of the page beats showing nothing. */
.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;
}
.skeleton-wrap { padding-top: 1rem; }
.skeleton-card { pointer-events: none; }
.skeleton-media {
  aspect-ratio: 1 / 1;
  background: #f1ece1;
}
.skeleton-line {
  display: block;
  height: 0.7rem;
  border-radius: 4px;
  background: #f1ece1;
  margin-bottom: 0.5rem;
}
.skeleton-line.short { width: 45%; }
.skeleton-line.tiny { width: 30%; margin-bottom: 0; }
.skeleton-media, .skeleton-line { animation: skeletonPulse 1.4s ease-in-out infinite; }
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Build credit. Deliberately small: it is a signature, not a second brand
   competing with the shop's own logo a few lines above. */
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1rem 0 0;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.autom8-logo {
  /* Height drives it; width auto keeps the 992x317 ratio and, with the
     intrinsic size on the tag, reserves space so the footer does not shift
     as the image loads. */
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.powered-by:hover .autom8-logo { opacity: 1; }

/* Legal links sit below the social handles in the storefront footer. */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 0.75rem 0 0;
}
.footer-legal a {
  color: var(--color-muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.footer-legal a:hover { color: var(--color-ink); text-decoration: underline; }

/* Sits under the pay button: this is the moment the terms are agreed to, so it
   has to be visible at the point of payment rather than only in the footer. */
.checkout-consent {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0.75rem 0 0;
  line-height: 1.5;
}
.checkout-consent a { color: var(--color-accent); text-decoration: underline; }
