/* Chèvrerie du Menez-Hom — Espace client
   Sobre, chaleureux, artisanal. Crème, marine, corail, sauge. */

:root {
  --bg: #f5efe1;
  --bg-2: #ede5d3;
  --paper: #fdfaf2;
  --ink: #1a2848;
  --ink-soft: #4a5878;
  --ink-mute: #8b95ab;
  --line: #d9cfb8;
  --line-soft: #e8e0cc;
  --coral: #d94f4f;
  --coral-soft: #f4e0d8;
  --sage: #7a8a6e;
  --sage-soft: #d8dfcd;
  --warn-bg: #fbecd0;
  --warn-ink: #7a5a17;
  --shadow-sm: 0 1px 2px rgba(26, 40, 72, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(26, 40, 72, 0.08), 0 1px 2px rgba(26, 40, 72, 0.06);
  --shadow-lg: 0 12px 32px -8px rgba(26, 40, 72, 0.18);
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 14px;
  /* Cozy density defaults */
  --row-h: 56px;
  --pad-y: 12px;
  --pad-x: 16px;
  --gap: 14px;
  --card-pad: 18px;
  --section-gap: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.font-display {
  font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }

/* ============== APP SHELL ============== */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: 10px var(--pad-x);
  height: 60px;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
}
.topbar .brand img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.topbar .brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}
.topbar .brand-sub {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.topbar .nav {
  display: flex;
  gap: 2px;
  margin-left: 12px;
}
.nav-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  border-radius: var(--r-md);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-btn:hover { background: var(--bg-2); color: var(--ink); }
.nav-btn.active { background: var(--ink); color: var(--paper); }
.topbar .spacer { flex: 1; }
.topbar .user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; }
.user-meta { font-size: 11px; color: var(--ink-mute); }

