/* =========================================================
   Crumbs & Love — modern, minimal home-bakery site.
   ========================================================= */

:root {
  --blush: #f3c9c4;
  --blush-deep: #e0958c;
  --rose: #d9756b;
  --rose-dark: #b8564d;
  --olive: #8a9a5b;
  --cream: #fdf6ef;
  --card: #fffcf9;
  --cocoa: #4a342a;
  --cocoa-soft: #8b7565;
  --border: #f0ded8;

  --font-display: "Playfair Display", Georgia, serif;
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 1140px;
  --shadow-sm: 0 2px 10px rgba(74, 52, 42, 0.08);
  --shadow-md: 0 14px 34px rgba(74, 52, 42, 0.14);
  --focus-ring: 3px solid #d9756b;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
#menu, #about, #how { scroll-margin-top: 92px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0; background: var(--cream); color: var(--cocoa);
  font-family: var(--font-sans); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); color: var(--cocoa); line-height: 1.18; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--cocoa-soft); }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--cocoa); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 1000; transition: top 0.2s ease; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: var(--font-sans);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--rose); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--rose-dark); }
.btn-ghost { background: transparent; color: var(--cocoa); border-color: var(--cocoa); }
.btn-ghost:hover { background: var(--cocoa); color: #fff; }
.btn-large { padding: 15px 30px; font-size: 1.02rem; }
.btn-small { padding: 9px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* -------------------- Header -------------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(253, 246, 239, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark { color: var(--rose); }
.logo-photo { display: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.logo-photo.has-photo { display: block; }
.logo-photo.has-photo ~ .logo-mark { display: none; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--cocoa); }
.wordmark em { font-style: normal; color: var(--rose); margin: 0 1px; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-menu { display: flex; gap: 26px; }
.nav-menu a { text-decoration: none; font-weight: 500; color: var(--cocoa); font-size: 0.94rem; position: relative; }
.nav-menu a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--rose); transition: width 0.2s ease; }
.nav-menu a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.hamburger, .hamburger::before, .hamburger::after { display: block; width: 20px; height: 2px; background: var(--cocoa); position: relative; }
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.cart-btn { position: relative; background: var(--card); border: 1.5px solid var(--border); border-radius: 999px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--cocoa); flex-shrink: 0; }
.cart-btn:hover { border-color: var(--rose); color: var(--rose); }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--rose); color: #fff; font-size: 0.68rem; font-weight: 700; width: 19px; height: 19px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { justify-content: flex-end; }
  .nav-menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--cream); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 14px; display: none; }
  .nav-menu.open { display: flex; }
}

/* -------------------- Eyebrow / titles -------------------- */
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.76rem; font-weight: 700; color: var(--rose); margin-bottom: 8px; }
.center { text-align: center; }
.section-title.center, .eyebrow.center, .section-lead.center { margin-left: auto; margin-right: auto; }
.section { padding: 68px 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 640px; margin-left: auto; margin-right: auto; }
.section-lead { max-width: 560px; font-size: 1rem; }

