/* ============================================================
   Caulfield Cellars — light, minimal, wine-first.
   Cream paper background, burgundy accent, serif display type.
   ============================================================ */

:root {
  --bg: #faf7f2;            /* warm cream */
  --surface: #ffffff;
  --surface-soft: #f4efe7;
  --text: #2b2226;
  --text-muted: #6e6068;
  --border: #e8e0d6;
  --wine: #6e1e2f;          /* burgundy */
  --wine-dark: #571825;
  --wine-tint: #f6ebee;
  --gold: #a98a5b;
  --ok: #2f7d4f;
  --warn: #b3261e;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 34, 38, 0.05), 0 8px 24px rgba(43, 34, 38, 0.06);
  --shadow-lift: 0 2px 4px rgba(43, 34, 38, 0.06), 0 14px 34px rgba(43, 34, 38, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--wine-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.container--narrow { max-width: 780px; margin: 0 auto; padding: 0 22px; }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.note-muted { color: var(--text-muted); font-size: var(--text-sm); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 22px;
  font: 600 0.95rem var(--sans);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--wine); color: #fff; }
.btn--primary:hover { background: var(--wine-dark); color: #fff; }
.btn--primary:disabled { background: #c9b8bd; cursor: default; }
.btn--secondary { background: transparent; color: var(--wine); border-color: var(--wine); }
.btn--secondary:hover { background: var(--wine-tint); color: var(--wine-dark); }
.btn--sm { padding: 7px 16px; font-size: 0.875rem; }
.btn--lg { padding: 13px 30px; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 26px;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav__brand:hover { color: var(--wine); }
.nav__brand svg { flex: none; color: var(--wine); }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav__link {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav__link:hover { color: var(--text); background: var(--surface-soft); }
.nav__link.is-active { color: var(--wine); background: var(--wine-tint); font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.cart-link { position: relative; background: none; border: none; cursor: pointer; color: var(--text); padding: 6px; display: inline-flex; }
.cart-link:hover { color: var(--wine); }
.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  font: 700 0.68rem/17px var(--sans);
  text-align: center;
}
@media (max-width: 640px) {
  .nav { padding: 12px 16px; gap: 10px; }
  .nav__link { padding: 6px 10px; font-size: 0.875rem; }
}

/* ---------------- Sections ---------------- */
.section { padding: 74px 0; }
.section--soft { background: var(--surface-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 640px; margin-bottom: 38px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------------- Hero ---------------- */
.hero { padding: 72px 0 66px; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero__lede { color: var(--text-muted); font-size: 1.1rem; max-width: 44ch; margin-bottom: 26px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta { margin-top: 26px; display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); color: var(--text-muted); }
.hero__meta a { font-weight: 600; }
.hero__meta svg { flex: none; color: var(--gold); margin-top: 3px; }
.hero__meta > span { display: flex; gap: 8px; align-items: flex-start; }

/* Featured selection in the hero: a tilted stack of product cards */
.hero__shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-content: center; }
.hero__shelf .pcard:nth-child(2) { transform: translateY(-14px); }
.hero__shelf .pcard:nth-child(3) { transform: translateY(10px); }
@media (max-width: 900px) {
  .hero { padding: 54px 0 50px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__shelf .pcard:nth-child(n) { transform: none; }
}
@media (max-width: 560px) {
  .hero__shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__shelf .pcard:nth-child(3) { display: none; }
}

/* ---------------- Product cards ---------------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; }
.pcard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
a.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #dccfc0; color: var(--text); }
.pcard__media {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(175deg, #fdfbf8 0%, #f1e9dd 100%);
  overflow: hidden;
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__media svg { height: 78%; width: auto; }
.pcard__media--empty { color: var(--text-muted); font-size: var(--text-xs); }
.pcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 3px; }
.pcard__brand { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.pcard__name { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
.pcard__price { margin-top: 5px; font-weight: 700; }
.pcard__price small { color: var(--text-muted); font-weight: 500; }
.pcard__soldout { margin-top: 5px; color: var(--text-muted); font-weight: 600; font-size: var(--text-sm); }
.pcard__ship { font-size: var(--text-xs); color: var(--ok); font-weight: 600; }
.pcard__tag { font-size: var(--text-xs); color: var(--text-muted); }
.price-was { color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.price-save { color: var(--ok); font-size: var(--text-xs); font-weight: 700; margin-left: 6px; }

/* Category filter chips */
.shop-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.shop-filter {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 16px;
  font: 600 0.875rem var(--sans);
  cursor: pointer;
  transition: all 0.15s ease;
}
.shop-filter:hover { border-color: var(--wine); color: var(--wine); }
.shop-filter.is-active { background: var(--wine); border-color: var(--wine); color: #fff; }

.shop-page { padding: 56px 0 84px; }
.shop-head { max-width: 620px; margin-bottom: 34px; }
.shop-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------------- Product detail ---------------- */
.pdp__breadcrumb { margin: 0 0 22px; font-size: var(--text-sm); }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 800px) { .pdp { grid-template-columns: 1fr; gap: 28px; } }
.gallery__main {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(175deg, #fdfbf8 0%, #f1e9dd 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main svg { height: 82%; width: auto; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 2px solid var(--border);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--surface);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--wine); }
.pdp__brand { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.pdp__title { margin-bottom: 10px; font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.pdp__price { font-size: 1.45rem; font-weight: 700; margin-bottom: 14px; }
.pdp__desc { color: var(--text-muted); max-width: 54ch; }
.pdp__stock { font-size: var(--text-sm); font-weight: 600; margin: 10px 0 4px; }
.pdp__stock--in { color: var(--ok); }
.pdp__stock--low { color: #a06a1f; }
.pdp__stock--out { color: var(--warn); }
.pdp__actions { display: flex; gap: 14px; align-items: center; margin: 14px 0 8px; flex-wrap: wrap; }
.pdp__note { display: flex; gap: 9px; align-items: flex-start; color: var(--text-muted); font-size: var(--text-sm); margin: 12px 0 0; }
.pdp__note svg { color: var(--gold); }

.opt-group { margin: 16px 0 4px; }
.opt-group__label { display: flex; justify-content: space-between; font-size: var(--text-sm); font-weight: 600; margin-bottom: 8px; }
.opt-group__value { color: var(--text-muted); font-weight: 500; }
.opt-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 15px;
  font: 600 0.9rem var(--sans);
  cursor: pointer;
  transition: all 0.15s ease;
}
.opt-btn:hover { border-color: var(--wine); }
.opt-btn.is-selected { border-color: var(--wine); background: var(--wine-tint); color: var(--wine-dark); }
.opt-btn.is-disabled { opacity: 0.4; cursor: default; text-decoration: line-through; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); }
.qty button {
  width: 38px;
  height: 40px;
  border: none;
  background: none;
  font-size: 1.15rem;
  color: var(--text);
  cursor: pointer;
}
.qty button:disabled { color: #c9c0c4; cursor: default; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }

/* ---------------- Cart drawer ---------------- */
.cart-drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.cart-drawer__backdrop { position: absolute; inset: 0; background: rgba(43, 34, 38, 0.4); opacity: 0; transition: opacity 0.25s ease; }
.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 94vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.28s ease;
}
.cart-drawer.is-open { pointer-events: auto; }
.cart-drawer.is-open .cart-drawer__backdrop { opacity: 1; }
.cart-drawer.is-open .cart-drawer__panel { transform: none; }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.cart-drawer__head h3 { margin: 0; }
.modal__close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 6px; display: inline-flex; }
.modal__close:hover { color: var(--text); }
.cart-drawer__items { flex: 1; overflow-y: auto; padding: 16px 22px; }
.cart-drawer__empty { color: var(--text-muted); text-align: center; margin-top: 40px; }
.cart-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item__media {
  width: 60px;
  height: 74px;
  flex: none;
  border-radius: 10px;
  background: linear-gradient(175deg, #fdfbf8 0%, #f1e9dd 100%);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__media svg { height: 82%; width: auto; }
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__name { font-weight: 600; font-size: var(--text-sm); }
.cart-item__opts { color: var(--text-muted); font-size: var(--text-xs); }
.cart-item__row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.cart-item__price { font-weight: 700; font-size: var(--text-sm); }
.cart-item__remove { background: none; border: none; color: var(--text-muted); font-size: var(--text-xs); cursor: pointer; text-decoration: underline; }
.cart-item__remove:hover { color: var(--warn); }
.cart-drawer__foot { padding: 18px 22px 22px; border-top: 1px solid var(--border); }
.cart-summary { margin-bottom: 14px; }
.cart-summary__row { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--text-muted); padding: 3px 0; }
.cart-summary__row--total { color: var(--text); font-weight: 700; font-size: 1.02rem; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; }
.cart-summary__hint { font-size: var(--text-xs); color: var(--gold); font-weight: 600; margin-top: 8px; }

.msg { font-size: var(--text-sm); }
.msg--err { color: var(--warn); }

/* ---------------- Blog ---------------- */
.grid--posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--wine); }
.card p { color: var(--text-muted); font-size: var(--text-sm); }

.post { padding: 56px 0 84px; }
.post__meta { color: var(--text-muted); font-size: var(--text-sm); margin-bottom: 30px; }
.post__body { font-size: 1.05rem; }
.post__body h2 { margin-top: 1.6em; }
.post__body ul, .post__body ol { margin: 0 0 1em; padding-left: 1.3em; }
.post__body li { margin-bottom: 0.35em; }

/* ---------------- Confirmation page ---------------- */
.confirm { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 44px 34px; }
.confirm__check {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--wine-tint);
  color: var(--wine);
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm__ticket { font: 700 1.05rem var(--sans); color: var(--wine); margin: 14px 0 24px; letter-spacing: 0.04em; }

/* ---------------- Visit / info strip ---------------- */
.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.visit__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.visit__card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 10px; }
.visit__card h3 svg { color: var(--gold); flex: none; }
.visit__card p { color: var(--text-muted); font-size: var(--text-sm); margin: 0; }
.visit__card a { font-weight: 600; }

/* ---------------- Footer ---------------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 30px; }
.footer__top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 22px 40px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 44px;
}
@media (max-width: 800px) { .footer__top { grid-template-columns: 1fr; gap: 32px; } }
.footer__brand-row { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.footer__brand-row svg { color: var(--wine); }
.footer__brand > p { color: var(--text-muted); font-size: var(--text-sm); max-width: 36ch; }
.footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 26px; }
.footer__col-h { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer__list { display: flex; flex-direction: column; gap: 8px; font-size: var(--text-sm); }
.footer__list a { color: var(--text-muted); }
.footer__list a:hover { color: var(--wine); }
.footer__list span { color: var(--text-muted); }

.payments { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.payments svg { display: block; border-radius: 6px; }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 18px 22px 26px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.footer__bottom a { color: var(--text-muted); text-decoration: underline; }
.footer__legal {
  max-width: 760px;
  margin: 10px auto 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

/* 18+ ribbon */
.age-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--wine-tint);
  color: var(--wine-dark);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: var(--text-xs);
  font-weight: 700;
}
