/* ═══════════════════════════════════════════════════════════════
   Good Food Project — Shared Stylesheet
   Palette matched to brand mockup
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* The `hidden` attribute must win over component display rules
   (.field, .cart-layout, .cart-empty, .cart-count, etc.), otherwise
   JS toggling `el.hidden` has no visual effect. */
[hidden] { display: none !important; }

:root {
  /* Greens */
  --green-deep: #163A2B;        /* darkest — banners, buttons, headings */
  --green-dark: #1D4636;        /* hover state */
  --green-mint: #8FE0A3;        /* bright CTA pill */
  --green-mint-hover: #7BD692;
  --green-soft: #DDF0DC;        /* soft green card fill */
  --green-tint: #EFF7EE;        /* photo placeholder fill */
  --green-text: #2E9E5B;        /* small green link text */

  /* Neutrals */
  --page-bg: #F7F6F2;           /* warm off-white page background */
  --surface: #FFFFFF;           /* cards */
  --beige: #EFECE3;             /* feature band */
  --border: #E8E5DC;
  --border-soft: #F0EEE7;

  /* Coral accent (macro rings) */
  --coral: #E8734A;

  /* Text */
  --text-dark: #14201A;
  --text-body: #3D4642;
  --text-muted: #7A827D;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 1px 3px rgba(20, 32, 26, 0.05);
  --shadow-hover: 0 6px 20px rgba(20, 32, 26, 0.10);
  --transition: 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4 {
  color: var(--text-dark);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════════════════ */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}

.nav-brand {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0 auto;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover { color: var(--green-deep); }

.nav-links a.active {
  color: var(--green-deep);
  font-weight: 600;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green-mint);
  border-radius: 1px;
}

.nav-tagline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 100px;
  flex-shrink: 0;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--green-deep);
  border-radius: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   Page Header
   ═══════════════════════════════════════════════════════════════ */
.page-header { padding: 52px 0 20px; }
.page-header h1 { margin-bottom: 10px; }
.page-header p { color: var(--text-muted); font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════
   Hero (homepage)
   ═══════════════════════════════════════════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0 52px;
}

.hero-text h1 {
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 18px;
  max-width: 9em;
}

.hero-text p {
  font-size: 1.02rem;
  color: var(--text-body);
  line-height: 1.6;
  max-width: 30em;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-deep);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 34px;
  border-radius: 100px;
  transition: background var(--transition);
}

.btn-primary:hover { background: var(--green-dark); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 34px;
  border-radius: 100px;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.btn-secondary:hover { border-color: var(--green-deep); }

.hero-photo {
  aspect-ratio: 4 / 3;
  background: var(--green-tint);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-photo > svg { width: 90px; height: 90px; opacity: 0.2; }

.hero-macro-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--green-deep);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.hero-macro-value {
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-macro-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-mint);
  margin-bottom: 6px;
}

.hero-macro-label:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   Feature Band (beige strip)
   ═══════════════════════════════════════════════════════════════ */
.feature-band {
  background: var(--beige);
  border-radius: var(--radius-lg);
  padding: 32px 0;
  margin: 8px 0 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.feature-item {
  padding: 4px 32px;
  border-right: 1px solid rgba(20, 32, 26, 0.10);
}

.feature-item:last-child { border-right: none; }

.feature-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   Section Heading
   ═══════════════════════════════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-head a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.section-head a:hover { color: var(--green-text); }

/* ═══════════════════════════════════════════════════════════════
   Filter Tabs
   ═══════════════════════════════════════════════════════════════ */
.filters {
  padding: 4px 0 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 9px 22px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-body);
  background: var(--surface);
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--green-deep);
  color: var(--green-deep);
}

.filter-btn.active {
  background: var(--green-deep);
  color: #fff;
  border-color: var(--green-deep);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   Meal Cards
   ═══════════════════════════════════════════════════════════════ */
.meals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 44px;
}

.meal-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

.meal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}

.meal-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.meal-card-photo {
  aspect-ratio: 4 / 3;
  background: var(--green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.meal-card-photo svg { width: 46px; height: 46px; opacity: 0.22; }

.meal-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--green-deep);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
}

