/* Styles for the server-rendered product pages (src/seo.js).
   Kept separate from style.css so the single-page storefront is untouched, but it
   reuses the same palette and fonts so a page opened from Google still looks like
   AFROMART. Served under `style-src 'self' https://fonts.googleapis.com`. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #2a1414;
  --muted: #7d5656;
  --clay: #c0192b;
  --clay-deep: #7f0d18;
  --ochre: #e0a12f;
  --gold: #f4cf7a;
  --green: #3c6b45;
  --cream: #fdeeee;
  --paper: #fff8f8;
  --sand: #f7dcdc;
  --line: #f0c9c9;
  --shadow: 0 16px 34px rgb(120 12 24 / 14%);
  --shadow-sm: 0 6px 16px rgb(120 12 24 / 10%);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font: 15px/1.6 var(--sans);
}

a { color: inherit; text-decoration: none; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 5vw, 48px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--clay);
}

.back {
  font-weight: 600;
  color: var(--clay-deep);
  border-bottom: 2px solid var(--gold);
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(20px, 5vw, 56px) clamp(16px, 5vw, 48px);
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

@media (min-width: 760px) {
  .page { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

.photo {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(150deg, #f6d9d9, #eec3c3);
  box-shadow: var(--shadow);
}

.photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

.crumbs { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.crumbs a { border-bottom: 1px solid var(--line); }

.info h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px;
}

.rating { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.stars { color: var(--ochre); letter-spacing: 2px; font-size: 16px; }

.price {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--clay-deep);
  margin: 0 0 6px;
}

.stock { margin: 0 0 18px; font-weight: 600; font-size: 14px; }
.stock.in { color: var(--green); }
.stock.out { color: var(--clay); }

.desc { margin: 0 0 18px; color: var(--ink); max-width: 60ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 22px; padding: 0; }
.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sand);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--clay-deep);
}

.cta {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

.cta:hover { background: var(--clay-deep); }
.cta.disabled { background: var(--muted); cursor: not-allowed; }

.note { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.related {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 48px) clamp(24px, 5vw, 48px);
}

.related h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 26px);
  margin: 0 0 16px;
}

.related ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  height: 100%;
}

.related a:hover { border-color: var(--clay); box-shadow: var(--shadow-sm); }
.related img { border-radius: 10px; object-fit: cover; flex: none; }
.related span { font-weight: 600; font-size: 14px; }
.related strong { margin-left: auto; color: var(--clay-deep); font-size: 14px; }

.foot {
  padding: 24px clamp(16px, 5vw, 48px);
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.foot a { font-weight: 700; color: var(--clay); }

/* ---------- Consent banner (injected by public/tracking.js) ---------- */
/* Product pages do not load style.css, so the banner needs its own copy here.
   Keep these rules in sync with the consent block in style.css. */
.consent-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 1200;
  padding: 16px max(16px, calc((100vw - 1176px) / 2));
  background: rgb(20 12 12 / 96%);
  color: #fdf4f4;
  box-shadow: 0 -10px 30px rgb(0 0 0 / 25%);
}
.consent-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  max-width: 1176px;
  margin: 0 auto;
}
.consent-text { flex: 1 1 420px; min-width: 0; }
.consent-title { display: block; margin-bottom: 4px; font: 600 16px var(--serif); color: var(--gold); }
.consent-body { margin: 0; color: #f0dada; font-size: 12px; line-height: 1.55; }
.consent-links { margin: 6px 0 0; font-size: 11px; }
.consent-links a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-actions button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.consent-accept { background: var(--gold); color: var(--ink); }
.consent-accept:hover, .consent-accept:focus-visible { background: #ffe4a3; }
.consent-essential { background: transparent; border-color: rgb(244 207 122 / 55%); color: #f4ecdf; }
.consent-essential:hover, .consent-essential:focus-visible { border-color: var(--gold); }

@media (max-width: 720px) {
  .consent-inner { flex-direction: column; align-items: stretch; }
  .consent-actions { justify-content: flex-end; }
}
