/* Adunni's Fresh — shared stylesheet for index.html and shop.html */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../assets/fonts/fraunces-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/fraunces-italic-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/work-sans-variable.woff2") format("woff2");
}

:root {
  --cream: #fff8ec;
  --cream-deep: #fbefda;
  --ink: #2b1b12;
  --ink-soft: #5b4636;
  --terracotta: #d9622b;
  --terracotta-dark: #b14a1c;
  --green: #2f5d3a;
  --green-dark: #1e3e26;
  --gold: #e8a93d;
  --card: #ffffff;
  --line: #eaddc8;
  --footer-ink: #1e3e26;
  --footer-text: #eaddc8;
  --footer-text-dim: #b9ceb2;
  --footer-line: #2e5338;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
}

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

/* Without this, elements with another rule setting display (e.g. .product-card{display:flex})
   would win over the browser's default [hidden]{display:none} at equal specificity. */
[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
}

.page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.noscript-banner {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 10px 16px;
  font-size: 13.5px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--green-dark);
  border-bottom: 1px solid #16301d;
}

.site-header .wrap {
  padding: 18px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 6px;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--cream);
}

.logo-fresh {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-link {
  color: #d9e4d2;
  font-weight: 600;
}
.nav-link:hover {
  color: var(--gold);
}
.nav-link.active {
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.basket-icon-button {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
}
.basket-icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.basket-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.basket-badge[hidden] {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
  transition: background 0.15s ease;
}
.btn-primary:hover {
  background: #d99a2e;
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  border: none;
  transition: background 0.15s ease;
  cursor: pointer;
}
.btn-dark:hover {
  background: var(--terracotta-dark);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 999px;
}

/* ---------- Basket Panel ---------- */

.basket-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100vw);
  background: var(--card);
  box-shadow: -10px 0 30px rgba(43, 27, 18, 0.15);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
.basket-panel.open {
  transform: translateX(0);
}

.basket-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.basket-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-soft);
}

.basket-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.basket-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 27, 18, 0.35);
  z-index: 40;
  display: none;
}
.basket-overlay.open {
  display: block;
}

.basket-empty {
  text-align: center;
  padding: 40px 10px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.basket-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.basket-line-info {
  flex: 1;
}

.basket-line-name {
  font-weight: 600;
  font-size: 14.5px;
}

.basket-line-unit {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.basket-line-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.qty-btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.basket-line-remove {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 8px;
}

.basket-line-price {
  font-weight: 700;
  white-space: nowrap;
}

.basket-warning {
  background: var(--cream-deep);
  color: var(--terracotta-dark);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
}
.basket-warning[hidden] {
  display: none;
}

.basket-panel-footer {
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.basket-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}

.basket-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#basket-checkout-button {
  width: 100%;
}

.checkout-status-banner {
  text-align: center;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}
.checkout-status-banner.checkout-success {
  background: var(--green);
  color: #fff;
}
.checkout-status-banner.checkout-cancelled {
  background: var(--cream-deep);
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero .wrap {
  padding: 72px 32px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}

.hero-copy {
  flex: 999 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-deep);
  color: var(--terracotta-dark);
  font-weight: 600;
  font-size: 13.5px;
  padding: 7px 14px;
  border-radius: 999px;
  width: fit-content;
}

.hero-tagline {
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.hero-copy h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.08;
  color: var(--ink);
}

.hero-copy h1 em {
  font-style: italic;
  color: var(--terracotta);
}

.hero-copy p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hero-trust {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 500;
}
.hero-trust span.dot {
  color: var(--line);
}

.hero-art {
  flex: 1 1 320px;
  min-width: 280px;
  display: flex;
  justify-content: center;
}

.hero-art-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
}

.hero-art-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--terracotta) 100%);
}

.hero-art-face {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--cream);
  overflow: hidden;
}

.hero-art-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  width: 100%;
  height: 100%;
}

.hero-art-tile {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}

.hero-art-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Section shells ---------- */

.section {
  padding: 56px 32px;
}
.section .wrap {
  padding: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: 30px;
  font-weight: 600;
}

.section-head p {
  color: var(--ink-soft);
  margin: 6px 0 0;
}