.meal-card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meal-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  letter-spacing: -0.015em;
  margin-bottom: 5px;
  line-height: 1.3;
}

.meal-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.meal-card-macros {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.meal-card-price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-top: 10px;
}

.meal-card-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  transition: background var(--transition);
  flex-shrink: 0;
}

.meal-card:hover .meal-card-add { background: var(--green-dark); }

.meal-card.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════
   Subscribe Banner
   ═══════════════════════════════════════════════════════════════ */
.subscribe-banner {
  background: var(--green-deep);
  border-radius: var(--radius-lg);
  padding: 36px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 64px;
}

.subscribe-banner-text h2 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}

.subscribe-banner-text p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.subscribe-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green-mint);
  color: var(--green-deep);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 14px 40px;
  border-radius: 100px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.subscribe-banner-cta:hover { background: var(--green-mint-hover); }

/* ═══════════════════════════════════════════════════════════════
   Meal Detail
   ═══════════════════════════════════════════════════════════════ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 32px 0 24px;
  transition: color var(--transition);
}

.back-link:hover { color: var(--green-deep); }
.back-link svg { width: 17px; height: 17px; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  padding-bottom: 56px;
  align-items: start;
}

.detail-photo {
  aspect-ratio: 4 / 3;
  background: var(--green-tint);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 92px;
}

.detail-photo svg { width: 70px; height: 70px; opacity: 0.2; }

.detail-content { padding-top: 4px; }

.detail-name {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.detail-subline {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.detail-description {
  font-size: 0.98rem;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 460px;
}

/* Circular macro rings */
.macro-badges {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.macro-badge {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1.5px solid var(--green-mint);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  flex-shrink: 0;
}

.macro-badge.accent { border-color: var(--coral); }

.macro-badge-value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 3px;
  letter-spacing: -0.02em;
}

.macro-badge-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Ingredients */
.detail-ingredients { margin-bottom: 36px; }

.detail-ingredients h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.ingredient-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.ingredient-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.93rem;
  color: var(--text-body);
}

.ingredient-check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ingredient-check svg { width: 12px; height: 12px; color: var(--green-deep); }

/* Price bar */
.price-bar {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.price-bar-left { display: flex; flex-direction: column; }

.price-bar-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.price-bar-amount {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.btn-add-cart {
  background: var(--green-deep);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 14px 34px;
  border-radius: 100px;
  transition: background var(--transition);
}

.btn-add-cart:hover { background: var(--green-dark); }

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--green-deep);
  color: #fff;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 6px 28px rgba(20, 32, 26, 0.28);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 200;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 52px 0 30px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 48px;
  margin-bottom: 36px;
}

.footer-brand {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 250px;
  line-height: 1.55;
}

.footer-links { display: flex; gap: 56px; }

.footer-col h4 {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--green-mint); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 44px 0 40px; }
  .hero-text h1 { font-size: 2.5rem; max-width: none; }
  .hero-photo { max-height: 360px; }
  .meals-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; gap: 32px; }
  .detail-photo { position: static; max-height: 340px; }
  .feature-band { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .feature-item:nth-child(2) { border-right: none; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .subscribe-banner { flex-direction: column; text-align: center; padding: 32px 24px; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.35rem; }

  .nav-links { display: none; }
  .nav-tagline { display: none; }
  .nav-mobile-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 18px 24px 26px;
    gap: 18px;
    box-shadow: 0 8px 24px rgba(20, 32, 26, 0.08);
    border-bottom: 1px solid var(--border-soft);
  }

  .hero-text h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; }
  .hero-macro-badge { bottom: 14px; right: 14px; padding: 12px 18px; }
  .hero-macro-value { font-size: 1.2rem; }

  .meals-grid { grid-template-columns: 1fr; gap: 16px; }
  .meal-card-photo { aspect-ratio: 16 / 10; }

  .feature-band { grid-template-columns: 1fr; padding: 24px 0; }
  .feature-item { border-right: none; padding: 12px 24px; }

  .macro-badges { gap: 12px; justify-content: space-between; }
  .macro-badge { width: 68px; height: 68px; }

  .detail-name { font-size: 1.6rem; }

  .price-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    z-index: 90;
    border: none;
    border-top: 1px solid var(--border);
  }

  .detail-content { padding-bottom: 104px; }

  .footer-links { flex-direction: column; gap: 26px; }

  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn { white-space: nowrap; flex-shrink: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   Data-driven menu (rendered from Supabase)
   ═══════════════════════════════════════════════════════════════ */
.grid-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  padding: 24px 0;
  font-size: 0.95rem;
}

