/* ==================================================================
   Valentine Shop — Site stylesheet
   Tokens inlined with real values (source: Valentine Shop Design
   System project), plain CSS custom properties — no framework.
   ================================================================== */

/* ---------------------------------------------------------------
   TOKENS — Color
   --------------------------------------------------------------- */
:root {
  /* Brand ramp: Crimson (primary) */
  --crimson-50:  #FDEBF0;
  --crimson-100: #FBD3DE;
  --crimson-200: #F5A9BF;
  --crimson-300: #EE7B9C;
  --crimson-400: #E2507C;
  --crimson-500: #D22E5B;
  --crimson-600: #B41E4A;
  --crimson-700: #8F1539;
  --crimson-800: #6C0F2B;
  --crimson-900: #4A0A1E;

  /* Wine ink ramp */
  --wine-900: #2A0A15;
  --wine-800: #3B0D1E;
  --wine-700: #521229;
  --wine-600: #6E1338;

  /* Champagne gold */
  --gold-100: #F6ECD6;
  --gold-200: #EBD6A9;
  --gold-300: #DBBB79;
  --gold-400: #C79A4E;
  --gold-500: #A87C36;
  --gold-600: #866026;

  /* Warm neutrals */
  --paper:     #FFF7F2;
  --paper-2:   #FBEDE6;
  --cream-100: #F4E7DF;
  --cream-200: #E9D7CC;
  --sand-300:  #D8C2B5;
  --taupe-400: #B29A8D;
  --taupe-500: #8A7266;
  --taupe-600: #635049;
  --ink-700:   #40332E;
  --ink-800:   #2C221E;
  --white:     #FFFFFF;

  /* Semantic status */
  --sage-500:   #5E8C6A;
  --sage-50:    #E7F0E9;
  --amber-500:  #C98A1E;
  --amber-50:   #FBF0DA;
  --ruby-500:   #C22733;
  --ruby-50:    #FBE4E5;
  --mauve-500:  #8A5A86;
  --mauve-50:   #F1E7F0;

  /* Semantic aliases */
  --surface-app:      var(--paper);
  --surface-raised:   var(--white);
  --surface-sunken:   var(--paper-2);
  --surface-card:     var(--white);
  --surface-inverse:  var(--wine-800);
  --surface-blush:    var(--crimson-50);
  --surface-gold:     var(--gold-100);

  --text-strong:    var(--wine-900);
  --text-body:      var(--ink-700);
  --text-muted:     var(--taupe-500);
  --text-subtle:    var(--taupe-400);
  --text-inverse:   var(--paper);
  --text-brand:     var(--crimson-600);
  --text-on-brand:  #FFFFFF;
  --text-gold:      var(--gold-600);

  --brand:          var(--crimson-500);
  --brand-hover:    var(--crimson-600);
  --brand-active:   var(--crimson-700);
  --brand-subtle:   var(--crimson-50);
  --brand-border:   var(--crimson-200);

  --accent:         var(--gold-400);
  --accent-hover:   var(--gold-500);
  --accent-subtle:  var(--gold-100);

  --border-soft:    var(--cream-200);
  --border-default: var(--sand-300);
  --border-strong:  var(--taupe-400);
  --border-brand:   var(--crimson-300);

  --success:        var(--sage-500);
  --success-subtle: var(--sage-50);
  --warning:        var(--amber-500);
  --warning-subtle: var(--amber-50);
  --danger:         var(--ruby-500);
  --danger-subtle:  var(--ruby-50);
  --info:           var(--mauve-500);
  --info-subtle:    var(--mauve-50);

  --focus-ring:     var(--crimson-400);

  /* ---------------------------------------------------------------
     TOKENS — Typography
     --------------------------------------------------------------- */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-sans:    'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-script:  'Ephesis', 'Snell Roundhand', 'Brush Script MT', cursive;
  --font-mono:    'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --fw-light:     300;
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  --text-display-xl: 88px;
  --text-display-l:  64px;
  --text-display-m:  48px;
  --text-h1:         40px;
  --text-h2:         32px;
  --text-h3:         26px;
  --text-h4:         21px;
  --text-body-lg:    19px;
  --text-body:       17px;
  --text-body-sm:    15px;
  --text-caption:    13px;
  --text-micro:      11px;

  --lh-tight:   1.05;
  --lh-snug:    1.2;
  --lh-normal:  1.5;
  --lh-relaxed: 1.65;

  --ls-tightest: -0.02em;
  --ls-tight:    -0.01em;
  --ls-normal:   0;
  --ls-wide:     0.04em;
  --ls-wider:    0.14em;

  --role-display:   var(--fw-medium) var(--text-display-l)/var(--lh-tight) var(--font-display);
  --role-h1:        var(--fw-semibold) var(--text-h1)/var(--lh-snug) var(--font-display);
  --role-h2:        var(--fw-semibold) var(--text-h2)/var(--lh-snug) var(--font-display);
  --role-body:      var(--fw-regular) var(--text-body)/var(--lh-relaxed) var(--font-sans);
  --role-label:     var(--fw-bold) var(--text-caption)/1 var(--font-mono);

  /* ---------------------------------------------------------------
     TOKENS — Spacing, radius, shadow, motion, layout
     --------------------------------------------------------------- */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   28px;
  --radius-2xl:  40px;
  --radius-pill: 999px;

  --shadow-xs:  0 1px 2px rgba(59, 13, 30, 0.06);
  --shadow-sm:  0 2px 6px rgba(59, 13, 30, 0.08);
  --shadow-md:  0 8px 20px rgba(59, 13, 30, 0.10);
  --shadow-lg:  0 18px 44px rgba(59, 13, 30, 0.14);
  --shadow-xl:  0 30px 70px rgba(59, 13, 30, 0.18);
  --shadow-brand: 0 10px 28px rgba(210, 46, 91, 0.28);
  --shadow-inset: inset 0 1px 2px rgba(59, 13, 30, 0.10);

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft:  cubic-bezier(0.34, 1.3, 0.64, 1);
  --dur-fast:   140ms;
  --dur-base:   220ms;
  --dur-slow:   380ms;

  --container-narrow: 720px;
  --container:        1080px;
  --container-wide:   1320px;
  --gutter:           24px;

  --ring-width: 3px;
  --ring: 0 0 0 var(--ring-width) rgba(226, 80, 124, 0.45);
}

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

