/* Sweet Tooth Fossils — design system */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #171310;
  --bg2: #201a15;
  --card: #251e17;
  --line: #3a2f24;
  --cream: #f5ead9;
  --muted: #b8a88f;
  --gold: #d9a441;
  --gold2: #f0c46c;
  --green: #7fb069;
  --red: #e0655f;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: 'Fraunces', Georgia, serif; font-weight: 700; line-height: 1.15; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 28px; max-width: 640px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 19, 16, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 22px; padding: 14px 20px; max-width: 1120px; margin: 0 auto; }
.logo { font-family: 'Fraunces', serif; font-size: 1.35rem; font-weight: 700; }
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 18px; margin-left: 12px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--cream); }
.nav-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg2); font-size: 1.15rem; cursor: pointer;
}
.cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--gold); color: #171310; font-size: .72rem; font-weight: 700;
  border-radius: 999px; display: none; align-items: center; justify-content: center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--gold); color: #171310;
  font-weight: 700; border: none; border-radius: 999px;
  padding: 12px 26px; cursor: pointer; font-size: .95rem;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: var(--gold2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--cream);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--gold); background: transparent; }
.btn-small { padding: 8px 16px; font-size: .85rem; }
.btn-wide { width: 100%; margin-top: 10px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 68vh; display: flex; align-items: flex-end;
  background: url('../images/hero-fossils.jpg') center/cover no-repeat, var(--bg2);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(23,19,16,.94) 8%, rgba(23,19,16,.25) 55%, rgba(23,19,16,.35));
}
.hero-inner { position: relative; z-index: 1; padding: 80px 20px 56px; max-width: 1120px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 640px; }
.hero h1 em { color: var(--gold2); font-style: normal; }
.hero p { color: #e8dcc4; max-width: 560px; margin: 14px 0 26px; font-size: 1.08rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- trust bar ---------- */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 26px 0 0; }
.trust div {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-size: .9rem; color: var(--muted);
}
.trust strong { color: var(--cream); display: block; font-size: .95rem; }

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: #5a4a36; }
.card-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #2b241c; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.badge-rare { background: var(--gold); color: #171310; }
.badge-low { background: var(--red); color: #fff; top: auto; bottom: 10px; }
.card-media .badge-low { top: 42px; bottom: auto; }
.fav {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(23,19,16,.65); color: #fff; font-size: 1.1rem; line-height: 1;
}
.fav.active { color: #ff6b81; }
.card-body { padding: 16px; }
.card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-weight: 600; }
.card-title { font-weight: 600; font-size: 1.02rem; display: block; margin: 6px 0; }
.card-title:hover { color: var(--gold2); }
.card-meta { font-size: .85rem; margin-bottom: 10px; }
.stars { color: var(--gold2); letter-spacing: .1em; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-size: 1.25rem; font-weight: 700; font-family: 'Fraunces', serif; }
.empty { padding: 40px; text-align: center; color: var(--muted); grid-column: 1/-1; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cat-tile {
  border-radius: var(--radius); padding: 30px 24px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #2c2318, #1d1712); min-height: 150px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.cat-tile:hover { border-color: var(--gold); }
.cat-tile h3 { font-size: 1.3rem; }
.cat-tile p { color: var(--muted); font-size: .9rem; }

/* ---------- story / about preview ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.story img { border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } }

/* ---------- reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.review .stars { font-size: 1rem; }
.review p { margin: 10px 0; font-size: .95rem; }
.review .who { color: var(--muted); font-size: .85rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 30px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.foot-grid a { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.foot-grid a:hover { color: var(--cream); }
.foot-note { color: var(--muted); font-size: .82rem; margin-top: 30px; text-align: center; }

/* ---------- shop filters ---------- */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 24px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.filters input[type="search"], .filters select {
  background: var(--bg); border: 1px solid var(--line); color: var(--cream);
  border-radius: 999px; padding: 10px 16px; font-size: .9rem; font-family: inherit;
}
.filters input[type="search"] { flex: 1; min-width: 180px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 9px 16px; font-size: .85rem; cursor: pointer; font-weight: 600;
}
.chip.on { background: var(--gold); border-color: var(--gold); color: #171310; }

/* ---------- product page ---------- */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 40px 0; }
@media (max-width: 820px) { .pd { grid-template-columns: 1fr; } }
.pd-media img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.pd-info h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 8px 0; }
.pd-price { font-size: 2rem; font-family: 'Fraunces', serif; font-weight: 700; color: var(--gold2); margin: 12px 0; }
.pd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.specs { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .93rem; }
.specs th, .specs td { text-align: left; padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 38%; }
.promise {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; font-size: .9rem; color: var(--muted); margin-top: 18px;
}
.promise strong { color: var(--cream); }

/* ---------- cart ---------- */
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--cream); cursor: pointer; font-size: 1rem; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; padding: 20px 0; }
.fulfill { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
@media (max-width: 600px) { .fulfill { grid-template-columns: 1fr; } }
.fulfill label { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; display: block; }
.fulfill input { margin-right: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: .88rem; font-weight: 600; display: block; }
input, textarea, select {
  width: 100%; margin-top: 6px; background: var(--bg); border: 1px solid var(--line);
  color: var(--cream); border-radius: 10px; padding: 11px 14px; font-size: .95rem; font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.fineprint { font-size: .8rem; color: var(--muted); margin-top: 12px; }

/* ---------- modal ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; max-width: 460px; width: 100%; padding: 28px; position: relative; }
.modal h3 { margin-bottom: 8px; font-size: 1.4rem; }
.modal label { margin-top: 14px; }
.modal-x { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--gold); color: #171310; font-weight: 600; font-size: .92rem;
  padding: 12px 22px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 200; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- order success ---------- */
.success-box { text-align: center; padding: 60px 20px; max-width: 560px; margin: 0 auto; }
.success-box .big { font-size: 3.4rem; }
.success-box h1 { margin: 14px 0; }
.order-num { display: inline-block; background: var(--card); border: 1px dashed var(--gold); border-radius: 10px; padding: 10px 20px; font-weight: 700; letter-spacing: .06em; margin: 14px 0; }