/* ============== LAYOUT ============== */
.page {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: var(--section-gap) var(--pad-x);
  gap: var(--section-gap);
}
.page-with-cart {
  grid-template-columns: 1fr 360px;
  align-items: start;
}
@media (max-width: 900px) {
  .page-with-cart { grid-template-columns: 1fr; }
  .cart-aside { position: static !important; }
}
/* ============== BURGER / MOBILE MENU ============== */
.burger-btn {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--ink);
  border-radius: var(--r-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.burger-btn:hover { background: var(--bg-2); }
.burger-btn .burger-close { display: none; }
.burger-btn.open .burger-icon { display: none; }
.burger-btn.open .burger-close { display: block; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 49;
  background: var(--paper);
  border-top: 1px solid var(--line);
  flex-direction: column;
  padding: 12px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-nav { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.mobile-nav-link:hover { background: var(--bg-2); color: var(--ink); }
.mobile-nav-link.active { background: var(--ink); color: var(--paper); }
.mobile-menu-divider { height: 1px; background: var(--line); margin: 12px 0; }
.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

@media (max-width: 900px) {
  .topbar .brand-name, .topbar .brand-sub { display: none; }
  .topbar .nav { display: none; }
  .topbar .user { display: none; }
  .burger-btn { display: flex; }
  .page-subtitle { display: none; }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}
.page-subtitle {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ============== CARDS ============== */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--card-pad); }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.06s, background 0.12s, border-color 0.12s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #0e1a36; color: var(--paper); }
.btn-coral { background: var(--coral); color: var(--paper); }
.btn-coral:hover { background: #c24343; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-quiet { background: transparent; color: var(--ink-soft); }
.btn-quiet:hover { background: var(--bg-2); color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============== INPUTS ============== */
.field { display: flex; flex-direction: column; gap: 6px; }
.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.input, .textarea, .select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26, 40, 72, 0.1);
}
.textarea { min-height: 80px; resize: vertical; }
.help { font-size: 12px; color: var(--ink-mute); }
.error-msg { font-size: 12px; color: var(--coral); }

/* ============== AUTH ============== */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
@media (max-width: 800px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
.auth-side {
  background: var(--ink);
  color: var(--paper);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(217, 79, 79, 0.08) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(122, 138, 110, 0.12) 0, transparent 50%);
  pointer-events: none;
}
.auth-side > * { position: relative; }
.auth-side .brand-block { display: flex; align-items: center; gap: 14px; }
.auth-side .brand-block img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.auth-side .brand-block .name {
  font-family: "Fraunces", serif;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.auth-side .brand-block .sub {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(253, 250, 242, 0.6);
  text-transform: uppercase;
}
.auth-side .lead {
  font-family: "Fraunces", serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 460px;
}
.auth-side .lead em {
  font-style: italic;
  color: var(--coral);
}
.auth-side .footnote {
  font-size: 12px;
  color: rgba(253, 250, 242, 0.5);
  letter-spacing: 0.04em;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}
.auth-form {
  width: 100%;
  max-width: 380px;
}
.auth-form h2 {
  font-family: "Fraunces", serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.auth-form p.lede { color: var(--ink-soft); margin: 0 0 28px; }
.auth-form .field + .field { margin-top: 14px; }
.auth-form .submit-row { margin-top: 22px; }
.auth-form .alt-row {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}
.auth-form .alt-row a { color: var(--ink); text-decoration: underline; cursor: pointer; }
.forgot { font-size: 12px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.auth-alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--coral-soft);
  border: 1px solid #e8b8b8;
  border-radius: var(--r-md);
  color: #7a2020;
  font-size: 13px;
  margin-bottom: 20px;
}
.auth-alert-success {
  background: var(--sage-soft);
  border-color: #b8c8a8;
  color: #3a4a2e;
}

/* ============== CATALOG ============== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.search input {
  width: 100%;
  padding-left: 36px;
}
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  pointer-events: none;
}
.chip {
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { background: var(--bg-2); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-card:hover { border-color: var(--ink-soft); box-shadow: var(--shadow-md); }
.product-card.in-cart { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.product-photo {
  aspect-ratio: 4 / 3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  cursor: pointer;
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-photo .badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  pointer-events: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-temp {
  background: var(--coral);
  color: var(--paper);
  text-transform: uppercase;
}
.badge-unit {
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.product-body {
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-name {
  font-family: "Fraunces", serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  cursor: pointer;
}
.product-name:hover { color: var(--ink-soft); }
.product-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-mute);
}
.product-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.product-price {
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.product-price .per { font-size: 12px; color: var(--ink-mute); font-family: "Inter", sans-serif; font-weight: 400; }

/* photo placeholder */
.product-photo-placeholder {
  background: linear-gradient(135deg, #e8dfc8 0%, #d4c8a8 100%);
}
.photo-abbr {
  font-family: "Fraunces", serif;
  font-size: 28px;
  font-weight: 500;
  color: rgba(26, 40, 72, 0.35);
  letter-spacing: 0.02em;
  user-select: none;
}

/* ============== QTY STEPPER ============== */
.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  height: 36px;
}
.qty button {
  background: none;
  border: none;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}
.qty button:hover { background: var(--bg-2); color: var(--ink); }
.qty input {
  width: 56px;
  border: none;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  outline: none;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  color: var(--ink);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty .unit-suffix {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: var(--ink-mute);
  border-left: 1px solid var(--line-soft);
}

.qty-add {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.qty-add:hover { background: #0e1a36; }

/* ============== CART SIDEBAR ============== */
.cart-aside {
  position: sticky;
  top: 80px;
}
.cart-card { padding: 0; overflow: hidden; }
.cart-head {
  padding: 16px var(--card-pad);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-head h3 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.01em;
}
.cart-count { font-size: 12px; color: var(--ink-mute); }
.cart-lines {
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 0;
}
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px var(--card-pad);
  border-bottom: 1px solid var(--line-soft);
}
.cart-line:last-child { border-bottom: none; }
.cart-line-name { font-size: 13px; font-weight: 500; }
.cart-line-meta { font-size: 12px; color: var(--ink-mute); }
.cart-line-price { font-size: 13px; font-weight: 500; text-align: right; }
.cart-line-actions { display: flex; gap: 6px; align-items: center; grid-column: 1 / -1; margin-top: 4px; }
.cart-line-actions .qty { height: 28px; }
.cart-line-actions .qty button { width: 26px; font-size: 14px; }
.cart-line-actions .qty input { width: 44px; font-size: 13px; }
.cart-line-actions .qty .unit-suffix { font-size: 11px; padding: 0 8px; }
.cart-line-actions .remove {
  background: none;
  border: none;
  color: var(--ink-mute);
  font-size: 12px;
  margin-left: auto;
  text-decoration: underline;
  cursor: pointer;
}
.cart-line-actions .remove:hover { color: var(--coral); }

.cart-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}

.cart-summary {
  padding: 14px var(--card-pad);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 13px;
}
.cart-summary .row { display: flex; justify-content: space-between; padding: 4px 0; }
.cart-summary .row.total {
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 500;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.cart-actions { padding: 14px var(--card-pad); display: flex; flex-direction: column; gap: 8px; }

/* delivery week reminder in cart */
.week-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--ink-soft);
}
.week-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); flex-shrink: 0; }
.week-pill strong { color: var(--ink); font-weight: 500; }
.week-pill .change { margin-left: auto; color: var(--ink); text-decoration: underline; cursor: pointer; white-space: nowrap; }

/* ============== ALERT BAR ============== */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--warn-bg);
  border: 1px solid #e8d4a4;
  border-radius: var(--r-md);
  color: var(--warn-ink);
  font-size: 13px;
}
.alert strong { font-weight: 600; }
.alert .icon { flex-shrink: 0; margin-top: 1px; }