/* Real photos fill the placeholder area once uploaded via the admin. */
.meal-card-photo img,
.detail-photo img,
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════
   Cart badge (nav)
   ═══════════════════════════════════════════════════════════════ */
.nav-cart-link { display: inline-flex; align-items: center; gap: 6px; }

.cart-count {
  background: var(--green-mint);
  color: var(--green-deep);
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   Cart / Checkout page
   ═══════════════════════════════════════════════════════════════ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
  padding: 8px 0 64px;
}

.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-line {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  grid-template-areas: "info qty total remove";
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.cart-line-info { grid-area: info; display: flex; flex-direction: column; gap: 3px; }
.cart-line-name { font-weight: 700; color: var(--text-dark); font-size: 0.98rem; letter-spacing: -0.01em; }
.cart-line-price { font-size: 0.78rem; color: var(--text-muted); }
.cart-line-total { grid-area: total; font-weight: 700; color: var(--text-dark); font-size: 0.95rem; min-width: 68px; text-align: right; }

.qty-stepper {
  grid-area: qty;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green-deep);
  transition: background var(--transition);
}

.qty-btn:hover { background: var(--green-soft); }
.qty-value { min-width: 26px; text-align: center; font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }

.cart-line-remove {
  grid-area: remove;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.cart-line-remove:hover { color: var(--coral); }

.cart-checkout { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 92px; }

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}
.cart-summary h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 6px 0; color: var(--text-body); }
.cart-summary-row.muted { color: var(--text-muted); font-size: 0.82rem; }
.cart-summary-row.total {
  border-top: 1px solid var(--border-soft);
  margin-top: 8px;
  padding-top: 14px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-dark);
}

.checkout-form {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.checkout-form h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.8rem; font-weight: 600; color: var(--text-dark); }
.field-optional { font-weight: 400; color: var(--text-muted); }
.field input, .field textarea, .field select {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color var(--transition);
  resize: vertical;
}
.field select { cursor: pointer; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green-deep); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }

.radio-pills { display: flex; gap: 10px; }
.radio-pill { flex: 1; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-body);
  transition: all var(--transition);
  cursor: pointer;
}
.radio-pill input:checked + span { background: var(--green-deep); color: #fff; border-color: var(--green-deep); font-weight: 600; }
.radio-pill input:focus-visible + span { outline: 2px solid var(--green-deep); outline-offset: 2px; }

.schedule-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--text-dark); }
.schedule-toggle input { width: 16px; height: 16px; flex-shrink: 0; }
.schedule-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }

.checkout-submit { width: 100%; margin-top: 4px; }
.checkout-error {
  background: #FCE9E2;
  color: #B23C17;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 0.85rem;
  font-weight: 500;
}
.checkout-fineprint { font-size: 0.76rem; color: var(--text-muted); text-align: center; line-height: 1.5; }

.cart-empty { text-align: center; padding: 60px 0 80px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cart-empty p { color: var(--text-muted); font-size: 1.05rem; }

.cart-success {
  max-width: 520px;
  margin: 12px auto 80px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cart-success-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.cart-success-check svg { width: 32px; height: 32px; }
.cart-success h2 { font-size: 1.5rem; }
.cart-success p { color: var(--text-body); font-size: 0.95rem; }
.cart-success-note { color: var(--text-muted); font-size: 0.88rem; max-width: 40ch; }
.cart-success .btn-primary { margin-top: 12px; }

@media (max-width: 1000px) {
  .cart-layout { grid-template-columns: 1fr; gap: 24px; }
  .cart-checkout { position: static; }
}

@media (max-width: 640px) {
  .cart-line {
    grid-template-columns: 1fr auto;
    grid-template-areas: "info total" "qty remove";
    gap: 12px 16px;
  }
  .cart-line-remove { text-align: right; align-self: center; }
}
