/* ============================================================
   MAIN CSS — async loaded
   Shared components v2: cards, sections, grids, layout
   ============================================================ */

/* ── Page wrapper ──────────────────────────────── */
.page { padding: 28px 0 80px; }
.section { padding: 24px 0 0; }

/* ── Section card ──────────────────────────────── */
.section-card {
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--stroke-light);
  box-shadow: var(--shadow-sm);
}
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-head p { max-width: 56ch; margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.text-link {
  text-decoration: none; font-weight: 700; color: var(--wine);
  font-size: .88rem; white-space: nowrap;
}
.text-link:hover { text-decoration: underline; }

/* ── Grids ─────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

/* ── Card (generic) ────────────────────────────── */
.card {
  min-height: 100%; display: flex; flex-direction: column;
  overflow: hidden; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--stroke-light);
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.card-padded {
  padding: 24px; border-radius: var(--r-md);
  border: 1px solid var(--stroke-light);
  background: var(--surface); box-shadow: var(--shadow-sm);
}

/* ── Card image area ───────────────────────────── */
.art {
  min-height: 180px;
  background: linear-gradient(145deg, #e6ded2, #d4cabb);
  overflow: hidden;
}
.art img, .art .img-real {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.card:hover .art img { transform: scale(1.04); }
.art .img-placeholder { min-height: 180px; }

/* ── Card body ─────────────────────────────────── */
.card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.6rem; margin-bottom: 8px; }
.card-body p { margin: 0 0 14px; color: var(--muted); line-height: 1.65; font-size: .9rem; }
.card-body a {
  margin-top: auto; text-decoration: none; color: var(--wine);
  font-weight: 700; font-size: .88rem;
}
.card-body a:hover { text-decoration: underline; }

/* ── Pills row ─────────────────────────────────── */
.pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }

/* ── Winery card (listing) ─────────────────────── */
.winery-card {
  display: flex; flex-direction: column;
  overflow: hidden; border-radius: var(--r-md);
  border: 1px solid var(--stroke-light); background: var(--surface);
  text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.winery-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
}
.winery-art {
  min-height: 170px; overflow: hidden;
  background: linear-gradient(145deg, #e6ded2, #d4cabb);
}
.winery-art img, .winery-art .img-real {
  width: 100%; aspect-ratio: 3/2; object-fit: cover;
  transition: transform .4s ease;
}
.winery-card:hover .winery-art img { transform: scale(1.04); }
.winery-art .img-placeholder { min-height: 170px; }
.winery-body {
  padding: 16px 18px; display: flex; flex-direction: column; flex: 1;
}
.winery-body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.winery-body p {
  margin: 0 0 12px; color: var(--muted); line-height: 1.6;
  font-size: .88rem;
}
.winery-body .link { margin-top: auto; }
.winery-meta-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--stroke-light); font-size: .82rem;
}
.winery-distance { color: var(--muted); font-weight: 600; }
.winery-rating { display: flex; align-items: center; gap: 4px; }
.stars { color: var(--gold); font-size: .78rem; }
.rating-val { font-weight: 700; color: var(--text); font-size: .8rem; }

/* ── Fact grid ─────────────────────────────────── */
.fact {
  padding: 16px; border-radius: var(--r-sm);
  background: var(--surface-tint); border: 1px solid var(--stroke-light);
}
.fact span {
  display: block; margin-bottom: 5px; font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); font-weight: 800;
}
.fact strong, .fact div { font-size: .92rem; line-height: 1.45; }
.fact a { color: var(--wine); font-weight: 700; text-decoration: none; }
.fact a:hover { text-decoration: underline; }

/* ── Compare table ─────────────────────────────── */
.compare-wrap {
  overflow-x: auto; border-radius: var(--r-sm);
  border: 1px solid var(--stroke-light); background: var(--surface);
}
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th, td {
  text-align: left; padding: 13px 16px;
  border-bottom: 1px solid var(--stroke-light); vertical-align: top;
}
th {
  background: var(--surface-tint); color: var(--faint);
  text-transform: uppercase; letter-spacing: .08em;
  font-size: .7rem; font-weight: 800;
}
td { font-size: .9rem; }
td strong { display: block; margin-bottom: 4px; }
tr:last-child td { border-bottom: 0; }

/* ── FAQ ───────────────────────────────────────── */
.faq { display: grid; gap: 8px; }
.faq-item {
  padding: 16px 18px; border-radius: var(--r-sm);
  background: var(--surface-tint); border: 1px solid var(--stroke-light);
}
.faq-item h3 { font-size: 1.15rem; margin-bottom: 6px; }
.faq-item p { margin: 0; color: var(--muted); line-height: 1.65; font-size: .9rem; }

/* ── Quick links (hero) ────────────────────────── */
.quick-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 12px;
}
.quick-link {
  text-decoration: none; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--stroke-light);
  font-weight: 700; font-size: .88rem;
  display: flex; justify-content: space-between; gap: 8px;
  transition: border-color .15s, color .15s;
}
.quick-link:hover { border-color: var(--wine); color: var(--wine); }

/* ── Split layout ──────────────────────────────── */
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.note, .aside-note {
  padding: 22px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--stroke-light);
}
.note h3 { font-size: 1.7rem; margin-bottom: 8px; }
.note p { margin: 0; color: var(--muted); line-height: 1.7; font-size: .92rem; }
.note ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.note li + li { margin-top: 8px; }

