/* ============================================================
   Crevita Foods — Cookies page styles
   Page-specific only. Cards reuse the site-wide .product-card
   system from style.css; everything here is themed with the
   existing CSS variables so light/dark both work automatically.
   ============================================================ */

/* ── Hero ── */
.cookie-hero {
  position: relative;
  text-align: center;
  padding: clamp(56px, 9vw, 104px) 24px clamp(48px, 7vw, 88px);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(184,113,42,0.08), transparent 60%),
    linear-gradient(180deg, var(--cream-mid), var(--cream));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.cookie-hero-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.cookie-hero h1 {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  color: var(--brown);
  margin: 0 auto 16px;
  letter-spacing: -0.01em;
}
.cookie-hero p {
  max-width: 620px;
  margin: 0 auto 30px;
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.6;
  color: var(--muted);
}
.cookie-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  background: var(--brown);
  color: var(--white);
  border: none;
  border-radius: var(--r-full, 999px);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(61,31,10,0.20);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.cookie-hero-cta:hover {
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(61,31,10,0.28);
}

/* Fade-up entrance */
.cookie-fade { opacity: 0; transform: translateY(18px); animation: cookieFadeUp 0.7s ease forwards; }
.cookie-fade.d1 { animation-delay: 0.08s; }
.cookie-fade.d2 { animation-delay: 0.16s; }
.cookie-fade.d3 { animation-delay: 0.24s; }
@keyframes cookieFadeUp { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cookie-fade { animation: none; opacity: 1; transform: none; }
}

/* ── Toolbar: search + sort ── */
.cookie-controls {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cookie-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}
.cookie-search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.cookie-search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1px solid var(--border);
  border-radius: var(--r-full, 999px);
  background: var(--white);
  font-family: var(--ff-body);
  font-size: var(--text-sm);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cookie-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,113,42,0.14);
}

/* ── Category filter pills ── */
.cookie-filters {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-filters .cookie-chip {
  position: relative;
  cursor: pointer;
}
.cookie-filters .cookie-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cookie-filters .cookie-chip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-full, 999px);
  font-size: var(--text-sm);
  color: var(--muted);
  background: var(--white);
  transition: all 0.2s ease;
}
.cookie-filters .cookie-chip input:checked + span {
  border-color: var(--brown);
  background: var(--brown);
  color: var(--white);
}
.cookie-filters .cookie-chip.soon span { opacity: 0.55; }
.cookie-filters .cookie-chip.soon { pointer-events: none; }

/* ── Grid: 2 cols desktop, 1 col mobile ── */
.cookies-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}
.cookies-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.cookies-count { font-size: var(--text-sm); color: var(--muted); }
.cookies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: stretch;
}
.cookie-card {
  display: flex;
  flex-direction: column;
}
/* Wide 2-col cards need a shorter media area than the site default 4:5,
   otherwise each card becomes ~700px tall. Keep it premium and balanced. */
.cookie-card .product-img-wrap { aspect-ratio: 3 / 2; }
.cookie-card .product-img-wrap img,
.cookie-card .product-img-wrap .img-placeholder {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cookie-card .product-img-wrap .img-placeholder { font-size: 84px; }
.cookie-card .product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cookie-card .cookie-price { margin: 4px 0 16px; }

.cookie-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cookie-cat {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.cookie-stock {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--r-full, 999px);
}
.cookie-stock.in  { color: var(--green); background: #EBF5EC; }
.cookie-stock.out { color: #B23A2E; background: #FBEAE8; }

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.cookie-actions .add-cart-btn { flex: 1; }
.view-details-btn {
  padding: 9px 16px;
  background: transparent;
  color: var(--brown);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.view-details-btn:hover {
  border-color: var(--brown);
  background: var(--cream-mid);
  color: var(--brown);
}
.add-cart-btn:disabled {
  background: var(--border);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* ── Quick-view modal ── */
.cookie-quickview {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(26,16,8,0.55);
  backdrop-filter: blur(3px);
}
.cookie-quickview.open { display: flex; animation: qvFade 0.25s ease; }
@keyframes qvFade { from { opacity: 0; } to { opacity: 1; } }
.cookie-quickview-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(61,31,10,0.35);
}
.qv-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--cream-mid);
  color: var(--brown);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.qv-close:hover { background: var(--border); }
.cookie-quick-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.qv-media {
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.qv-media img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.qv-emoji { font-size: 96px; }
.qv-info { padding: 34px 32px; }
.qv-cat {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.qv-info h2 {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: 28px;
  color: var(--brown);
  margin: 6px 0 8px;
}
.qv-rating { margin-bottom: 12px; }
.qv-desc {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--muted);
  margin: 16px 0;
}
.qv-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 8px;
}
.qv-highlights li {
  position: relative;
  padding-left: 24px;
  font-size: var(--text-sm);
  color: var(--text);
}
.qv-highlights li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
.qv-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.qv-buy .add-cart-btn { padding: 12px 26px; }
.qv-cart-link { font-size: var(--text-sm); font-weight: 600; color: var(--gold); text-decoration: none; }
.qv-cart-link:hover { text-decoration: underline; }

/* ── Bottom CTA band ── */
.cookie-cta-band {
  text-align: center;
  padding: clamp(56px, 8vw, 96px) 24px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(184,113,42,0.10), transparent 60%),
    var(--cream-mid);
  border-top: 1px solid var(--border);
}
.cookie-cta-band h2 {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.12;
  color: var(--brown);
  margin: 0 0 14px;
}
.cookie-cta-band p {
  max-width: 540px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cookie-quick-body { grid-template-columns: 1fr; }
  .qv-media { min-height: 200px; }
}
@media (max-width: 640px) {
  .cookies-grid { grid-template-columns: 1fr; gap: 22px; }
  .cookie-actions { flex-direction: column; }
  .view-details-btn { width: 100%; }
}

/* ── Dark theme nudges (site toggles body.dark) ── */
body.dark .cookie-search input,
body.dark .cookie-filters .cookie-chip span,
body.dark .cookie-quickview-card { background: var(--white); border-color: var(--border); color: var(--text); }
body.dark .cookie-stock.in  { background: rgba(45,122,58,0.16); }
body.dark .cookie-stock.out { background: rgba(178,58,46,0.18); }
body.dark .qv-close { background: var(--cream-mid); }
