/* ── Tokens ── */
:root {
  --bg: #FFFDF8;
  --bg-alt: #F7F3ED;
  --text: #3D2B1F;
  --text-muted: #7A6B5D;
  --accent: #C8963E;
  --accent-hover: #B07E2E;
  --card-bg: #FFFFFF;
  --card-border: #EDE8E0;
  --header-bg: #3D2B1F;
  --header-text: #FFFDF8;
  --footer-bg: #3D2B1F;
  --footer-text: #D4C8B8;
  --success: #2E7D32;
  --error: #C62828;
  --overlay: rgba(0,0,0,0.45);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1410;
    --bg-alt: #231C15;
    --text: #EDE4D8;
    --text-muted: #9E8E7E;
    --accent: #D4A44A;
    --accent-hover: #E0B55C;
    --card-bg: #2A2118;
    --card-border: #3D3228;
    --header-bg: #1A1410;
    --header-text: #EDE4D8;
    --footer-bg: #1A1410;
    --footer-text: #9E8E7E;
    --overlay: rgba(0,0,0,0.65);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1A1410;
  --bg-alt: #231C15;
  --text: #EDE4D8;
  --text-muted: #9E8E7E;
  --accent: #D4A44A;
  --accent-hover: #E0B55C;
  --card-bg: #2A2118;
  --card-border: #3D3228;
  --header-bg: #1A1410;
  --header-text: #EDE4D8;
  --footer-bg: #1A1410;
  --footer-text: #9E8E7E;
  --overlay: rgba(0,0,0,0.65);
  color-scheme: dark;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ── Holiday Banner ── */
.holiday-banner {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
}
.holiday-banner.visible { display: block; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #3D2B1F 0%, #5A3F2E 60%, #4A3526 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.15); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-img {
  height: 62px;
  width: auto;
  transition: height var(--transition);
}
.site-header.scrolled .logo-img { height: 48px; }

.main-nav { display: flex; gap: 1.5rem; margin-left: auto; margin-right: 2rem; }
.nav-link {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  transition: opacity var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover { opacity: 1; color: #fff; }
.nav-link:hover::after { width: 100%; }

.cart-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--header-text);
  padding: 0.5rem;
}
.cart-btn svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute;
  top: 0; right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-badge:empty, .cart-badge[data-count="0"] { display: none; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/hero.jpg') center/cover no-repeat;
  filter: brightness(0.4);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 3rem 1.5rem;
  color: #fff;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  flex-shrink: 0;
}
.status-dot.closed { background: #EF5350; }

.hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.8rem;
}
.hero p {
  font-size: 0.88rem;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition), transform 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* ── Sections ── */
.section {
  padding-block: 4rem;
}
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(135deg, #3D2B1F 0%, #5A3F2E 60%, #4A3526 100%); color: #EDE4D8; }
.section-dark .section-label { color: var(--accent); }
.section-dark .info-card { background: #2A2118; border-color: #4D3E30; color: #EDE4D8; }
.section-dark .info-card h3 { color: #EDE4D8; }
.section-dark .info-card p { color: #9E8E7E; }

.section-label {
  display: block;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 520px;
  margin-bottom: 2rem;
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 1rem;
}
.about-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.about-text em {
  font-family: 'Lora', Georgia, serif;
  color: var(--accent);
  font-style: italic;
}
.about-accent {
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.about-img-wrap {
  position: relative;
}
.about-img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-badge {
  position: absolute;
  bottom: -16px;
  right: -8px;
  background: var(--accent);
  color: #fff;
  font-family: 'Lora', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.about-badge small {
  display: block;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ── Filters ── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Products ── */
.products-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 0.85rem;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.product-card[hidden] { display: none !important; }

.product-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.product-info {
  padding: 0.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-info h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.product-price {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.product-price small {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* Weight selector */
.weight-selector {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.weight-opt {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.weight-opt:hover { border-color: var(--accent); }
.weight-opt.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-add {
  margin-top: auto;
  width: 100%;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-add:hover { background: var(--accent); }

/* ── Info Grid ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.info-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.info-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.info-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.map-link {
  display: inline-block;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 137, 30, 0.14);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.subject-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pill { cursor: pointer; }
.pill input { display: none; }
.pill span {
  display: inline-block;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.pill:hover span { border-color: var(--accent); }
.pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-submit { align-self: flex-start; }

.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
}
.contact-info-card h4 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.contact-info-card p, .contact-info-card a {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.contact-success {
  display: none;
  text-align: center;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  color: var(--success);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}
.contact-success.show { display: block; }

/* ── Footer ── */
.site-footer {
  background: linear-gradient(135deg, #3D2B1F 0%, #5A3F2E 60%, #4A3526 100%);
  color: var(--footer-text);
  padding: 1.5rem 0;
  font-size: 0.78rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--footer-text); opacity: 0.7; transition: opacity var(--transition); }
.footer-links a:hover { opacity: 1; color: var(--footer-text); }

/* ── Cart Drawer ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: linear-gradient(135deg, #2A2118 0%, #3D2B1F 50%, #4A3526 100%);
  color: #EDE4D8;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-step, .checkout-step {
  display: none;
  flex-direction: column;
  height: 100%;
}
.cart-step.active, .checkout-step.active {
  display: flex;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #3D3228;
}
.cart-header h2 { font-size: 1rem; font-weight: 600; }
.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #EDE4D8;
  line-height: 1;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.2rem;
}

.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: 0.85rem; }

.cart-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #3D3228;
  align-items: center;
}
.cart-item-img {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h4 { font-size: 0.82rem; font-weight: 500; }
.cart-item-info .item-weight { font-size: 0.72rem; color: var(--text-muted); }
.cart-item-info .item-price { font-size: 0.82rem; font-weight: 600; color: var(--accent); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cart-item-qty button {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid #3D3228;
  background: #3D2B1F;
  color: #EDE4D8;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-qty span { font-size: 0.82rem; min-width: 1.2rem; text-align: center; }

.cart-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid #3D3228;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}
.cart-min-warning {
  font-size: 0.75rem;
  color: var(--error);
  margin-bottom: 0.6rem;
  display: none;
}
.cart-min-warning.show { display: block; }

.btn-checkout {
  width: 100%;
  text-align: center;
}
.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-back {
  background: none;
  border: none;
  font-size: 0.85rem;
  color: #9E8E7E;
}

.cart-drawer .form-group input,
.cart-drawer .form-group select,
.cart-drawer .form-group textarea {
  background: #3D2B1F;
  border-color: #3D3228;
  color: #EDE4D8;
}
.cart-drawer .form-group label { color: #9E8E7E; }
.cart-drawer .checkbox-group { color: #EDE4D8; }
.cart-drawer .checkout-error { background: rgba(198,40,40,0.15); }
.cart-drawer input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.85); }

/* Checkout */
.checkout-form .form-group { margin-bottom: 0.8rem; }
.checkout-error {
  background: rgba(198,40,40,0.08);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  display: none;
  margin-bottom: 0.8rem;
}
.checkout-error.show { display: block; }

.checkout-loading {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
}
.checkout-loading.show { display: block; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
}
.checkbox-group input { margin-top: 3px; accent-color: var(--accent); }

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.modal p, .modal li { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.5rem; }
.modal-close {
  display: block;
  margin: 1.5rem auto 0;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.5rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* ── Hero stagger ── */
.hero-stagger {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}
.hero-stagger.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-img-wrap { order: -1; }
  .info-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero { min-height: 55vh; }
}
