/* ============================================================
   Jerry's Watches — one stylesheet, no build step.
   Palette: warm ivory paper, ink text, brass accent.
   ============================================================ */

:root {
  --paper:   #f7f3ea;
  --paper-2: #efe9dc;
  --card:    #fffdf8;
  --ink:     #16130f;
  --ink-2:   #453e34;
  --muted:   #756c5e;
  --brass:   #9a7526;
  --brass-2: #c2a05a;
  --rule:    rgba(22, 19, 15, 0.13);
  --rule-2:  rgba(22, 19, 15, 0.07);
  --good:    #2f6b46;
  --warn:    #8a5a1c;
  --shadow:  0 1px 2px rgba(40,32,18,.05), 0 12px 32px -12px rgba(40,32,18,.16);
  --radius:  10px;
  --wrap:    1180px;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img, svg { max-width: 100%; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass); font-weight: 600; margin: 0 0 .8rem;
}
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ demo banner */
.demo-bar {
  background: #1d1913; color: #e8dcc0; font-size: .8rem; letter-spacing: .02em;
  text-align: center; padding: 8px 16px;
}
.demo-bar strong { color: var(--brass-2); }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247, 243, 234, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; letter-spacing: -.01em; }
.brand-sub {
  font-size: .62rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.nav { display: flex; gap: 22px; }
.nav a {
  text-decoration: none; font-size: .875rem; font-weight: 500; color: var(--ink-2);
  padding: 6px 0; border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--brass-2); }
.nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--brass); }

.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
  font: 500 .85rem/1 var(--sans); padding: 11px 16px; border-radius: 999px;
}
.cart-btn:hover { background: #2b241a; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brass-2); color: #1d1913;
  display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700;
}
.cart-count[data-empty='true'] { opacity: .35; }

.menu-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .9rem/1 var(--sans); padding: 14px 24px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2b241a; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-brass { background: var(--brass); color: #fffdf5; }
.btn-brass:hover { background: #85641d; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------- hero */
.hero { padding: 72px 0 40px; border-bottom: 1px solid var(--rule); }
.hero-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero h1 { margin-bottom: 1rem; }
.hero .lede { margin-bottom: 1.8rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art {
  position: relative; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 40%, var(--paper-2), transparent 68%);
}
.hero-art svg { max-height: 460px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 20px 28px; margin-top: 2.4rem; padding-top: 1.6rem;
  border-top: 1px solid var(--rule-2);
}
.hero-stats div strong { display: block; font-family: var(--serif); font-size: 1.55rem; line-height: 1.1; }
.hero-stats div span { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }

/* ------------------------------------------------------------- sections */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--rule-2); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 32px; flex-wrap: wrap;
}
.section-head p { margin: .5rem 0 0; }

/* ----------------------------------------------------------- product grid */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 24px;
}
.card {
  position: relative; background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(154,117,38,.45); }