html, body { margin: 0; }

body {
  background: var(--surface-app);
  color: var(--text-body);
  font: var(--role-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.4em;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p { margin: 0 0 1em; }

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

a {
  color: var(--text-brand);
  text-decoration-color: var(--brand-border);
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--brand-active); text-decoration-color: currentColor; }

.vs-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-brand);
}

.vs-script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--text-brand);
  line-height: 1;
}

::selection { background: var(--crimson-200); color: var(--wine-900); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-xs);
}

.vs-container { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------
   HEADER / NAV
   --------------------------------------------------------------- */
.vs-header { background: var(--paper); border-bottom: 1px solid var(--border-soft); }
.vs-header__logo-row { text-align: center; padding: 26px 32px 18px; }
.vs-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.vs-logo svg { stroke: var(--brand); }
.vs-logo__script { font-family: var(--font-script); font-size: 52px; color: var(--text-brand); line-height: .6; }
.vs-logo__word { font-family: var(--font-display); font-weight: 600; font-size: 30px; color: var(--text-strong); letter-spacing: .02em; }

.vs-nav {
  display: flex; justify-content: center; align-items: center; gap: 34px;
  padding: 14px 32px; border-top: 1px solid var(--gold-200); border-bottom: 1px solid var(--gold-200);
}
.vs-nav a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-body); text-decoration: none;
}
.vs-nav a:hover, .vs-nav a[aria-current="page"] { color: var(--text-brand); }

.vs-nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  position: absolute; right: 20px; top: 22px;
}
.vs-nav-toggle svg { width: 26px; height: 26px; stroke: var(--text-strong); }
.vs-header__logo-row { position: relative; }

/* ---------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------- */
.vs-footer { background: var(--wine-900); color: var(--cream-200); text-align: center; padding: 52px 32px 36px; margin-top: 44px; }
.vs-footer__logo { font-family: var(--font-script); font-size: 44px; color: var(--gold-300); }
.vs-footer__word { font-family: var(--font-display); font-size: 26px; color: var(--paper); font-weight: 600; }
.vs-footer__meta {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 22px; padding-top: 20px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--taupe-400);
}
.vs-footer__link { margin-top: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; }
.vs-footer__link a { color: var(--gold-300); text-decoration: none; }
.vs-footer__link a:hover { color: var(--paper); text-decoration: underline; }

/* ---------------------------------------------------------------
   COMPONENT — Breadcrumb
   --------------------------------------------------------------- */
.vs-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 20px; }
.vs-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.vs-breadcrumb a:hover { color: var(--text-brand); }
.vs-breadcrumb__sep { color: var(--border-strong); }
.vs-breadcrumb__current { color: var(--text-strong); font-weight: var(--fw-bold); }

/* ---------------------------------------------------------------
   COMPONENT — Button
   --------------------------------------------------------------- */