/* ============== CALENDAR (delivery weeks) ============== */
.weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.week-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--paper);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.12s, background 0.12s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.week-card:hover:not(:disabled) { border-color: var(--ink-soft); background: var(--bg-2); }
.week-card.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
}
.week-card.selected .week-range,
.week-card.selected .week-tag { color: rgba(253, 250, 242, 0.75); }
.week-card.locked, .week-card.full {
  cursor: not-allowed;
  opacity: 0.55;
  background: repeating-linear-gradient(45deg, var(--paper) 0 8px, var(--bg-2) 8px 16px);
}
.week-num {
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.week-range { font-size: 13px; color: var(--ink-soft); }
.week-tag {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}
.week-tag.coral { color: var(--coral); }
.week-tag.muted { color: var(--ink-mute); }

/* ============== HISTORY ============== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-row {
  display: grid;
  grid-template-columns: 160px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.history-row .ref { font-family: "JetBrains Mono", "SF Mono", monospace; font-size: 12px; color: var(--ink-mute); }
.history-row .ref strong { display: block; font-family: inherit; color: var(--ink); font-size: 13px; }
.history-row .meta { font-size: 13px; color: var(--ink-soft); }
.history-row .meta strong { color: var(--ink); font-weight: 500; }
.history-row .total-col { font-family: "Fraunces", serif; font-size: 18px; font-weight: 500; white-space: nowrap; }
@media (max-width: 700px) {
  .history-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .history-row .total-col { grid-column: 1 / -1; text-align: right; }
  .history-row .actions { grid-column: 1 / -1; }
}

/* ============== CONFIRMATION / SUCCESS ============== */
.confirm-card {
  max-width: 520px;
  margin: 60px auto;
  text-align: center;
  padding: 48px 32px;
}
.confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.confirm-card h2 { font-family: "Fraunces", serif; font-size: 28px; margin: 0 0 8px; font-weight: 500; }
.confirm-card p.lede { color: var(--ink-soft); margin: 0 0 24px; }
.confirm-summary {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--bg);
  font-size: 13px;
  margin-bottom: 24px;
}
.confirm-summary .row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.confirm-summary .row:last-child { border-bottom: none; }
.confirm-summary .row strong { font-weight: 500; }