/* ---------- Categories / Products grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}

.category-card,
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.category-card:hover,
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(43, 27, 18, 0.08);
}

.category-card {
  padding: 24px;
  gap: 14px;
}

.icon-tile {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card h3 {
  font-size: 17px;
  font-weight: 600;
}
.category-card p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  overflow: hidden;
  position: relative;
}

.product-card-art {
  position: relative;
  height: 140px;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-category {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-card h3 {
  font-size: 16.5px;
  font-weight: 600;
}

.product-unit {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.product-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
}
.product-footer-row.coming-soon-row {
  justify-content: flex-end;
}

.product-price {
  font-weight: 700;
}

.in-basket-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
}
.in-basket-badge[hidden] {
  display: none;
}

.product-card.coming-soon {
  background: var(--cream-deep);
}
.product-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
}
.product-card.coming-soon .product-card-art {
  filter: grayscale(1);
  opacity: 0.45;
}
.product-card.coming-soon h3,
.product-card.coming-soon .product-category,
.product-card.coming-soon .product-unit {
  opacity: 0.55;
}
.product-card.coming-soon .btn {
  background: var(--line);
  color: var(--ink-soft);
  cursor: not-allowed;
}

.coming-soon-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 4px 10px;
}

.price-tbc {
  color: var(--ink-soft);
  font-weight: 600;
  font-style: italic;
  font-size: 13px;
}

/* ---------- Story ---------- */

.story-section {
  background: var(--green-dark);
  padding: 72px 32px;
}
.story-section .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}

.story-art {
  flex: 1 1 320px;
  min-width: 260px;
  display: flex;
  justify-content: center;
}

.story-art-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold) 0%, var(--terracotta) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-art-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-art-box span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: #fff;
  opacity: 0.9;
}

.story-copy {
  flex: 999 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--cream);
}

.story-eyebrow {
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.story-copy h2 {
  font-size: 32px;
  font-weight: 600;
  color: #fff;
}

.story-copy p {
  font-size: 16.5px;
  line-height: 1.7;
  color: #e7e2d6;
  max-width: 560px;
  margin: 0;
}

/* ---------- Why us ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.why-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.why-card h3 {
  font-size: 18px;
  font-weight: 600;
}
.why-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- Locations ---------- */

.locations-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.locations-info {
  flex: 1 1 280px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.locations-info h2 {
  font-size: 26px;
  font-weight: 600;
}

.locations-info p {
  margin: 0;
  color: var(--ink-soft);
}
.locations-info p.label {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--ink);
}

.locations-map {
  flex: 1 1 280px;
  min-width: 240px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-deep);
  min-height: 260px;
}
.locations-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: 0;
}

.locations-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Shop page ---------- */

.shop-header {
  padding: 48px 32px 8px;
}
.shop-header h1 {
  font-size: 38px;
  font-weight: 700;
}
.shop-header p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 560px;
}

.filter-pills {
  padding: 8px 32px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}
.pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-ink);
  color: var(--footer-text);
  padding: 56px 32px 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

.footer-cols {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-brand {
  flex: 2 1 260px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}

.footer-logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.footer-brand p {
  margin: 0;
  color: var(--footer-text-dim);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.footer-col {
  flex: 1 1 140px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col:last-child {
  flex: 1 1 220px;
  min-width: 220px;
}

.footer-col h3 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-link {
  color: var(--footer-text);
  font-size: 14px;
}
.footer-link:hover {
  color: #fff;
}

.newsletter-copy {
  margin: 0;
  font-size: 13.5px;
  color: var(--footer-text-dim);
}

.newsletter-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.newsletter-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--footer-line);
  background: #352418;
  color: #fff;
  font-size: 13.5px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.footer-bottom {
  max-width: 1280px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--footer-line);
  font-size: 12.5px;
  color: #9c8c77;
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .hero-copy h1 {
    font-size: 38px;
  }
  .section {
    padding: 40px 20px;
  }
  .site-header .wrap,
  .hero .wrap,
  .shop-header,
  .filter-pills {
    padding-left: 20px;
    padding-right: 20px;
  }
  .locations-card {
    padding: 24px;
  }
}

/* Mobile header: compact single row (hamburger / logo / basket icon), full nav
   tucked into #mobile-menu. Placed last in the file so it reliably overrides
   the unconditional .nav-links/.btn-primary/.logo-word rules above at equal
   specificity (source order, not just the @media condition, decides the winner). */
@media (max-width: 640px) {
  .site-header .wrap {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 10px;
  }
  .mobile-menu-button {
    display: flex;
  }
  .nav-links,
  .header-actions .btn-primary {
    display: none;
  }
  .logo-word {
    font-size: 18px;
  }

  .mobile-menu:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--green-dark);
    padding: 6px 20px 20px;
    border-top: 1px solid #16301d;
  }
  .mobile-menu .btn-primary {
    width: 100%;
    margin-top: 4px;
  }
}