.vs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: var(--fw-bold); border-radius: var(--radius-pill);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out);
}
.vs-btn--sm { font-size: 13px; padding: 8px 18px; }
.vs-btn--md { font-size: 15px; padding: 12px 26px; }
.vs-btn--lg { font-size: 16px; padding: 15px 32px; }
.vs-btn--full { width: 100%; }

.vs-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); box-shadow: var(--shadow-brand); }
.vs-btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--text-on-brand); }
.vs-btn--secondary { background: transparent; border-color: var(--brand); color: var(--text-brand); }
.vs-btn--secondary:hover { background: var(--brand-subtle); color: var(--text-brand); }
.vs-btn--ghost { background: transparent; border-color: transparent; color: var(--text-body); }
.vs-btn--ghost:hover { color: var(--text-brand); }
.vs-btn--gold { background: var(--accent); border-color: var(--accent); color: var(--wine-900); }
.vs-btn--gold:hover { background: var(--accent-hover); }
.vs-btn--inverse { background: var(--wine-800); border-color: var(--wine-800); color: var(--paper); }
.vs-btn--inverse:hover { background: var(--wine-700); }
.vs-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------
   COMPONENT — Badge
   --------------------------------------------------------------- */
.vs-badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px;
  font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px;
  border-radius: var(--radius-pill);
}
.vs-badge--sale { background: var(--danger-subtle); color: var(--danger); }
.vs-badge--gold { background: var(--gold-100); color: var(--text-gold); }
.vs-badge--brand { background: var(--brand-subtle); color: var(--text-brand); }
.vs-badge--success { background: var(--success-subtle); color: var(--success); }
.vs-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------
   COMPONENT — Rating (heart motif)
   --------------------------------------------------------------- */
.vs-rating { display: inline-flex; align-items: center; gap: 6px; }
.vs-rating__hearts { display: inline-flex; gap: 2px; color: var(--brand); }
.vs-rating__hearts svg { width: 14px; height: 14px; }
.vs-rating__count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* ---------------------------------------------------------------
   COMPONENT — ProductCard
   --------------------------------------------------------------- */
.vs-product-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; position: relative; }
.vs-product-card__image { aspect-ratio: 1/1; border-radius: var(--radius-md); background: var(--surface-blush); border: 1.5px solid var(--brand-border); overflow: hidden; }
.vs-product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.vs-product-card__badge { position: absolute; top: 10px; left: 10px; }
.vs-product-card__category { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.vs-product-card__title { font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-bold); color: var(--text-strong); }
.vs-product-card__price-row { display: flex; align-items: center; gap: 8px; }
.vs-product-card__price { font-family: var(--font-mono); font-size: 16px; font-weight: var(--fw-bold); color: var(--text-strong); }
.vs-product-card__compare-at { font-family: var(--font-mono); font-size: 13px; color: var(--text-subtle); text-decoration: line-through; }
.vs-product-card--unavailable { opacity: .5; pointer-events: none; }
.vs-product-card__unavailable-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); background: rgba(255,247,242,.75); border-radius: var(--radius-md);
}

.vs-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.vs-product-grid--3col { grid-template-columns: repeat(3, 1fr); }

/* ---------------------------------------------------------------
   COMPONENT — Gift promo block (separate from Zazzle zstore grid,
   which renders its own float-based markup incompatible with our grid)
   --------------------------------------------------------------- */
.vs-gift-promo { padding: 56px 0 0; }
.vs-gift-promo__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.vs-gift-promo__item { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.vs-gift-promo__img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-md); border: 1.5px solid var(--brand-border); }
.vs-gift-promo__title { font-family: var(--font-sans); font-size: 14px; font-weight: var(--fw-bold); color: var(--text-strong); }
.vs-gift-promo__item:hover .vs-gift-promo__title { color: var(--text-brand); }
.vs-gift-promo__disclosure { font-family: var(--font-mono); font-size: 11px; color: var(--text-subtle); text-align: center; margin: 20px 0 0; }

/* ---------------------------------------------------------------
   COMPONENT — QuantityStepper
   --------------------------------------------------------------- */
.vs-qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--border-default); border-radius: var(--radius-pill); overflow: hidden; }
.vs-qty-stepper button { background: var(--surface-raised); border: none; width: 38px; height: 38px; font-family: var(--font-mono); font-size: 16px; color: var(--text-strong); cursor: pointer; }
.vs-qty-stepper button:hover { background: var(--brand-subtle); color: var(--text-brand); }
.vs-qty-stepper__value { width: 40px; text-align: center; font-family: var(--font-mono); font-size: 15px; color: var(--text-strong); }