/* -------------------- Hero -------------------- */
.hero { position: relative; overflow: hidden; padding-top: 8px; }
.hero-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.blob-a { width: 360px; height: 360px; background: var(--blush); opacity: 0.55; top: -140px; right: -100px; }
.blob-b { width: 240px; height: 240px; background: var(--olive); opacity: 0.14; bottom: -80px; left: -80px; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px; padding-top: 52px; padding-bottom: 60px; }
.hero-copy h1 { font-size: clamp(2.2rem, 4.8vw, 3.4rem); text-wrap: balance; }
.hero-sub { font-size: 1.08rem; max-width: 460px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual svg { width: min(300px, 78vw); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .hero-visual { order: 0; }
  .hero-actions { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
}

/* -------------------- Products grid -------------------- */
.menu-section { background: var(--card); }
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 44px; }
.product-card { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; }
.product-media { border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; aspect-ratio: 4/3; background: var(--blush); display: flex; align-items: center; justify-content: center; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.availability-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; margin-bottom: 10px; align-self: flex-start; }
.availability-badge.in-stock { background: #e7efd9; color: #4f5f2c; }
.availability-badge.lead-time { background: #fbe8cf; color: #8a5a1a; }
.product-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.product-card .product-desc { font-size: 0.92rem; margin-bottom: 16px; }

.variant-select { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.variant-chip { border: 1.5px solid var(--border); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: 0.84rem; font-weight: 600; cursor: pointer; color: var(--cocoa); }
.variant-chip.selected { border-color: var(--rose); background: #fdeae6; color: var(--rose-dark); }
.variant-chip:disabled { opacity: 0.4; cursor: not-allowed; }

.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.product-price { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--rose-dark); }
.qty-row { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty-btn { background: var(--card); border: none; width: 30px; height: 30px; font-size: 1.05rem; cursor: pointer; color: var(--cocoa); }
.qty-btn:hover { background: var(--olive); color: #fff; }
.qty-value { width: 30px; text-align: center; font-weight: 700; font-size: 0.92rem; }
.add-to-cart-btn { width: 100%; margin-top: 14px; }
.add-to-cart-btn.added { background: var(--olive); }

@media (max-width: 700px) { .products-grid { grid-template-columns: 1fr; } }

/* -------------------- How it works -------------------- */
.how-section { background: var(--cream); }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.how-step { text-align: center; padding: 8px; }
.how-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blush); color: var(--rose-dark); font-family: var(--font-display); font-weight: 700; margin-bottom: 14px; }
.how-step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.how-step p { font-size: 0.9rem; margin: 0; }

@media (max-width: 700px) { .how-steps { grid-template-columns: 1fr; } }

/* -------------------- About -------------------- */
.about-section { background: var(--card); }
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.about-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); max-width: 300px; }
.custom-photo { display: none; width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); object-fit: cover; }
.custom-photo.has-photo { display: block; }
.custom-photo.has-photo ~ svg { display: none; }
.about-copy h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }

@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; text-align: center; } .about-photo { margin: 0 auto; } }

/* -------------------- Cart drawer -------------------- */
.cart-backdrop { position: fixed; inset: 0; background: rgba(74,52,42,0.35); z-index: 150; }
.cart-backdrop[hidden] { display: none; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100vw);
  background: var(--cream); z-index: 151; box-shadow: -12px 0 30px rgba(74,52,42,0.18);
  transform: translateX(100%); transition: transform 0.28s ease; display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.cart-drawer-head h2 { margin: 0; font-size: 1.3rem; }
.cart-close { background: var(--card); border: 1px solid var(--border); border-radius: 50%; width: 34px; height: 34px; font-size: 1.2rem; cursor: pointer; color: var(--cocoa); }
.cart-drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.cart-empty { text-align: center; color: var(--cocoa-soft); padding: 40px 0; }
.cart-items { display: grid; gap: 14px; margin-bottom: 12px; }
.cart-item { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.cart-item-info { flex: 1; }
.cart-item-info b { display: block; font-size: 0.95rem; }
.cart-item-info span { font-size: 0.8rem; color: var(--cocoa-soft); }
.cart-item-price { font-weight: 700; color: var(--rose-dark); font-size: 0.92rem; white-space: nowrap; }
.cart-item-remove { background: none; border: none; color: var(--cocoa-soft); cursor: pointer; font-size: 1.1rem; padding: 4px; }
.cart-item-remove:hover { color: var(--rose); }

.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); margin: 8px 0 18px; }
.cart-total-row strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--rose-dark); }

