/* ===================================================================
   Volcano Spirit Cacao, shop, legal & consent components
   Extends css/style.css (shares the same custom properties).
=================================================================== */

/* ---------- Header cart icon ---------- */
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ivory);
}
.cart-link svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--ivory);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
}
.cart-badge[data-count="0"] { display: none; }
.mobile-nav .cart-badge[data-count="0"] { display: inline; }

/* ---------- Product cards (two distinct sizes, each its own buy-box) ---------- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 34px 0 0; }
.product-card {
  background: var(--parchment-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}
.product-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 18px; }
.product-card h3 { font-size: 1.15rem; margin-bottom: 16px; }
.product-card h3 small { opacity: 0.65; font-size: 0.8em; font-weight: 400; }
.product-card [data-buy-box] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.product-card .qty-stepper { margin: 0 auto; }
.product-card .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ---------- Product add-to-cart block ---------- */
.buy-box {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.price-tag { font-family: var(--font-display); font-size: 1.6rem; color: var(--terracotta-dark); }
.price-note { font-size: 12px; opacity: 0.65; display: block; margin-top: 2px; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty-stepper button {
  width: 38px;
  height: 46px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--cacao);
}
.qty-stepper button:hover { background: rgba(0,0,0,0.05); }
.qty-stepper input {
  width: 42px;
  height: 46px;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-body);
  font-size: 15px;
  background: transparent;
  color: var(--cacao);
}
.add-note { font-size: 0.85rem; opacity: 0.7; margin-top: 10px; }

/* ---------- Mini cart toast ---------- */
.cart-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 1400;
  background: var(--forest-dark);
  color: var(--ivory);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
  transform: translateY(140%);
  transition: transform 0.35s ease;
}
.cart-toast.is-visible { transform: translateY(0); }
.cart-toast a { color: #e6b98d; text-decoration: underline; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--parchment-dim);
  color: var(--cacao);
  padding: 150px 0 60px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero h1 { color: var(--cacao); font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 6px; }
.page-hero p { opacity: 0.75; max-width: 560px; margin: 0; }

/* ---------- Page hero, full-width photo variant (about/spirit/shop/recipes/etc) ---------- */
.page-hero.has-photo {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding: 150px 0 54px;
  border-bottom: none;
  color: var(--ivory);
}
.page-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
@media (max-width: 800px) {
  .page-hero-media { background-attachment: scroll; }
}
.page-hero.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(61,39,24,0.28) 0%, rgba(61,39,24,0.72) 100%);
}
.page-hero.has-photo .container { position: relative; z-index: 1; }
.page-hero.has-photo h1 { color: var(--ivory); }
.page-hero.has-photo p { color: var(--ivory); opacity: 0.92; }
@media (max-width: 640px) {
  .page-hero.has-photo { min-height: 46vh; padding: 128px 0 40px; }
}

/* Taller hero variant, for pages that want more room for the photo */
.page-hero.has-photo.is-tall { min-height: 82vh; }
@media (max-width: 640px) {
  .page-hero.has-photo.is-tall { min-height: 62vh; }
}

/* Plain photo hero (no trust-row): fully centered rather than the
   in-between "centered box, left-aligned text" look -- the .has-trust
   variant (home/shop) is the deliberate exception, left-bound to match
   its bigger headline treatment. */