/* ── Mini list ─────────────────────────────────── */
.mini-list { display: grid; gap: 10px; margin-top: 14px; }
.mini-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding-top: 10px; border-top: 1px solid var(--stroke-light);
}
.mini-item:first-child { border-top: 0; padding-top: 0; }
.mini-item strong { display: block; margin-bottom: 2px; font-size: .9rem; }
.mini-item span { color: var(--muted); font-size: .85rem; }

/* ── Layout (main + aside) ─────────────────────── */
.layout {
  display: grid; grid-template-columns: minmax(0,1fr) 320px;
  gap: 20px; margin-top: 20px;
}
.stack { display: grid; gap: 16px; }

/* ── Aside ─────────────────────────────────────── */
.aside { display: grid; gap: 16px; align-self: start; position: sticky; top: 84px; }
.aside-card {
  padding: 20px; border-radius: var(--r-md);
  border: 1px solid var(--stroke-light);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.aside-card h3 { font-size: 1.45rem; margin-bottom: 10px; }
.aside-card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: .9rem; }
.aside-card.primary {
  background: var(--wine); color: #fff;
  border-color: var(--wine-dark);
}
.aside-card.primary p,
.aside-card.primary .aside-row span { color: rgba(255,255,255,.72); }
.aside-card.primary .aside-row { border-color: rgba(255,255,255,.12); }
.aside-list { display: grid; gap: 10px; margin-top: 14px; }
.aside-row {
  display: grid; gap: 3px; padding-top: 10px;
  border-top: 1px solid var(--stroke-light);
}
.aside-row:first-child { border-top: 0; padding-top: 0; }
.aside-row span {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); font-weight: 800;
}
.aside-row strong { font-size: .9rem; }

/* ── Filter bar ────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .6rem 0; margin-bottom: 1rem;
  border-bottom: 1px solid var(--stroke-light);
}
.filter-bar__label {
  font-size: .68rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-right: .4rem;
}
.filter-btn {
  padding: 5px 12px; border-radius: var(--r-xs);
  border: 1.5px solid var(--stroke); background: var(--surface);
  font-size: .78rem; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.filter-btn:hover, .filter-btn.is-active {
  background: var(--wine); border-color: var(--wine); color: #fff;
}

/* ── Prose ──────────────────────────────────────── */
.prose { color: var(--muted); line-height: 1.75; font-size: .95rem; }
.prose p { margin: 0 0 14px; }
.prose h2 { font-size: 1.6rem; margin: 1.5rem 0 .6rem; color: var(--text); }
.prose h3 { font-size: 1.2rem; margin: 1.2rem 0 .4rem; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .3rem; }

/* ── Bullet list ───────────────────────────────── */
.bullet-list { display: grid; gap: 8px; }
.bullet-item {
  padding: 14px 16px; border-radius: var(--r-sm);
  background: var(--surface-tint); border: 1px solid var(--stroke-light);
}
.bullet-item strong {
  display: block; color: var(--text); margin-bottom: 4px; font-size: .92rem;
}

/* ── Related cards ─────────────────────────────── */
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.related-card {
  padding: 16px; border-radius: var(--r-sm);
  background: var(--surface-tint); border: 1px solid var(--stroke-light);
  text-decoration: none; display: block;
  transition: transform .2s, box-shadow .2s;
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.related-card strong { display: block; margin-bottom: 4px; font-size: .92rem; color: var(--text); }
.related-card p { margin: 0 0 10px; color: var(--muted); line-height: 1.6; font-size: .88rem; }
.related-card .link { font-size: .85rem; color: var(--wine); font-weight: 700; text-decoration: none; }
.related-card .link:hover { text-decoration: underline; }

/* ── Tour box (sidebar CTA) ────────────────────── */
.tour-box {
  background: var(--wine); color: #fff;
  border-color: var(--wine-dark);
  box-shadow: var(--shadow-wine);
}
.tour-box h3 { color: #fff; }
.tour-box p { color: rgba(255,255,255,.78); margin-bottom: 0; }
.tour-list { display: grid; gap: 8px; margin-top: 14px; }
.tour-item {
  padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
}
.tour-item strong { display: block; margin-bottom: 4px; font-size: .9rem; }
.tour-item span { display: block; color: rgba(255,255,255,.68); font-size: .84rem; line-height: 1.5; }
.tour-box .btn, .tour-box .btn-secondary { margin-top: 12px; width: 100%; }
.tour-box .btn { background: #fff; color: var(--wine); box-shadow: none; }
.tour-box .btn:hover { background: var(--surface-tint); }
.tour-box .btn-secondary {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #fff;
}

/* ── 404 ───────────────────────────────────────── */
.error-page {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 8rem 2rem; gap: 1.2rem;
}
.error-page h1 { font-size: 2.6rem; }
.error-page p { color: var(--muted); font-size: 1rem; max-width: 40ch; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid, .layout, .split { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; border-top: 1px solid var(--stroke-light); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .aside { position: static; }
}
@media (max-width: 760px) {
  .site-nav { display: none; }
  .header-actions .btn-secondary { display: none; }
  .header-row { height: 56px; }
  .hero-grid, .grid-4, .grid-3, .grid-2,
  .split, .hero-metrics, .quick-grid,
  .hero-stats, .related-grid { grid-template-columns: 1fr; }
  .section-card, .card-padded { padding: 18px; }
  .hero-copy { padding: 24px 20px 20px; }
  h1 { font-size: 2.6rem !important; max-width: 100% !important; }
  .brand-name { font-size: 1.2rem; }
  .footer-inner { flex-direction: column; }
  .footer-cols { gap: 24px; }
}
@media (max-width: 480px) {
  .grid-3, .related-grid { grid-template-columns: 1fr; }
  .container { width: calc(100% - 24px); }
}
