/* ============================================================
   DealDash — Site styles v0.1.0 (frontend-dev layer)
   The DESIGN SYSTEM owns components (design/tokens.css +
   design/components.css, linked BEFORE this file): buttons,
   product cards, badges, deal banner, carousels, bundles,
   quick-add, tiles, filters, footer base.
   This file holds ONLY what the design system doesn't:
   header/nav, hero, trust strip, product detail page, about/
   contact prose, toast, and small honesty helpers.
   :root below defines ALIASES only (never redefines a designer
   token — later stylesheets win, so redefining would clobber the
   real tokens). Each alias falls back to a literal so the page
   still renders if tokens.css ever fails to load.
   Pure static CSS — no build step (cPanel-safe).
   Comments explain WHY, not what.
   ============================================================ */

:root {
  --ns-accent: var(--ns-cta, #d6471f);
  --ns-accent-deep: var(--ns-cta-deep, #a83412);
  --ns-gold: var(--ns-gold, #d9a441);
  --ns-gold-deep: var(--ns-gold-deep, #8f6a1d);
  --ns-ink-soft: var(--ns-stone, #6e5f50);
  --ns-paper-soft: #f6f3ec;
}

/* ---------- In-progress banner (REMOVE at v0.1.0 release) ----------
   Injected by js/site.js on every shop page until v0.1.0 ships.
   Amber = "preview, not final". Delete with the JS function. */
.wip-banner {
  background: #d9a441;
  color: #211711;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ---------- Header ----------
   The design system is name-agnostic (no header component), so the
   wordmark lives here. "DealDash" is Darnel's picked name. */
.site-header {
  background: var(--ns-ink, #211711);
  color: var(--ns-paper, #faf6ee);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.wordmark {
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: var(--font-weight-black, 800);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ns-paper, #faf6ee);
  white-space: nowrap;
}
.wordmark__deal { color: var(--ns-gold, #d9a441); }

/* ---------- Brand logo ----------
   WHY an <img> whose SVG letters are currentColor: the lockup
   (concept 1, "Launch Lines" — wired as the default until Darnel
   picks the final logo) re-themes per context: paper on the dark
   header/footer, ink on light admin surfaces — from the ONE file
   assets/logo.svg. Swapping concepts = replacing that file; no
   markup changes. Gold speed bars carry their own fill, so they
   read gold in every context. */
.brand-logo {
  display: block;
  height: 30px;
  width: auto;
}
.site-footer .brand-logo {
  /* Footer anchors are gold by design; the wordmark stays paper. */
  color: var(--ns-paper, #faf6ee);
}
.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ns-paper, #faf6ee);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.95rem;
}
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.16); }
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- Hero (homepage only) ---------- */
.hero {
  text-align: center;
  padding: 48px 20px 40px;
  background: var(--ns-ink, #211711);
  color: var(--ns-paper, #faf6ee);
  border-radius: var(--radius-lg, 18px);
  margin-bottom: 8px;
}
.hero__eyebrow {
  font-size: var(--font-size-eyebrow, 0.75rem);
  letter-spacing: var(--letter-spacing-eyebrow, 0.16em);
  text-transform: uppercase;
  color: var(--ns-gold, #d9a441);
  font-weight: var(--font-weight-bold, 700);
  margin: 0 0 8px;
}
.hero__title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: var(--font-size-display, clamp(2.5rem, 11vw, 4.5rem));
  line-height: var(--line-height-tight, 1.05);
  letter-spacing: var(--letter-spacing-display, -0.01em);
  margin: 0 0 12px;
  font-weight: var(--font-weight-black, 800);
}
.hero__tagline { font-size: 1.1rem; opacity: 0.85; margin: 0 0 24px; }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn--ghost { color: var(--ns-paper, #faf6ee); border-color: rgba(250, 246, 238, 0.4); }
.hero .btn--ghost:hover { border-color: var(--ns-paper, #faf6ee); background: transparent; }

/* ---------- Trust strip (homepage) ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3, 12px);
}
@media (min-width: 768px) { .trust-strip { grid-template-columns: repeat(4, 1fr); } }
.trust {
  text-align: center;
  padding: var(--space-4, 16px) var(--space-2, 8px);
  background: var(--ns-card, #fff);
  border: 1px solid var(--ns-sand, #e9ddc7);
  border-radius: var(--radius-md, 10px);
}
.trust__icon { font-size: 1.75rem; }
.trust__title { font-weight: var(--font-weight-bold, 700); margin: 8px 0 4px; font-size: 0.95rem; }
.trust__text { margin: 0; font-size: 0.85rem; color: var(--ns-ink-soft); }

/* ---------- Product detail page ----------
   No detail component in the design system; styled here from
   tokens so it stays on-brand. */
.breadcrumb { font-size: 0.9rem; color: var(--ns-ink-soft); margin-bottom: 16px; }
.breadcrumb a { color: var(--ns-ink-soft); }
.detail__layout { display: grid; gap: 24px; }
@media (min-width: 768px) { .detail__layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.detail__media {
  position: relative;
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  background: var(--ns-card, #fff);
  border: 1px solid var(--ns-sand, #e9ddc7);
  aspect-ratio: 4 / 3;
}
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__media .photo-coming-soon { border: 0; border-radius: 0; }
.detail__brand {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--ns-ink-soft);
  margin: 0 0 4px;
  font-weight: var(--font-weight-bold, 700);
}
.detail__name {
  font-family: var(--font-display, system-ui, sans-serif);
  margin: 0 0 8px;
  font-size: var(--font-size-h1, clamp(1.625rem, 6vw, 2.375rem));
  line-height: var(--line-height-tight, 1.05);
}
.detail__price {
  font-size: var(--font-size-price, 1.25rem);
  font-weight: var(--font-weight-black, 800);
  margin: 0 0 4px;
}
.detail__note { color: var(--ns-ink-soft); margin: 0 0 12px; font-size: 0.9rem; }
.detail__meta { color: var(--ns-ink-soft); margin: 0 0 8px; }
.detail__tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.tag {
  background: var(--ns-paper-soft);
  border: 1px solid var(--ns-sand, #e9ddc7);
  border-radius: var(--radius-full, 999px);
  padding: 4px 12px;
  font-size: 0.8rem;
}
.detail__features { margin: 0 0 24px; padding-left: 20px; }
.detail__features li { margin-bottom: 8px; }
.detail__actions { display: grid; gap: 12px; margin-bottom: 24px; }
.quick-add__thumb--soon { border: 2px dashed var(--ns-gold-deep, #8f6a1d); }

/* ---------- Announcement banner (client's Store settings) ---------- */
.announcement {
  background: var(--ns-gold, #d9a441);
  color: var(--ns-ink, #211711);
  font-weight: var(--font-weight-bold, 700);
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--radius-md, 10px);
  margin-bottom: 16px;
}

/* ---------- Bundle strip layout (cards are the design system's) ---------- */
.bundle-strip { display: grid; gap: var(--space-4, 16px); }
@media (min-width: 768px) { .bundle-strip { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Honesty helpers (not in the design system) ---------- */
/* Sold-out badge: the system only defines the low-stock alert.
   Grey, calm — sold out is a fact, not an emergency. */
.badge--soldout { background: var(--ns-stone, #6e5f50); color: #fff; }
/* Lot-price explainer under a card price (e.g. the 13 "Various"
   rows): small, muted, always paired with the real lot total. */
.product-card__note { font-size: var(--font-size-small, 0.875rem); color: var(--ns-ink-soft); margin: 0; }
/* "Representative photo" flag for manifest generic=true images:
   sits on the media so nobody mistakes it for the exact item. */
.product-card__media, .deal-of-the-day__media, .bundle-card__item, .detail__media { position: relative; }
.photo-flag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(23, 16, 11, 0.82);
  color: var(--ns-paper, #faf6ee);
  font-size: 0.7rem;
  font-weight: var(--font-weight-bold, 700);
  padding: 3px 10px;
  border-radius: var(--radius-full, 999px);
  letter-spacing: 0.04em;
}

/* ---------- Shop page extras ---------- */
.shop-controls { display: grid; gap: 12px; margin-bottom: 8px; }
@media (min-width: 768px) { .shop-controls { grid-template-columns: 1fr 220px; } }
.sort-select {
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--ns-sand, #e9ddc7);
  border-radius: var(--radius-full, 999px);
  font-size: 1rem;
  font-family: inherit;
  background: var(--ns-card, #fff);
  color: var(--ns-ink, #211711);
}
.result-count { color: var(--ns-ink-soft); font-size: 0.9rem; margin: 0 0 16px; }

/* ---------- About / contact prose ---------- */
.prose { max-width: 680px; }
.prose h1 {
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: var(--font-size-h1, clamp(1.625rem, 6vw, 2.375rem));
  margin: 0 0 16px;
  line-height: var(--line-height-tight, 1.05);
}
.prose h2 { margin: 32px 0 8px; font-size: 1.25rem; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 28px; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ns-whatsapp-deep, #1da851);
  font-weight: var(--font-weight-black, 800);
}

/* ---------- Footer extras (base footer is the design system's) ---------- */
.site-footer__grid { display: grid; gap: 24px; margin-bottom: 24px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer__heading { color: var(--ns-paper, #faf6ee); font-size: 0.95rem; margin: 0 0 8px; }
.site-footer__tagline { max-width: 300px; }
.site-footer__built { color: var(--ns-gold, #d9a441); font-weight: var(--font-weight-bold, 700); }
.site-footer__bottom {
  border-top: 1px solid rgba(250, 246, 238, 0.15);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer nav a { display: inline-block; padding: 4px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ns-ink, #211711);
  color: var(--ns-paper, #faf6ee);
  padding: 12px 20px;
  border-radius: var(--radius-full, 999px);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--error { background: var(--ns-danger, #b3261e); }

/* Loading spinner for the honest loading states */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--ns-sand, #e9ddc7);
  border-top-color: var(--ns-accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