/* ---------------------------------------------------------------
   ZAZZLE FEED SKIN — best-effort CSS restyle of zstore.php's fixed
   output markup (.gridCell / .productTitle / .productDescription /
   .productPrice). We do not rewrite zstore.php's HTML, only skin it
   to approximate the ProductCard visual target.
   --------------------------------------------------------------- */
.allGrids { width: 100%; }
.centerGrids { display: flex; flex-wrap: wrap; gap: 28px; margin: 0 auto; max-width: 100%; }
.gridCell {
  width: auto !important; margin: 0 !important; background: var(--surface-raised);
  border-radius: var(--radius-md); border: 1.5px solid var(--brand-border); padding: 10px;
  box-shadow: var(--shadow-sm); flex: 1 1 240px; max-width: 260px;
}
.gridCell .realviewLink { display: block; aspect-ratio: 1/1; height: auto !important; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-blush); }
.gridCell img.realviewImage { width: 100%; height: 100%; object-fit: cover; border: none !important; }
.gridCellInfo { padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.gridCellInfo a.productTitle { font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-bold); color: var(--text-strong); text-decoration: none; width: auto !important; }
.gridCellInfo .productDescription { display: none; }
.gridCellInfo a.productPrice { font-family: var(--font-mono); font-size: 16px; font-weight: var(--fw-bold); color: var(--text-strong); text-decoration: none; }
.count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); text-align: center; margin: 24px 0; }
.count a { color: var(--text-muted); margin: 0 4px; text-decoration: none; }
.count a:hover, .count span.current strong { color: var(--text-brand); }
.clearMe { clear: both; }
.error { font-family: var(--font-sans); color: var(--danger); text-align: center; padding: 40px; }

/* ---------------------------------------------------------------
   PHOTOGRAPHY HERO / TILE
   --------------------------------------------------------------- */
.vs-photo-placeholder {
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
  background: var(--wine-800);
}
.vs-photo-placeholder__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.vs-photo-placeholder::before {
  content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(42,10,21,.72), rgba(42,10,21,.2));
}
.vs-photo-placeholder__label {
  position: absolute; bottom: 16px; right: 22px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,247,242,.6); z-index: 2;
}
.vs-photo-placeholder--tile { aspect-ratio: 4/5; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.vs-photo-placeholder--tile:hover { box-shadow: var(--shadow-lg); }
.vs-photo-placeholder > div { position: relative; z-index: 2; }

/* ---------------------------------------------------------------
   MOBILE RESPONSIVENESS
   (breakpoints per Mobile Responsiveness — Developer Spec.md:
   desktop 1280+, tablet 768–1279, mobile <768)
   --------------------------------------------------------------- */
@media (max-width: 1279px) {
  .vs-product-grid { grid-template-columns: repeat(2, 1fr); }
  .vs-shop-layout { grid-template-columns: 1fr !important; }
  .vs-shop-layout__sidebar { order: -1; }
}

@media (max-width: 767px) {
  .vs-nav-toggle { display: block; }
  .vs-nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 0;
    border: none;
  }
  .vs-nav.is-open { display: flex; }
  .vs-nav a { padding: 14px 24px; min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--border-soft); }
  .vs-logo__script { font-size: 32px; }
  .vs-logo__word { font-size: 18px; }

  h1 { font-size: 36px; }
  .vs-hero__title { font-size: 36px !important; }
  .vs-btn--hero { width: 100%; }

  .vs-home-tiles { grid-template-columns: 1fr !important; }
  .vs-product-grid { grid-template-columns: 1fr; }

  .vs-newsletter-form { flex-direction: column; }
  .vs-newsletter-form input, .vs-newsletter-form button { width: 100%; }

  .vs-shop-layout { grid-template-columns: 1fr !important; }
  .vs-filters-bar { display: block; }
  .vs-pagination a, .vs-pagination span { min-width: 40px; min-height: 40px; }

  .vs-product-detail { grid-template-columns: 1fr !important; }
  .vs-qty-stepper button { width: 44px; height: 44px; }
  .vs-btn--pdp { width: 100%; min-height: 44px; }

  .vs-article-layout { grid-template-columns: 1fr !important; }
  .vs-article-layout__sidebar { order: 2; }
  .vs-hero__title--article { font-size: 32px !important; }
  .vs-dropcap { font-size: 48px !important; }
  .vs-article-body { font-size: 16px !important; }

  .gridCell { max-width: 100%; flex: 1 1 100%; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .vs-home-tiles { grid-template-columns: repeat(1, 1fr); }
}
