:root {
  --bg: #faf6f1;
  --bg-2: #f3ebe2;
  --ink: #1f1a17;
  --ink-2: #5a4f48;
  --line: #e6dcd0;
  --accent: #8b1a1a;
  --accent-2: #b13b3b;
  --gold: #c9a96a;
  --ok: #2f7d3e;
  --err: #9a1f1f;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(31,26,23,.04), 0 8px 24px rgba(31,26,23,.06);
  --max: 1200px;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a.text-link:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 44px; }
h2 { font-size: 30px; }
h3 { font-size: 20px; font-family: var(--font); font-weight: 600; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section-tight { padding: 24px 0; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.right { text-align: right; }
.center { text-align: center; }
hr.divider { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

/* announcement bar */
.announce {
  background: var(--ink); color: #fff;
  font-size: 12.5px; letter-spacing: .04em;
  padding: 8px 16px; text-align: center;
}
.announce strong { color: var(--gold); }

/* navbar */
.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
}
.brand {
  font-family: var(--serif);
  font-size: 24px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.brand .dot { color: var(--accent); }
.nav-links {
  display: flex; gap: 22px; flex: 1;
  font-size: 14px; font-weight: 500;
}
.nav-links a { color: var(--ink-2); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-search {
  flex: 1; max-width: 380px;
  display: flex; align-items: center;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  transition: border-color .15s;
}
.nav-search:focus-within { border-color: var(--ink); }
.nav-search input {
  border: none; background: transparent; outline: none;
  width: 100%; font-size: 14px; color: var(--ink);
}
.nav-actions { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.nav-actions a { color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.nav-actions a:hover { color: var(--ink); }
.cart-pill {
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: 4px 10px;
  font-size: 12px; min-width: 24px; text-align: center;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .05s, background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* hero */
.hero {
  background: linear-gradient(135deg, #f6e8de 0%, #efd9c9 60%, #ead0bd 100%);
  border-radius: var(--radius);
  margin: 24px 0 0;
  padding: 56px 40px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px;
  align-items: center;
  overflow: hidden; position: relative;
}
.hero h1 { font-size: 56px; margin-bottom: 16px; }
.hero p { font-size: 17px; color: var(--ink-2); max-width: 480px; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 24px; }
.hero-art {
  position: relative; min-height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.hero-art .blob {
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f6c9b4 60%, #c98273 100%);
  box-shadow: 0 30px 80px rgba(139,26,26,.15), inset 0 -30px 60px rgba(139,26,26,.18);
}

/* product card grid */
.grid { display: grid; gap: 24px; }
.grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 32px 24px; }
  .hero h1 { font-size: 36px; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .pic {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
}
.card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card .body .name { font-weight: 600; font-size: 14.5px; }
.card .body .cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.card .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.card .price { font-weight: 600; font-size: 16px; }
.card .rating { color: var(--gold); font-size: 12px; }
.badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--ink); color: #fff;
}
.badge.new { background: var(--ok); }
.badge.best { background: var(--accent); }
.badge.sale { background: var(--gold); color: var(--ink); }

/* category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; padding: 8px 14px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid transparent;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px; outline: none;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31,26,23,.06);
}
.field textarea { min-height: 110px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }

.alert {
  border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13.5px;
  margin-bottom: 14px;
}
.alert.error { background: #fbe9e9; color: var(--err); border: 1px solid #f1c2c2; }
.alert.ok { background: #e6f3e9; color: var(--ok); border: 1px solid #bcdec3; }
.alert.info { background: #fff5e0; color: #8a6d2a; border: 1px solid #f0d9a3; }

/* auth panel */
.auth-wrap {
  max-width: 460px; margin: 60px auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow);
}
.auth-wrap h2 { text-align: center; margin-bottom: 4px; }
.auth-wrap .sub { text-align: center; color: var(--ink-2); margin-bottom: 22px; font-size: 14px; }

/* product detail */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 800px) { .pdp { grid-template-columns: 1fr; } }
.pdp .pic-large {
  aspect-ratio: 1/1;
  background: var(--bg-2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.pdp h1 { font-size: 38px; margin-top: 8px; }
.pdp .price-large { font-size: 26px; font-weight: 600; margin: 16px 0; }
.pdp .qty {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pdp .qty button { border: none; background: transparent; font-size: 18px; padding: 8px 14px; cursor: pointer; }
.pdp .qty input { border: none; width: 48px; text-align: center; font-size: 15px; outline: none; background: transparent; }
.pdp .meta { font-size: 13px; color: var(--ink-2); margin-top: 16px; }
.pdp .add-row { display: flex; gap: 12px; align-items: center; margin-top: 24px; }

/* cart */
.cart-line {
  display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 16px;
  align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-line .pic { width: 80px; height: 80px; background: var(--bg-2); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.cart-line .qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cart-line .qty button { border: none; background: transparent; padding: 4px 10px; cursor: pointer; }
.cart-line .qty input { border: none; width: 40px; text-align: center; outline: none; background: transparent; }
.cart-line .rm { background: transparent; border: none; color: var(--ink-2); cursor: pointer; font-size: 13px; }
.cart-line .rm:hover { color: var(--accent); }

.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.summary .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary .total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; font-size: 16px; font-weight: 700; }

.layout-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
@media (max-width: 960px) { .layout-2 { grid-template-columns: 1fr; } }

/* checkout */
.section-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.section-card h3 { margin-top: 0; }

/* footer */
footer.foot {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 40px 0 24px;
  font-size: 14px;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin-bottom: 12px; font-family: var(--font); }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.foot ul li a:hover { color: var(--ink); }
.foot .legal { color: var(--ink-2); margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; }

/* svg product visuals */
.svg-prod { width: 70%; height: 70%; max-width: 280px; }

/* utility */
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.mb-0 { margin-bottom: 0; }
.mt-24 { margin-top: 24px; }
.mt-12 { margin-top: 12px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--ink);
  animation: spin .7s linear infinite;
  display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
