/* Nordhaus — modern commerce skin. Clean, neutral, editorial.
   Its own identity: warm-paper background, ink text, a single sage accent. */
:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #1a1a18;
  --ink-soft: #57534e;
  --line: #e7e2d9;
  --line-strong: #d6cfc2;
  --accent: #3f5f4f;      /* deep sage */
  --accent-ink: #2c463a;
  --accent-soft: #eef2ee;
  --danger: #a13a2a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(30,25,15,.04), 0 8px 24px rgba(30,25,15,.06);
  --shadow-sm: 0 1px 2px rgba(30,25,15,.05);
  --wrap: 1160px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* App is a flex column so the footer sticks to the bottom on short pages. */
#app { min-height: 100vh; display: flex; flex-direction: column; }
#app > * { flex: 0 0 auto; }
#app > .site-footer { margin-top: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 15px; transition: .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-danger-text { background: none; border: none; color: var(--danger); font-size: 13px; padding: 4px; }
.btn-danger-text:hover { text-decoration: underline; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,248,244,.86); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { font-family: Fraunces, serif; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { color: var(--ink-soft); font-size: 14.5px; font-weight: 450; }
.nav a:hover { color: var(--ink); }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { position: relative; background: none; border: none; padding: 6px; color: var(--ink); display: inline-flex; }
.cart-count {
  position: absolute; top: -3px; right: -5px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 600; min-width: 17px; height: 17px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.header-link { font-size: 14.5px; color: var(--ink-soft); }
.header-link:hover { color: var(--ink); }

/* ---- Hero ---- */
.hero { padding: 68px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 58px; margin-bottom: 18px; }
.hero p { font-size: 18px; color: var(--ink-soft); max-width: 42ch; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; }
.hero-art {
  aspect-ratio: 4/3; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(135deg, #e9efe9, #dfe7ea 60%, #efe7dd);
  display: flex; align-items: center; justify-content: center;
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }

/* ---- Section headers ---- */
.section { padding: 40px 0 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 26px; }
.section-head h2 { font-size: 30px; }
.section-head p { color: var(--ink-soft); margin: 4px 0 0; font-size: 15px; }

/* ---- Product grid ---- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-art { aspect-ratio: 1/1; position: relative; }
.card-art svg { width: 100%; height: 100%; }
.card-tag {
  position: absolute; top: 12px; left: 12px; background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em;
}
.card-tag.new { background: var(--accent); }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); font-weight: 600; }
.card-name { font-family: Fraunces, serif; font-size: 19px; font-weight: 500; }
.card-blurb { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin: 4px 0 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { font-weight: 600; font-size: 17px; }

/* ---- Product detail ---- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 44px 0 72px; }
.pdp-art { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1/1; }
.pdp-art svg { width: 100%; height: 100%; }
.pdp-info h1 { font-size: 42px; margin: 10px 0 8px; }
.pdp-price { font-size: 26px; font-weight: 600; margin: 18px 0; }
.pdp-blurb { font-size: 17px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 26px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; margin-right: 12px; }
.qty button { background: none; border: none; width: 40px; height: 44px; font-size: 18px; color: var(--ink); }
.qty span { width: 40px; text-align: center; font-weight: 500; }
.pdp-meta { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 12px; }
.pdp-meta div { display: flex; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.pdp-meta strong { color: var(--ink); font-weight: 500; min-width: 110px; }

/* ---- Cart / checkout / account shared layout ---- */
.page { padding: 44px 0 80px; }
.page > h1 { font-size: 38px; margin-bottom: 8px; }
.page-sub { color: var(--ink-soft); margin: 0 0 30px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px){ .two-col { grid-template-columns: 1fr; } }

.line-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line-thumb { width: 74px; height: 74px; border-radius: 10px; overflow: hidden; }
.line-thumb svg { width: 100%; height: 100%; }
.line-name { font-family: Fraunces, serif; font-size: 17px; }
.line-sub { color: var(--ink-soft); font-size: 13px; }
.line-price { font-weight: 600; text-align: right; }

.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.summary h3 { font-family: Inter, sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); font-weight: 600; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; color: var(--ink-soft); }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; color: var(--ink); font-weight: 600; font-size: 19px; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }

/* ---- Auth pages ---- */
.auth-wrap { max-width: 420px; margin: 60px auto; padding: 0 24px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 30px; margin-bottom: 6px; text-align: center; }
.auth-card .page-sub { text-align: center; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
  font-weight: 500; font-size: 15px; color: var(--ink);
}
.google-btn:hover { border-color: var(--ink); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 13px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-alt { text-align: center; font-size: 14px; color: var(--ink-soft); margin-top: 20px; }
.auth-alt a { color: var(--accent); font-weight: 500; }
.form-error { background: #fdece9; color: var(--danger); border: 1px solid #f3c9c0; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }

/* ---- Account dashboard ---- */
.acct-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.acct-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.acct-tab { padding: 12px 18px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--ink-soft); font-size: 15px; font-weight: 500; margin-bottom: -1px; }
.acct-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.order-top { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.order-id { font-family: Fraunces, serif; font-size: 18px; }
.order-meta { font-size: 13px; color: var(--ink-soft); }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; text-transform: capitalize; }
.order-lines { display: grid; gap: 8px; font-size: 14px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 14px; }
.order-lines .ol { display: flex; justify-content: space-between; }
.addr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.addr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; }
.addr-card .badge { margin-bottom: 10px; }
.addr-card p { margin: 2px 0; font-size: 14px; color: var(--ink-soft); }
.addr-card .addr-name { color: var(--ink); font-weight: 500; }

/* ---- Confirmation ---- */
.confirm { max-width: 640px; margin: 0 auto; text-align: center; padding: 60px 24px 80px; }
.confirm-check { width: 68px; height: 68px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.confirm h1 { font-size: 36px; margin-bottom: 10px; }
.confirm .oid { font-family: Fraunces, serif; font-size: 20px; margin: 18px 0; }
.confirm-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: left; margin: 28px 0; box-shadow: var(--shadow-sm); }

/* ---- Empty states ---- */
.empty { text-align: center; padding: 70px 20px; color: var(--ink-soft); }
.empty h2 { font-size: 24px; color: var(--ink); margin-bottom: 8px; }
.empty p { margin-bottom: 22px; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0; color: var(--ink-soft); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-note { font-size: 12.5px; opacity: .8; max-width: 60ch; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 999px; font-size: 14.5px;
  font-weight: 450; box-shadow: 0 8px 30px rgba(0,0,0,.22); opacity: 0; pointer-events: none;
  transition: .25s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Demo ribbon ---- */
.demo-ribbon {
  background: var(--accent-ink); color: #fff; text-align: center; font-size: 12.5px; padding: 7px 16px; letter-spacing: .01em;
}
.demo-ribbon a { text-decoration: underline; opacity: .9; }

/* ---- Responsive ---- */
@media (max-width: 960px){ .grid { grid-template-columns: repeat(2, 1fr); } .hero-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 44px; } .pdp { grid-template-columns: 1fr; gap: 30px; } }
@media (max-width: 560px){ .grid { grid-template-columns: 1fr; } .nav { display: none; } .row-2, .row-3 { grid-template-columns: 1fr; } .hero h1 { font-size: 38px; } }

/* Shop filter pills */
.shop-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 28px; }
.shop-pill {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--ink-soft); font-size: 14px; font-weight: 500; background: #fff;
  transition: all .15s ease;
}
.shop-pill:hover { border-color: var(--ink); color: var(--ink); }
.shop-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
