/* Cast & Crumb. The palette and type match the demo store's hosted checkout
   (Fraunces + Inter, cream, tomato and forest). */

:root {
  --cream: #f6efe3;
  --panel: #fffdf9;
  --ink: #221b16;
  --muted: #6f6257;
  --line: #e8dccb;
  --tomato: #c2412d;
  --tomato-dark: #a8321f;
  --ember: #e0782f;
  --mustard: #e3a92b;
  --sage: #6f8a62;
  --forest: #23402f;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;

  /* DPD's embed components */
  --dpd-primary: var(--tomato);
  --dpd-primary-text: #fff;
  --dpd-surface: var(--panel);
  --dpd-text: var(--ink);
  --dpd-muted: var(--muted);
  --dpd-border: var(--line);
  --dpd-radius: 6px;
  --dpd-font: var(--sans);
}

dpd-product::part(name) {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
}
dpd-product[layout="detail"]::part(name) { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.1; }
dpd-product[layout="detail"]::part(price) { font-size: 1.4rem; }
dpd-product::part(price) { color: var(--forest); font-weight: 600; }
dpd-product::part(card) { box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(60, 40, 20, 0.5); }
dpd-add-to-cart::part(button),
dpd-checkout-button::part(button) { font-weight: 600; letter-spacing: 0.01em; }
dpd-cart-overlay::part(drawer) { border-left: 4px solid var(--tomato); }

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tomato-dark); text-underline-offset: 3px; }
a:hover { color: var(--tomato); }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1em; }
code { font-size: 0.92em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.eyebrow {
  font: 600 0.78rem/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.8em;
}
.lede { font-size: 1.15rem; color: var(--muted); }
.button {
  display: inline-block;
  padding: 0.75em 1.4em;
  border-radius: 6px;
  background: var(--tomato);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--tomato-dark); color: #fff; }
.button.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.button.secondary:hover { background: var(--ink); color: var(--cream); }
.section { padding: 72px 0; }
/* back-to-back sections share one gap, unless a band's background separates them */
.section:not(.band) + .section:not(.band) { padding-top: 0; }

/* ---------- demo bar, header, footer ---------- */

.demo-bar {
  background: var(--forest);
  color: var(--cream);
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 9px 0;
}
.demo-bar a { color: #fff; }
.demo-bar code {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}
.logo img { width: 200px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover,
.site-nav a[aria-current] { color: var(--tomato); }

.site-footer {
  background: var(--forest);
  color: rgba(246, 239, 227, 0.85);
  padding: 48px 0 40px;
  margin-top: 40px;
  font-size: 0.95rem;
}
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; }
.footer-brand img { width: 180px; margin-bottom: 10px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { text-decoration: none; }
.footer-demo {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(246, 239, 227, 0.2);
  padding-top: 20px;
  margin: 0;
  font-size: 0.88rem;
}
.cart-count:not([hidden])::before { content: " ("; }
.cart-count:not([hidden])::after { content: ")"; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; }
  .logo img { width: 160px; }
  .site-header dpd-cart-button { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0; padding-bottom: 4px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

/* ---------- home ---------- */

.hero { padding: 64px 0 56px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { max-width: 12ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { border-radius: 14px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 { margin: 0; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}
.product-cell { display: flex; flex-direction: column; gap: 10px; }
.product-cell dpd-product { flex: 1; }
.details-link { font-size: 0.92rem; font-weight: 500; }

.band {
  background: var(--panel);
  border-block: 1px solid var(--line);
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split img { border-radius: 12px; }

.supper-club {
  background: var(--tomato);
  color: var(--cream);
  border-radius: 14px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.supper-club h2 { color: #fff; }
.supper-club p { margin: 0; max-width: 52ch; }
.supper-club dpd-add-to-cart {
  --dpd-primary: var(--forest);
}

@media (max-width: 800px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 40px; }
  .supper-club { grid-template-columns: 1fr; padding: 32px 24px; }
}

/* ---------- shop ---------- */

.page-head { padding: 56px 0 8px; }
.shop-group { margin-top: 48px; }
.shop-group h2 { font-size: 1.5rem; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 24px; }

/* ---------- product page ---------- */

.crumbs { font-size: 0.9rem; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }
.product-main { padding: 20px 0 48px; }
.product-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}
.prose h2 { font-size: 1.6rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 0.3em; }
.aside { display: flex; flex-direction: column; gap: 20px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}
.card h3 { font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }
.pairs img { border-radius: 8px; margin-bottom: 12px; }
.shows {
  background: #fbf4e6;
  border: 1px dashed var(--mustard);
}
.shows .eyebrow { color: #9a6b0a; margin-bottom: 0.4em; }

@media (max-width: 860px) {
  .product-body { grid-template-columns: 1fr; }
}

/* ---------- recipes ---------- */

.recipe-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.recipe-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.recipe-card:hover { color: inherit; border-color: var(--ember); }
.recipe-card div { padding: 18px 20px 22px; }
.recipe-card h2 { font-size: 1.3rem; margin-bottom: 0.3em; }
.recipe-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.disclaimer {
  background: #fbf4e6;
  border-left: 4px solid var(--mustard);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 0.93rem;
  margin: 24px 0;
}
.recipe-meta { color: var(--muted); font-size: 0.95rem; }
.recipe .ingredients { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px 24px 8px 40px; }
.recipe ol li { margin-bottom: 0.6em; }
.tip { font-style: italic; color: var(--muted); }
.from-book {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
}
.from-book img { border-radius: 8px; }
.from-book p { margin-bottom: 14px; }
.buy-row { display: flex; flex-wrap: wrap; gap: 10px; }
.buy-row dpd-checkout-button { --dpd-primary: var(--forest); }

@media (max-width: 560px) {
  .from-book { grid-template-columns: 1fr; }
  .from-book img { width: 160px; }
}

/* ---------- cart ---------- */

.cart-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }

@media (max-width: 800px) {
  .cart-page { grid-template-columns: 1fr; }
}