.cart-checkout-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--cocoa); }
.field input, .field textarea { padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 10px; font: inherit; background: #fff; color: var(--cocoa); resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--rose); }
.cart-actions { display: grid; gap: 10px; margin-top: 4px; }
.order-note { min-height: 1.2em; font-size: 0.86rem; color: var(--rose-dark); font-weight: 600; margin: 8px 0 0; }

/* -------------------- Sticky mobile cart bar -------------------- */
.sticky-cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--cream); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(0,0,0,0.08); }
.sticky-cart-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; font-weight: 600; }
@media (min-width: 700px) { .sticky-cart { display: none !important; } }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--cocoa); color: #d8c7ba; padding-top: 44px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; padding-bottom: 28px; }
.footer-brand .wordmark { color: #fff; }
.footer-brand p { color: #b5a292; font-size: 0.85rem; margin: 8px 0 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a { text-decoration: none; color: #d8c7ba; font-size: 0.92rem; }
.footer-links a:hover, .footer-contact a:hover { color: var(--blush); }
.footer-contact p { margin: 0 0 8px; font-size: 0.92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 24px; text-align: center; font-size: 0.8rem; color: #a8967f; }
.admin-link { color: #83725f; text-decoration: underline; margin-left: 8px; }
.admin-link:hover { color: var(--blush); }

@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; text-align: center; } }

/* -------------------- Last order banner -------------------- */
.last-order-banner { background: var(--olive); color: #fff; font-size: 0.88rem; font-weight: 600; padding: 10px 24px; }
.last-order-banner[hidden] { display: none; }
.last-order-banner .wrap { display: flex; align-items: center; justify-content: center; gap: 14px; }
.last-order-banner button { background: none; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1; opacity: 0.8; }
.last-order-banner button:hover { opacity: 1; }

/* -------------------- Hero trust row -------------------- */
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 18px; }
.trust-row li { font-size: 0.86rem; color: var(--cocoa-soft); position: relative; padding-left: 18px; font-weight: 600; }
.trust-row li::before { content: "✓"; position: absolute; left: 0; color: var(--olive); font-weight: 800; }

/* -------------------- Custom orders -------------------- */
.custom-section { background: var(--blush); }
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.custom-form { background: var(--card); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); display: grid; gap: 14px; }
@media (max-width: 860px) { .custom-grid { grid-template-columns: 1fr; } }

/* -------------------- Reviews / testimonials -------------------- */
.reviews-section { background: var(--card); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.testimonial { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin: 0; }
.testimonial p { font-size: 0.98rem; color: var(--cocoa); font-style: italic; }
.testimonial footer { font-size: 0.82rem; color: var(--rose-dark); font-weight: 700; }
.testimonial-note { text-align: center; font-size: 0.8rem; margin-top: 24px; color: #a89878; }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* -------------------- Gallery -------------------- */
.gallery-section[hidden] { display: none; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* -------------------- FAQ -------------------- */
.faq-section { background: var(--cream); }
.faq-list { max-width: 720px; margin: 32px auto 0; display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 4px 20px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 0; color: var(--cocoa); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--rose); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 16px; margin: 0; }
.faq-item a { color: var(--rose-dark); font-weight: 600; text-decoration: underline; }

/* -------------------- Checkout: fulfillment, date, deposit ---- */
.field-label-top { display: block; font-size: 0.85rem; font-weight: 600; color: var(--cocoa); margin-bottom: 6px; }
.fulfillment-toggle { display: flex; gap: 10px; margin-bottom: 6px; }
.fulfillment-toggle label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--border); border-radius: 10px; padding: 9px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.fulfillment-toggle input { accent-color: var(--rose); }
.deposit-note { font-size: 0.82rem; color: var(--cocoa-soft); background: var(--blush); border-radius: 10px; padding: 10px 12px; margin: 4px 0 14px; }

/* -------------------- Cart confirmation panel -------------------- */
.cart-confirmation[hidden] { display: none; }
.cart-confirmation { text-align: center; padding: 20px 6px; }
.confirm-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--olive); color: #fff; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.cart-confirmation h3 { margin-bottom: 10px; }
.cart-confirmation #confirmSummary { font-size: 0.9rem; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; white-space: pre-line; margin-bottom: 6px; }
.cart-confirmation .btn { margin-top: 10px; }

/* -------------------- Toast -------------------- */
.cl-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--cocoa); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow-md); z-index: 200;
  opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; pointer-events: none;
}
.cl-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .cl-toast { transition: none; } }