.page-hero.has-photo:not(.has-trust) {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.page-hero.has-photo:not(.has-trust) .container { max-width: 720px; margin: 0 auto; }
.page-hero.has-photo:not(.has-trust) .eyebrow { justify-content: center; }
.page-hero.has-photo:not(.has-trust) p { margin-left: auto; margin-right: auto; }

/* Hero variant that also carries a bottom trust-row (see .trust-row in
   style.css): text anchors to the top instead of the bottom, and extra
   bottom padding reserves room so the trust-row doesn't overlap it. */
.page-hero.has-photo.has-trust {
  align-items: flex-start;
  padding-bottom: 190px;
  text-align: center;
}
.page-hero.has-photo.has-trust .container { margin: 0 auto; max-width: 640px; }
.page-hero.has-photo.has-trust .eyebrow { justify-content: center; }
.page-hero.has-photo.has-trust p { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .page-hero.has-photo.has-trust { padding-bottom: 230px; }
}

/* ---------- Solid-terracotta mission band ---------- */
.cta-band.on-terracotta { background: var(--terracotta); }
.cta-band.on-terracotta p { color: var(--ivory); opacity: 0.92; }

/* ---------- Simple checkmark list (benefits) ---------- */
.check-list { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; align-items: baseline; gap: 10px; font-size: 1rem; }
.check-list li::before { content: "✓"; color: var(--terracotta); font-weight: 600; }

.page-body { padding: 60px 0 100px; }

/* ---------- Cart page ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 40px; }
.cart-table th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  font-weight: 500;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.cart-table td { padding: 20px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item-info { display: flex; align-items: center; gap: 16px; }
.cart-item-info img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius); }
.cart-item-info h3 { font-size: 1.05rem; margin: 0 0 4px; }
.cart-item-info span { font-size: 0.85rem; opacity: 0.65; }
.cart-remove { background: none; border: none; cursor: pointer; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta-dark); text-decoration: underline; padding: 0; }
.cart-line-total { font-family: var(--font-display); font-size: 1.05rem; }

.cart-empty { text-align: center; padding: 60px 0; }
.cart-empty p { opacity: 0.7; margin-bottom: 24px; }

.summary-card {
  background: var(--parchment-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.summary-row { display: flex; justify-content: space-between; font-size: 0.95rem; padding: 9px 0; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; font-family: var(--font-display); font-size: 1.25rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 50px; align-items: start; }

/* ---------- Forms (checkout / newsletter / contact) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--cacao);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.form-note { font-size: 0.85rem; opacity: 0.65; margin-top: 4px; }
.form-status { font-size: 0.92rem; margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(86,95,66,0.15); color: var(--sage); }
.form-status.err { background: rgba(110,36,48,0.1); color: var(--maroon); }
.form-field input[type="checkbox"],
label input[type="checkbox"] { accent-color: var(--terracotta); }

/* ---------- Newsletter band: photo left, cream card right, on solid terracotta ---------- */
.newsletter-band {
  background: var(--terracotta);
  color: var(--ivory);
  padding: 90px 0;
}
.newsletter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.newsletter-media { border-radius: var(--radius); overflow: hidden; }
.newsletter-media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1 / 1; }
.newsletter-card {
  background: var(--parchment);
  color: var(--cacao);
  border-radius: 20px;
  padding: 54px 48px;
  text-align: center;
}
.newsletter-card h2 { color: var(--terracotta-dark); font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: 12px; }
.newsletter-card > p { max-width: 420px; margin: 0 auto 30px; opacity: 0.85; }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input[type="email"] {
  flex: 1 1 220px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--cacao);
  font-family: var(--font-body);
  font-size: 15px;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(61,39,24,0.45); }
.newsletter-form input[type="email"]:focus { outline: 2px solid var(--terracotta); }
.newsletter-consent { max-width: 420px; margin: 16px auto 0; font-size: 12px; opacity: 0.65; text-align: center; }
.newsletter-consent a { color: var(--terracotta-dark); text-decoration: underline; }

@media (max-width: 900px) {
  .newsletter-grid { grid-template-columns: 1fr; }
  .newsletter-media img { aspect-ratio: 16 / 9; }
  .newsletter-card { padding: 40px 28px; }
}

/* ---------- Photo CTA band (mid-page CTA over a photo, white pill button) ---------- */
.photo-cta {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ivory);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.photo-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(61,39,24,0.55), rgba(61,39,24,0.62));
}
@media (max-width: 800px) {
  .photo-cta { background-attachment: scroll; }
}
.photo-cta-content { position: relative; z-index: 1; max-width: 640px; padding: 0 24px; }
.photo-cta-content h2 { color: var(--ivory); font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 16px; }
.photo-cta-content p { opacity: 0.92; margin-bottom: 30px; }
.photo-cta .btn-white {
  background: var(--ivory);
  color: var(--cacao);
  border-color: var(--ivory);
}
.photo-cta .btn-white:hover { background: #fdf8ef; }

/* ---------- Spirit of Cacao: stats + comparison ---------- */
.stat-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}
.stat-block b { display: block; font-family: var(--font-display); font-size: 2.6rem; color: var(--terracotta-dark); margin-bottom: 10px; }
.stat-block span { font-size: 0.85rem; opacity: 0.75; line-height: 1.5; }

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: stretch;
  margin-top: 46px;
}
.compare-card {
  background: var(--parchment-dim);
  border: 1px solid var(--line);
  border-left: 3px solid var(--terracotta);
  border-radius: var(--radius);
  padding: 32px 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.compare-card h3 { font-size: 1.2rem; margin: 0 0 14px; }
.compare-card p { font-size: 0.94rem; opacity: 0.85; margin: 0 0 12px; }
.compare-card p:last-child { margin-bottom: 0; }
.compare-card-muted { border-left-color: var(--line); opacity: 0.85; }
.compare-vs {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  opacity: 0.5;
  text-align: center;
}

@media (max-width: 900px) {
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-vs { padding: 4px 0; }
}

/* ---------- Divider columns: an unboxed, editorial two-up layout,
   a single hairline between columns instead of card backgrounds/borders ---------- */
.divider-cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 50px;
}
.divider-cols-rule { width: 1px; align-self: stretch; background: var(--line); }
.divider-cols-col { text-align: center; padding: 0 8px; }
.divider-cols-label {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--terracotta-dark);
  margin-bottom: 10px;
}
.divider-cols-col h3 { font-size: 1.35rem; font-weight: 400; margin: 0 0 18px; }
.divider-cols-col p { font-size: 0.98rem; line-height: 1.7; opacity: 0.82; max-width: 420px; margin: 0 auto 14px; }
.divider-cols-col p:last-child { margin-bottom: 0; }
.divider-cols-col-muted { opacity: 0.75; }
@media (max-width: 800px) {
  .divider-cols { grid-template-columns: 1fr; gap: 34px; margin-top: 38px; }
  .divider-cols-rule { width: 60px; height: 1px; margin: 0 auto; }
}

