/* ============================================================
   New Store — Components v0.1.0
   Real component styles, mobile-first (base = 360px wide,
   media queries only add columns and air).
   Consumes design/tokens.css — no hard-coded colors, fonts,
   spacing, radii, or shadows that exist as tokens.
   Comments explain WHY, not what.

   HONESTY RULE (component-level): this file deliberately
   provides NO styles for discount percentages, strikethrough
   MSRPs, countdown timers, or "X% claimed" progress bars.
   Urgency is rendered ONLY from real inventory data:
   .badge-only-x-left (real low count), .deal-of-the-day
   (a real featured deal), .new-drop (a real new arrival).
   ============================================================ */

/* ---------- Base reset (mobile-first foundation) ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--ns-ink);
  background: var(--ns-paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-mobile);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--container-pad-desktop); }
}

/* ---------- Section headers ----------
   Eyebrow (gold, tracked) + punchy grotesque headline: the deal
   energy comes from tight, heavy type — not from decoration. */
.section-head { margin: var(--space-8) 0 var(--space-5); }
.section-head__eyebrow {
  display: block;
  font-size: var(--font-size-eyebrow);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--ns-gold-deep);   /* gold-deep: passes contrast on paper */
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}
.section-head__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-h2);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-display);
  margin: 0;
}
.section-head__sub { color: var(--ns-stone); margin: var(--space-2) 0 0; }

/* ---------- Buttons ----------
   --ns-cta is reserved EXCLUSIVELY for buy/order actions
   (.btn--buy). Everything else uses ink or ghost. If the orange
   shows up on anything that doesn't take money, the meaning dies. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;             /* ≥44px touch target — deal shoppers are on phones */
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }  /* tactile press = feels fast, feels done */

.btn--buy {
  background: var(--ns-cta);    /* the ONLY place the impulse color lives */
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn--buy:hover { background: var(--ns-cta-deep); }

.btn--secondary {
  background: var(--ns-ink);     /* ink = important but not money */
  color: var(--ns-paper);
}
.btn--secondary:hover { background: var(--ns-coal); }

.btn--whatsapp {
  background: var(--ns-whatsapp);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.32);
}
.btn--whatsapp:hover { background: var(--ns-whatsapp-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ns-ink);
  border-color: var(--ns-sand);
}
.btn--ghost:hover { border-color: var(--ns-ink); }

.btn--full { width: 100%; }
.btn--small { min-height: 44px; padding: var(--space-2) var(--space-4); font-size: var(--font-size-small); }

/* ---------- Product cards ----------
   Photo leads (4:5, tall like a shelf), price is the headline of
   the text block, one honest action. Text sits BELOW the photo,
   never overlaid — overlays die in sunlight and crop badly at 360px. */
.product-card {
  background: var(--ns-card);
  border: 1px solid var(--ns-sand);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-medium) var(--ease-out),
              transform var(--duration-medium) var(--ease-out);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-card__media {
  aspect-ratio: 4 / 5;          /* tall shelf crop — consistent grid, no guessing */
  background: var(--ns-paper);
  position: relative;
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;            /* real photos only — never stock-as-product */
}

.product-card__body {
  padding: var(--space-3) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.product-card__name {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-body);
  line-height: var(--line-height-snug);
  margin: 0;
}
.product-card__meta {
  font-size: var(--font-size-small);
  color: var(--ns-stone);
  margin: 0;
}
/* Price is the money line — biggest, boldest text in the body,
   set apart from everything else so the eye lands there first. */