.card-media {
  display: block; padding: 18px 18px 4px; background: linear-gradient(175deg, var(--paper-2), var(--card));
  text-decoration: none;
}
.card-media svg { display: block; width: 100%; height: 230px; }
.card-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.card-title { font-family: var(--serif); font-size: 1.28rem; line-height: 1.15; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ''; position: absolute; inset: 0; } /* whole card is the link */
.card-tag { font-size: .84rem; color: var(--muted); flex: 1; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--rule-2);
}
.price { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.card-add {
  position: relative; z-index: 2; /* sits above the full-card link */
  background: var(--ink); color: var(--paper); border: 0; border-radius: 7px;
  font: 600 .78rem/1 var(--sans); padding: 10px 14px; cursor: pointer;
}
.card-add:hover { background: var(--brass); }
.card-add.is-added { background: var(--good); }

.stock-pill {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; background: rgba(255,253,248,.92);
  border: 1px solid var(--rule); color: var(--warn);
}

/* -------------------------------------------------------------- filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  border: 1px solid var(--rule); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 8px 16px; font: 500 .85rem/1 var(--sans); cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.select {
  border: 1px solid var(--rule); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font: 500 .85rem/1 var(--sans);
}

/* -------------------------------------------------------- product detail */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 48px 0 24px; align-items: start; }
.pd-art {
  background: linear-gradient(170deg, var(--paper-2), var(--card));
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px;
  position: sticky; top: 96px;
}
.pd-art svg { display: block; width: 100%; max-height: 560px; }
.pd h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: .4rem; }
.pd-price { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; margin: 1rem 0 .25rem; }
.pd-buy { display: flex; gap: 12px; align-items: center; margin: 24px 0; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.qty button { background: var(--card); border: 0; width: 40px; height: 46px; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--paper-2); }
.qty input { width: 48px; height: 46px; border: 0; text-align: center; font: 600 1rem var(--sans); background: var(--card); color: var(--ink); }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--rule-2); vertical-align: top; font-size: .92rem; }
.spec-table th { width: 40%; font-weight: 500; color: var(--muted); }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; font-size: .84rem; color: var(--muted); }
.trust span::before { content: '✓ '; color: var(--good); font-weight: 700; }
.breadcrumb { font-size: .82rem; color: var(--muted); padding: 20px 0 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ cart drawer */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(22,19,15,.45); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: var(--paper); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid var(--rule);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--rule);
}
.drawer-head h2 { font-size: 1.4rem; }
.drawer-close { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.drawer-close:hover { color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer-foot { border-top: 1px solid var(--rule); padding: 20px 22px; background: var(--card); }
.line {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--rule-2); align-items: center;
}
.line-art { background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.line-art svg { display: block; width: 100%; height: 74px; }
.line-name { font-weight: 600; font-size: .9rem; line-height: 1.25; }
.line-brand { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.line-qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.line-qty button {
  width: 24px; height: 24px; border: 1px solid var(--rule); background: var(--card);
  border-radius: 5px; cursor: pointer; line-height: 1; color: var(--ink);
}
.line-qty button:hover { border-color: var(--ink); }
.line-price { font-weight: 600; text-align: right; white-space: nowrap; }
.line-remove { display: block; background: none; border: 0; color: var(--muted); font-size: .74rem; cursor: pointer; padding: 4px 0 0; margin-left: auto; text-decoration: underline; }
.line-remove:hover { color: #a33; }
.totals { display: grid; gap: 8px; margin-bottom: 16px; font-size: .92rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; padding-top: 10px; border-top: 1px solid var(--rule); }
.empty-cart { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-cart svg { width: 120px; opacity: .35; margin-bottom: 12px; }

/* ------------------------------------------------------------------ misc */
.band { background: var(--ink); color: #e9e2d4; }
.band .wrap { padding-top: 56px; padding-bottom: 56px; }
.band h2 { color: #fdfaf2; }
.band a { color: var(--brass-2); }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.col-item h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.col-item p { font-size: .92rem; color: inherit; opacity: .82; margin: 0; }

.brand-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.brand-tile {
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px;
  background: var(--card); text-decoration: none; display: block;
  transition: border-color .18s ease, transform .18s ease;
}
.brand-tile:hover { border-color: var(--brass); transform: translateY(-2px); }
.brand-tile h3 { font-size: 1.6rem; margin-bottom: .3rem; }
.brand-tile p { font-size: .88rem; color: var(--muted); margin: 0 0 .9rem; }
.brand-tile span { font-size: .8rem; font-weight: 600; color: var(--brass); }

.notice {
  border: 1px solid rgba(154,117,38,.35); background: rgba(194,160,90,.12);
  border-radius: 8px; padding: 14px 16px; font-size: .88rem; color: var(--ink-2);
}
.notice code {
  background: rgba(22,19,15,.08); padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em;
}

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-2); margin-top: 48px; }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 48px 24px 28px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}
.footer-inner h4 { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-inner a { font-size: .88rem; text-decoration: none; color: var(--ink-2); }
.footer-inner a:hover { color: var(--brass); }
.footer-bottom {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 24px 32px;
  border-top: 1px solid var(--rule); font-size: .78rem; color: var(--muted);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------------------------------------------------------------- states */
.result-page { max-width: 640px; margin: 0 auto; padding: 72px 24px 40px; text-align: center; }
.result-page .mark {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 24px; font-size: 1.9rem;
}
.mark-ok { background: rgba(47,107,70,.14); color: var(--good); }
.mark-no { background: rgba(138,90,28,.14); color: var(--warn); }
.order-box { text-align: left; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; margin: 28px 0; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px;
  font-size: .88rem; z-index: 120; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; }
  .hero-art svg { max-height: 320px; }
  .pd { grid-template-columns: 1fr; gap: 28px; }
  .pd-art { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px 24px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
  .menu-toggle { display: block; order: 3; }
  .header-inner { position: relative; gap: 12px; }
  .brand-sub { display: none; }
  .section { padding: 44px 0; }
  .hero { padding: 40px 0 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