/* ---------- Legal / prose pages ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin-top: 1.6em; }
.prose p, .prose li { font-size: 0.98rem; opacity: 0.88; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.prose a { color: var(--terracotta-dark); text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.92rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border: 1px solid var(--line); vertical-align: top; }
.updated-note { font-size: 12.5px; opacity: 0.6; margin-bottom: 40px; }
.legal-toc { background: var(--parchment-dim); border: 1px solid var(--line); border-left: 3px solid var(--terracotta); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 46px; }
.legal-toc h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.legal-toc ol { margin: 0; padding-left: 1.2em; columns: 2; font-size: 0.9rem; }

/* ---------- Blog list ---------- */
.article-list { display: flex; flex-direction: column; }
.article-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: center;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.article-list .article-row:first-child { padding-top: 0; }
.article-list .article-row:last-child { border-bottom: none; }
.article-row-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.article-row h2 { font-size: 1.4rem; margin-bottom: 10px; }
.article-row h2 a { color: inherit; }
.article-row h2 a:hover { color: var(--terracotta-dark); }
.article-row p { opacity: 0.85; margin-bottom: 10px; }
.article-row .add-note { margin: 0; }
@media (max-width: 720px) {
  .article-row { grid-template-columns: 1fr; gap: 20px; padding: 32px 0; }
}

/* ---------- Cookie consent banner (centered modal + backdrop) ---------- */
.cookie-banner-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(27,23,18,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cookie-banner-overlay.is-visible { opacity: 1; pointer-events: auto; }
.cookie-banner {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--parchment);
  color: var(--cacao);
  border-radius: 20px;
  padding: 40px 44px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5);
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.3s ease;
}
.cookie-banner-overlay.is-visible .cookie-banner { transform: translateY(0); }
.cookie-banner h3 { font-size: 1.5rem; margin: 0 0 16px; }
.cookie-banner-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--terracotta);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.cookie-banner-close:hover { background: var(--parchment-dim); }
.cookie-banner p { font-size: 0.92rem; opacity: 0.8; margin: 0 0 26px; line-height: 1.6; }
.cookie-banner p a { color: var(--terracotta-dark); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cookie-actions .btn { padding: 13px 24px; font-size: 13px; flex: 1 1 140px; justify-content: center; }
.btn-light {
  background: var(--parchment);
  color: var(--cacao);
  border: 1px solid var(--line);
}
.btn-light:hover { background: var(--ivory); }
.cookie-links { display: flex; gap: 22px; justify-content: center; margin-top: 20px; }
.cookie-links a { font-size: 0.82rem; color: var(--terracotta-dark); text-decoration: underline; opacity: 0.85; }
@media (max-width: 480px) {
  .cookie-banner { padding: 34px 24px; }
  .cookie-actions .btn { flex: 1 1 100%; }
}

.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(45,54,36,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cookie-modal-overlay.is-visible { opacity: 1; pointer-events: auto; }
.cookie-modal {
  background: var(--parchment);
  color: var(--cacao);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 32px 30px;
}
.cookie-modal h3 { margin-bottom: 6px; }
.cookie-modal > p { font-size: 0.92rem; opacity: 0.75; margin-bottom: 22px; }
.cookie-cat { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.cookie-cat:last-of-type { border-bottom: 1px solid var(--line); }
.cookie-cat h4 { margin: 0 0 4px; font-size: 0.98rem; }
.cookie-cat p { margin: 0; font-size: 0.85rem; opacity: 0.7; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: rgba(61,39,24,0.25); border-radius: 999px; transition: background 0.2s ease; cursor: pointer;
}
.switch span::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s ease;
}
.switch input:checked + span { background: var(--terracotta); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:disabled + span { opacity: 0.5; cursor: not-allowed; }
.cookie-modal-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .legal-toc ol { columns: 1; }
}
@media (max-width: 640px) {
  .cart-item-info img { width: 56px; height: 56px; }
  .cart-table th:nth-child(3), .cart-table td:nth-child(3) { display: none; }
  .page-hero { padding: 130px 0 46px; }
}

/* ---------- FAQ accordion ---------- */
.faq-band { background: var(--forest-dark); color: var(--ivory); padding: 90px 0; }
.faq-band .section-head { margin-bottom: 44px; }
.faq-band h2 { color: var(--ivory); }
.faq-band .section-head p { color: var(--ivory); opacity: 0.75; }
.faq-list { max-width: 860px; margin: 0 auto; border-top: 1px solid rgba(241,227,201,0.2); }
.faq-item { border-bottom: 1px solid rgba(241,227,201,0.2); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.08rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--terracotta);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 4px 26px; max-width: 760px; opacity: 0.82; font-size: 0.96rem; line-height: 1.6; }