.product-card__price {
  font-size: var(--font-size-price);
  font-weight: var(--font-weight-black);
  color: var(--ns-ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.product-card__actions { margin-top: auto; padding-top: var(--space-2); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 2-up at 360px — deal density */
  gap: var(--space-3);
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Honest urgency badges ----------
   Rendered ONLY from real inventory counts. The badge slot sits
   top-left of the media; if stock > threshold, render nothing —
   an empty slot is honest, a fake badge is a lie. */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  line-height: 1;
}
.badge--on-media {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 1;
}
.badge-only-x-left {
  background: var(--ns-alert);
  color: #fff;                  /* real low count, e.g. "Only 1 left" — high alert, no hype */
}
.badge--new-drop {
  background: var(--ns-ink);
  color: var(--ns-paper);       /* "New drop" is a fact (arrival date), not urgency */
}
.badge--gold {
  background: var(--ns-gold);
  color: var(--ns-ink);         /* deal-of-the-day ribbon — curated, not scarcity */
}

/* ---------- Deal of the Day banner ----------
   ONE curated deal per day, hand-picked by the client — the
   anchor of the homepage. No timer: when the day is over the
   deal rotates, the banner doesn't fake a countdown. Gold marks
   "deal"; orange marks the buy. */
.deal-of-the-day {
  background: var(--ns-ink);
  color: var(--ns-paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border-top: 6px solid var(--ns-gold);  /* the gold = "deal" signal, read instantly */
  margin: var(--space-5) 0;
}
.deal-of-the-day__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-5);
}
@media (min-width: 768px) {
  .deal-of-the-day__inner { grid-template-columns: 5fr 6fr; align-items: center; padding: var(--space-6); }
}
.deal-of-the-day__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ns-coal);
}
.deal-of-the-day__media img { width: 100%; height: 100%; object-fit: cover; }
.deal-of-the-day__name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-h1);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--space-2);
}
.deal-of-the-day__price {
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: var(--font-weight-black);
  color: var(--ns-gold);
  margin: 0 0 var(--space-4);
}
.deal-of-the-day__note {
  color: rgba(250, 246, 238, 0.75);  /* warm-tinted secondary text on ink */
  font-size: var(--font-size-small);
  margin: 0 0 var(--space-4);
}

/* ---------- New Drops carousel ----------
   Horizontal snap-scroll of real new arrivals. "New" comes from
   the arrival date in data, never from a designer's whim. */
.new-drops {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 68%;       /* peek the next card — invites the swipe */
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-2);  /* room for the scrollbar, no clipping */
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 768px) { .new-drops { grid-auto-columns: 280px; } }
.new-drops > * { scroll-snap-align: start; }
.new-drops__card { min-width: 0; }

/* ---------- Bundle cards ("Frequently grabbed together") ----------
   Real bundles the client assembles (bundle price is a real sum,
   not a fake markdown). Shows the combined price and the member
   items; the buy button adds the whole set. */
.bundle-card {
  background: var(--ns-card);
  border: 1px solid var(--ns-sand);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.bundle-card__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-h3);
  margin: 0 0 var(--space-2);
}
.bundle-card__items {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.bundle-card__item {
  flex: 1;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ns-paper);
  border: 1px solid var(--ns-sand);
}
.bundle-card__item img { width: 100%; height: 100%; object-fit: cover; }
.bundle-card__plus {
  align-self: center;
  font-weight: var(--font-weight-black);
  color: var(--ns-gold-deep);
  font-size: 1.25rem;
}
.bundle-card__names { font-size: var(--font-size-small); color: var(--ns-stone); margin: 0 0 var(--space-3); }
.bundle-card__price {
  font-size: var(--font-size-price);
  font-weight: var(--font-weight-black);
  margin: 0 0 var(--space-4);
}

/* ---------- Sticky quick-add bar ----------
   Product page bottom bar: thumb, name, price, buy. Always
   visible while scrolling so the buy is never more than one tap
   away — the impulse-buy workhorse. Dark so the orange buy pops. */
.quick-add {
  position: sticky;
  bottom: 0;
  z-index: 50;
  background: var(--ns-coal);
  color: var(--ns-paper);
  border-top: 1px solid rgba(250, 246, 238, 0.15);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));  /* notch-safe */
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.quick-add__thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--ns-ink);
  flex-shrink: 0;
}
.quick-add__info { flex: 1; min-width: 0; }
.quick-add__name {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-small);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;      /* never wraps into the buy button */
  margin: 0;
}
.quick-add__price { font-weight: var(--font-weight-black); margin: 0; }
.quick-add .btn--buy { flex-shrink: 0; }

