:root {
  --bg: #F7F6F1;
  --surface: #FFFFFF;
  --ink: #1F2B22;
  --ink-soft: #5C6B5E;
  --line: #DEDACE;
  --forest: #33513B;
  --forest-deep: #223A2A;
  --wax: #B08A4E;
  --wax-soft: #EFE3CB;
  --logo-red: #D23D28;
  --logo-red-deep: #A82F1D;
  --radius: 10px;
  --cart-bar-height: 0px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: var(--cart-bar-height);
  transition: padding-bottom 0.2s ease;
}

h1, h2, h3 { font-family: 'Fraunces', serif; margin: 0; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--forest);
  color: #F4F1E8;
  padding: 28px 20px 22px;
  text-align: center;
}
.topbar-inner { max-width: 640px; margin: 0 auto; }
.topbar-logo {
  display: block;
  width: clamp(96px, 24vw, 150px);
  height: auto;
  margin: 0 auto 10px;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #B7CBB6;
  font-weight: 600;
}
.topbar h1 {
  font-size: 30px;
  font-weight: 600;
  font-style: italic;
  color: #FBF9F1;
}

/* ---------- Category nav ---------- */
.catnav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav button {
  flex: none;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--forest);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.catnav button.active {
  background: var(--forest);
  color: #F4F1E8;
  border-color: var(--forest);
}

/* ---------- Menu body ---------- */
.menu-root {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 40px;
}
.state-msg {
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 20px;
  font-size: 14px;
}
.state-msg.error { color: #9A3B2E; }

.category-section {
  margin-top: 4px;
  scroll-margin-top: 58px;
}
.category-section h2 {
  background: var(--forest);
  color: #F4F1E8;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  padding: 13px 20px;
  margin: 0;
}

/* ---------- Product card: one product fills (roughly) one phone screen.
   Photo is full viewport width; name + prices sit below it. ---------- */
html {
  scroll-snap-type: y proximity;
}
.product-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  padding: 20px 0 32px;
}
.product-card:last-child { border-bottom: none; }

.card-photo-wrap {
  margin: 0 20px;
  aspect-ratio: 4 / 3;
  background: var(--wax-soft);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(31, 43, 34, 0.14);
}
.card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-photo.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wax);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 72px;
  background: var(--wax-soft);
}

.card-body {
  padding: 20px 20px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-name {
  font-size: clamp(23px, 6vw, 28px);
  font-weight: 700;
  font-style: normal;
  font-family: 'Source Serif 4', 'Georgia', serif;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}
.card-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 8px 0 0;
  line-height: 1.5;
}

.card-prices {
  margin-top: 22px;
}
.price-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.price-row--wholesale {
  border-bottom: 1px solid var(--line);
}
.price-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.price-value {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  white-space: nowrap;
}
.price-row--wholesale .price-label { color: var(--forest); }
.price-row--wholesale .price-value { font-size: 22px; font-weight: 700; color: var(--forest); }
.price-row--retail .price-label { color: var(--ink-soft); }
.price-row--retail .price-value { font-size: 13px; color: var(--ink-soft); }

.vat-note {
  text-align: center;
  font-size: 11.5px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 24px 0 0;
}

.site-footer {
  text-align: center;
  padding: 24px 16px 36px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.footer-contact {
  margin: 0 0 16px;
}
.footer-address {
  margin: 0 0 4px;
}
.footer-phone {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.footer-phone a {
  color: var(--forest);
  text-decoration: none;
}
.footer-phone a:hover {
  text-decoration: underline;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  background: #25D366;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}
.whatsapp-btn:hover {
  background: #1EBE5A;
}

.footer-map {
  max-width: 640px;
  margin: 0 auto;
}
.footer-map iframe {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.footer-map-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
}
.footer-map-link:hover {
  text-decoration: underline;
}

.footer-legal-link {
  display: block;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 11.5px;
  text-decoration: underline;
}
.footer-legal-link:hover {
  color: var(--forest);
}

/* ---------- Cart: quantity stepper + add-to-cart (product card) ---------- */
.cart-control {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
}
.qty-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--surface);
  color: var(--forest);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.qty-btn:hover { background: var(--wax-soft); }
.qty-value {
  width: 38px;
  min-width: 38px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  border: none;
  background: transparent;
  padding: 6px 0;
}
.qty-value:focus {
  outline: 2px solid var(--forest);
  outline-offset: -2px;
  border-radius: 4px;
}
.add-to-cart-btn {
  flex: 1;
  background: var(--forest);
  color: #F4F1E8;
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.add-to-cart-btn:hover { background: var(--forest-deep); }

/* ---------- Toast: short "added to cart" confirmation ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 16px;
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--forest-deep);
  color: #F4F1E8;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 8px 24px rgba(31, 43, 34, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast--error {
  background: var(--logo-red);
  box-shadow: 0 8px 24px rgba(168, 47, 29, 0.4);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Cart: full-width bottom bar ---------- */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 20px;
  padding-bottom: calc(26px + env(safe-area-inset-bottom));
  border: none;
  background: var(--logo-red);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 -6px 18px rgba(168, 47, 29, 0.4);
}
.cart-bar.hidden { display: none; }
.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-bar-label {
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
}
.cart-fab-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.cart-fab-badge {
  position: absolute;
  top: -9px;
  right: -12px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wax);
  color: #FFFFFF;
  border: 2px solid var(--logo-red);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-fab-badge.hidden { display: none; }

.cart-bar-total {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Cart: overlay + slide-up panel ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 43, 34, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 50;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  max-height: 82vh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px rgba(31, 43, 34, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.22s ease;
  z-index: 60;
  pointer-events: none;
}
.cart-panel.open { transform: translateY(0); pointer-events: auto; }

.cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.cart-panel-head h2 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}
.cart-close {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px;
}
.cart-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 32px 0;
  font-size: 14px;
}
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-name {
  margin: 0;
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.cart-item-price {
  margin: 2px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.cart-remove-btn {
  border: none;
  background: none;
  color: #9A3B2E;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

.cart-panel-foot {
  flex: none;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.cart-send-btn {
  border: none;
  border-radius: 999px;
  padding: 13px;
  background: #25D366;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.cart-send-btn:hover:not(:disabled) { background: #1EBE5A; }
.cart-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cart-clear-btn {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .product-row { animation: none; }
}

@media (min-width: 720px) {
  .topbar h1 { font-size: 34px; }
}
