/* ===== Colours & basics — change these to restyle the whole site ===== */
:root {
  --bg: #faf8f5;
  --card: #ffffff;
  --text: #1f1d1a;
  --muted: #6b665e;
  --accent: #d9480f;
  --accent-dark: #b23c0c;
  --border: #e8e3dc;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

/* ===== Navigation links ===== */
.site-nav {
  display: flex;
  gap: 0.25rem;
}
.site-nav a {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { color: var(--text); background: #efe9e1; }
/* The page you're on gets highlighted (set with aria-current="page" in each HTML file) */
.site-nav a[aria-current="page"] { color: var(--text); background: #efe9e1; }

/* On phones, the nav links drop onto their own row under the logo */
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; row-gap: 0.6rem; }
  .site-nav { order: 3; width: 100%; justify-content: center; }
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.cart-count {
  background: var(--accent);
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.85rem;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}
.hero p { color: var(--muted); margin: 0; font-size: 1.1rem; }

/* ===== Products ===== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-image {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #f1e6d8, #e9d3c0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }

.product-info { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-info h3 { margin: 0; font-size: 1.05rem; }
.product-info p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1; }
.product-price { font-weight: 700; font-size: 1.1rem; }

.primary-button {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { background: #c9c3bb; cursor: not-allowed; }

.loading, .error { grid-column: 1 / -1; text-align: center; color: var(--muted); }

/* ===== Cart drawer ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: var(--card);
  z-index: 30;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden; /* fully hidden when closed (no shadow peeking out) */
  transition: transform 0.25s ease, visibility 0.25s;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
}
.cart-drawer.open { transform: translateX(0); visibility: visible; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cart-header h2 { margin: 0; font-size: 1.2rem; }

.icon-button {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.cart-items {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.cart-items .empty { color: var(--muted); text-align: center; padding: 2rem 0; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-name { font-weight: 600; }
.cart-item-price { color: var(--muted); font-size: 0.9rem; }

.qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.cart-footer { padding: 1.25rem; border-top: 1px solid var(--border); }
.cart-footer .primary-button { width: 100%; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; }
.cart-note { color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0 1rem; }
.cart-error { color: #c92a2a; font-size: 0.9rem; margin: 0.75rem 0 0; min-height: 1em; }

/* ===== Simple pages (success etc.) ===== */
.message-page {
  max-width: 560px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.message-page p { color: var(--muted); margin-bottom: 2rem; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* ===== Home page ===== */
.home-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3.5rem;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: #fde8dc;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.home-hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
}
.home-hero h1 span { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 auto 2rem; max-width: 620px; }

.button-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.secondary-button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1.5px solid var(--text);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.secondary-button:hover { background: var(--text); color: #fff; }
.secondary-button--light { border-color: #fff; color: #fff; white-space: nowrap; }
.secondary-button--light:hover { background: #fff; color: var(--text); }

/* Generic page section */
.section { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.section-title { font-size: 1.7rem; letter-spacing: -0.02em; margin: 0 0 1.5rem; }
.section-heading-row { display: flex; justify-content: space-between; align-items: baseline; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fde8dc;
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.feature h3 { margin: 0 0 0.4rem; }
.feature p { margin: 0; color: var(--muted); }

/* Featured products on the home page sit inside a .section, so no extra padding */
.products--compact { padding: 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* How it works */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
}
.steps li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 1rem;
  border-top: 3px solid var(--accent);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-weight: 800;
  color: var(--accent);
}
.steps span { color: var(--muted); }

/* Dark "coming soon" banner */
.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
}
.banner h2 { margin: 0 0 0.35rem; }
.banner p { margin: 0; color: #cfc9c0; }

/* ===== Shop & About page headers ===== */
.page-hero { text-align: center; padding: 3.5rem 1.5rem 1.5rem; }
.page-hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 0.5rem; letter-spacing: -0.03em; }
.page-hero p { color: var(--muted); margin: 0; }

/* Text-heavy pages like About */
.prose { max-width: 720px; }
.prose h2 { margin: 2rem 0 0.5rem; font-size: 1.35rem; }
.prose p, .prose li { color: #3d3a35; }
.prose a { color: var(--accent); }

/* Footer links */
.footer-nav { display: flex; gap: 1.25rem; justify-content: center; margin-bottom: 0.5rem; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