/* ---------- Category tiles ----------
   Big tap targets for the ~8 categories. Real product photo
   when available; dashed placeholder when not. Name below the
   image, count of items as honest metadata ("24 items"). */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-tile {
  background: var(--ns-card);
  border: 1px solid var(--ns-sand);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  display: block;
}
.category-tile__media { aspect-ratio: 16 / 9; background: var(--ns-paper); overflow: hidden; }
.category-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.category-tile__body { padding: var(--space-2) var(--space-3); }
.category-tile__name { font-weight: var(--font-weight-bold); margin: 0; font-size: var(--font-size-small); }
.category-tile__count { font-size: var(--font-size-small); color: var(--ns-stone); margin: 0; }

/* ---------- Search / filter pills ----------
   Horizontal scroll row of toggle pills. Active pill is ink;
   inactive are ghost — the active state must read at a glance
   on a bright phone screen, so no subtle grey-on-grey. */
.filter-row {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-2) 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;        /* pills scroll like a tab bar; scrollbar is noise */
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0;
  min-height: 44px;             /* touch target — thumbs, not mice */
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  border: 2px solid var(--ns-sand);
  background: var(--ns-card);
  color: var(--ns-ink);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  white-space: nowrap;
}
.filter-pill[aria-pressed="true"] {
  background: var(--ns-ink);    /* active = filled ink, unmistakable */
  border-color: var(--ns-ink);
  color: var(--ns-paper);
}
.search-bar {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.search-bar input {
  flex: 1;
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 2px solid var(--ns-sand);
  border-radius: var(--radius-full);
  font-size: var(--font-size-body);
  background: var(--ns-card);
  color: var(--ns-ink);
}
.search-bar input:focus { outline: 2px solid var(--ns-cta); outline-offset: 1px; border-color: var(--ns-cta); }

/* ---------- Photo coming soon (honest empty state) ----------
   For items with NO image: dashed border + label. Dashed says
   "temporary" to any shopper — never a broken <img>, never a
   stock photo pretending to be the product. Sized to the media
   slot it fills (4:5 in cards, 16/9 in tiles, square in bundles). */
.photo-coming-soon {
  width: 100%;
  height: 100%;
  min-height: 120px;
  border: 2px dashed var(--ns-gold-deep);
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(           /* subtle hatch = "under construction" */
      -45deg,
      transparent 0 10px,
      rgba(217, 164, 65, 0.06) 10px 20px
    );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  color: var(--ns-gold-deep);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-bold);
  text-align: center;
  padding: var(--space-3);
}
.photo-coming-soon small {
  font-weight: var(--font-weight-regular);
  color: var(--ns-stone);
}
/* NOTE: repeating-linear-gradient is a hatch TEXTURE on the empty
   state only — not a decorative background gradient. The no-
   gradients rule stands for brand surfaces. */

/* ---------- WhatsApp order button ----------
   Green appears exactly here and on the floating chat button —
   nowhere else on the site. The green means "order via WhatsApp"
   so it must never be spent on anything else. */
.btn--whatsapp .wa-icon { width: 20px; height: 20px; flex-shrink: 0; }
.wa-float {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ns-whatsapp);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
/* On product pages the quick-add bar owns the bottom — the float
   yields so the two green buttons never stack and fight. */
.has-quick-add .wa-float { bottom: 96px; }

/* ---------- Empty grid state ----------
   Designed, honest, and clearly temporary: dashed slot, no fake
   product name, no fake price. Empty is a state, not an error. */
.empty-state {
  border: 2px dashed var(--ns-sand);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  color: var(--ns-stone);
}
.empty-state__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  color: var(--ns-ink);
  font-size: var(--font-size-h3);
  margin: 0 0 var(--space-2);
}

/* ---------- Footer (minimal) ---------- */
.site-footer {
  background: var(--ns-coal);
  color: rgba(250, 246, 238, 0.8);
  margin-top: var(--space-8);
  padding: var(--space-6) 0 var(--space-8);
  font-size: var(--font-size-small);
}
.site-footer a { color: var(--ns-gold); }

/* ---------- Reduced motion ----------
   Impulse energy must never come at the cost of a shopper who
   gets motion-sick: kill the snap-smooth and lifts. */
@media (prefers-reduced-motion: reduce) {
  .new-drops { scroll-behavior: auto; }
  .product-card:hover { transform: none; }
  .btn:active { transform: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Visible focus (keyboard + switch users) ---------- */
:focus-visible {
  outline: 3px solid var(--ns-gold);
  outline-offset: 2px;
}