/* ============== DRAWER (product detail) ============== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 40, 72, 0.4);
  z-index: 100;
  animation: fade 0.18s;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: var(--paper);
  z-index: 101;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.drawer-head .close { background: none; border: none; padding: 6px; color: var(--ink-soft); border-radius: var(--r-sm); cursor: pointer; }
.drawer-head .close:hover { background: var(--bg-2); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; }
.drawer .product-photo { aspect-ratio: 16 / 10; cursor: default; }
.drawer-section { padding: 20px; border-bottom: 1px solid var(--line-soft); }
.drawer-section h4 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 8px;
  font-weight: 600;
}
.drawer-section p { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.6; }
.drawer-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.meta-cell .lbl { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.meta-cell .val { font-size: 14px; font-weight: 500; }
.meta-cell .val.mono { font-family: "JetBrains Mono", monospace; font-size: 12px; }
.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  gap: 12px;
}
.drawer-footer .price-block { font-family: "Fraunces", serif; font-size: 20px; font-weight: 500; }
.drawer-footer .price-block .per { font-family: Inter, sans-serif; font-size: 12px; color: var(--ink-mute); font-weight: 400; }

/* ============== MODAL (week picker + confirm) ============== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 40, 72, 0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 0.18s;
}
.modal-box {
  background: var(--paper);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h2 {
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============== PAGINATION ============== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 0 8px;
}
.pagination-info {
  font-size: 13px;
  color: var(--ink-mute);
  min-width: 80px;
  text-align: center;
}

/* ============== FLASH MESSAGES ============== */
.flash-bar {
  padding: 12px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.flash-bar.success { background: var(--sage-soft); color: #2a4a1e; border-bottom: 1px solid #b8c8a8; }
.flash-bar.error { background: var(--coral-soft); color: #7a2020; border-bottom: 1px solid #e8b8b8; }

/* ============== STEPPER ============== */
.stepper {
  display: flex;
  align-items: flex-start;
  padding: 28px 0 24px;
  max-width: 440px;
  margin: 0 auto;
}
.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.stepper-step + .stepper-step::before {
  content: '';
  position: absolute;
  top: 15px;
  right: 50%;
  left: calc(-50% + 16px);
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.stepper-step.done + .stepper-step::before {
  background: var(--sage);
}
.stepper-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  position: relative;
  z-index: 1;
}
.stepper-step.active .stepper-dot {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.stepper-step.done .stepper-dot {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}
.stepper-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  text-align: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.stepper-step.active .stepper-label { color: var(--ink); font-weight: 600; }
.stepper-step.done .stepper-label { color: var(--sage); }

/* ============== DELIVERY PAGE ============== */
.delivery-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.delivery-page .page-header {
  margin-bottom: var(--gap);
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: var(--gap);
}
.week-tile {
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.week-tile:not(:disabled):hover { border-color: var(--ink-soft); }
.week-tile.selected { border-color: var(--ink); background: var(--paper); box-shadow: 0 0 0 1px var(--ink); }
.week-tile:disabled { opacity: 0.45; cursor: not-allowed; }
.week-tile .wt-num { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mute); font-weight: 600; }
.week-tile .wt-range { font-weight: 600; font-size: 14px; color: var(--ink); margin-top: 2px; }
.week-tile .wt-tag { font-size: 11px; color: var(--ink-mute); margin-top: 6px; }
.week-tile.selected .wt-tag { color: var(--ink); }
.week-tile .wt-tag.next { color: var(--sage); font-weight: 500; }
.week-tile .wt-tag.locked { color: var(--ink-mute); }

/* ============== REVIEW PAGE ============== */
.review-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .review-layout { grid-template-columns: 1fr; }
}
.review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.review-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.review-table th:not(:first-child) { text-align: right; padding-left: 12px; }
.review-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.review-table td:not(:first-child) { text-align: right; padding-left: 12px; }
.review-totals { margin-top: 12px; font-size: 14px; }
.review-totals .row-flex { padding: 4px 0; }
.review-totals .total-row {
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 500;
}

/* ============== UTILITIES ============== */
.row-flex { display: flex; gap: var(--gap); align-items: center; }
.col-flex { display: flex; flex-direction: column; gap: var(--gap); }
.between { justify-content: space-between; }
.muted { color: var(--ink-mute); }
.tabular { font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.mono { font-family: "JetBrains Mono", monospace; font-size: 12px; }

/* scrollbar styling */
.cart-lines::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .modal-box::-webkit-scrollbar { width: 8px; }
.cart-lines::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .modal-box::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
