/* ===== Cores e medidas ===== */
:root {
  --white: #ffffff;
  --cream: #faf5f1;      /* fundo da página inicial, próximo do creme do site original */
  --line: #eadfd9;
  --text: #1f1619;
  --muted: #5e5054;      /* contraste ~7:1 no branco */
  --wine: #8a2341;       /* bordô: o destaque principal */
  --wine-hover: #721b35;
  --wine-soft: #f5e8ec;
  --gold: #c8a287;       /* dourado do site original: só em linhas e no fundo escuro */
  --gold-text: #87613f;  /* dourado escuro para texto no branco (~5:1) */
  --dark: #1a1215;
  --wine-deep: #3d0f1f;   /* bordô bem escuro: rodapé e faixa do aviso */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgb(60 20 30 / .06), 0 4px 14px rgb(60 20 30 / .05);
  --shadow: 0 10px 30px rgb(60 20 30 / .12);
  --topbar-h: 60px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.travado { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); }
h1, h2, h3 { margin: 0; }
/* números "normais" na fonte serifada (sem o 1 parecido com I) */
.visit-address, .step-n, .section-title, .card-title, .age-card h2 { font-variant-numeric: lining-nums; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 40;
  background: var(--wine); color: #fff; padding: 10px 14px;
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  margin: 0 0 6px; color: var(--wine);
  font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.section-title { font: 600 clamp(1.9rem, 6vw, 2.5rem)/1.1 var(--serif); }
.section-title::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 10px; border-radius: 2px; background: var(--wine); }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-hover); box-shadow: 0 6px 18px rgb(138 35 65 / .25); }
.btn-ghost { background: var(--white); color: var(--wine); border-color: #d9c3ca; }
.btn-ghost:hover { border-color: var(--wine); background: var(--wine-soft); }
.btn:active { transform: translateY(1px); }

/* ===== Aviso 18+ ===== */
.age-gate {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 30%, #3a1724 0%, var(--dark) 75%);
}
.age-gate[hidden] { display: none; }
.age-card {
  width: 100%; max-width: 420px; text-align: center;
  background: var(--white); border-radius: 22px; padding: 32px 24px 24px;
  box-shadow: 0 20px 60px rgb(0 0 0 / .45);
}
.age-logo { width: 150px; margin: 0 auto 20px; }
.age-card h2 { font: 600 1.65rem/1.15 var(--serif); }
.age-card p { color: var(--muted); margin: 10px 0 22px; }
.age-actions { display: grid; gap: 10px; }

/* ===== Barra de navegação ===== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: rgb(255 255 255 / .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-brand img { height: 40px; width: auto; }
.topbar-links { display: flex; gap: 4px; }
.topbar-links a {
  padding: 8px 14px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem;
  transition: background-color .2s ease, color .2s ease;
}
.topbar-links a:hover { background: var(--wine-soft); color: var(--wine); }

#inicio, #catalogo { scroll-margin-top: var(--topbar-h); }

/* ===== Parte 1: início ===== */
.home { background: var(--cream); padding-bottom: 48px; }

.hero { text-align: center; padding-top: 40px; padding-bottom: 32px; }
.hero-logo img { width: min(240px, 62vw); margin: 0 auto 24px; }
.hero-title { margin: 0; font: 500 clamp(2rem, 8vw, 3.2rem)/1.08 var(--serif); font-style: italic; }
.hero-text { max-width: 40ch; margin: 14px auto 24px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.visit-card {
  display: grid; gap: 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--wine);
}
.visit-address { font: 600 1.6rem/1.15 var(--serif); }
.visit-city { margin: 2px 0 10px; color: var(--muted); }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }
.visit-info { display: grid; gap: 14px; margin: 0; }
.visit-info dt { color: var(--gold-text); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.visit-info dd { margin: 2px 0 0; color: var(--text); font-size: .95rem; }

.steps { margin-top: 48px; }
.steps-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.steps-list li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.step-n {
  flex: 0 0 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--wine); color: #fff;
  font: 600 1.2rem/1 var(--serif);
}
.steps-list h3 { font-size: 1rem; font-weight: 700; }
.steps-list p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }


/* ===== Parte 2: catálogo ===== */
.catalog { background: var(--white); padding: 48px 0 56px; }
.catalog-head { margin-bottom: 8px; }

.controls {
  position: sticky; top: var(--topbar-h); z-index: 20;
  padding: 12px 0 10px; background: var(--white);
}
.search { position: relative; }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.search input {
  width: 100%; min-height: 48px; padding: 12px 16px 12px 44px;
  background: var(--cream); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  font: 400 1rem var(--sans);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.search input::placeholder { color: #85767a; }
.search input:focus { outline: none; background: var(--white); border-color: var(--wine); box-shadow: 0 0 0 3px rgb(138 35 65 / .15); }

.chips {
  display: flex; gap: 8px; margin: 10px -16px 0; padding: 2px 16px 4px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; scroll-snap-align: start;
  min-height: 40px; padding: 8px 16px;
  background: var(--white); color: var(--text);
  border: 1px solid #ddd0d3; border-radius: 999px;
  font: 600 .88rem var(--sans); cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { border-color: var(--wine); color: var(--wine); }
.chip[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }

.result-count { margin: 6px 0 14px; color: var(--muted); font-size: .85rem; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid[hidden] { display: none; }

.card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #dcc8ce; }

.media { position: relative; aspect-ratio: 1 / 1; }
.thumb { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { display: grid; place-items: center; }
.thumb-ph span { font: 500 clamp(2.6rem, 12vw, 4rem)/1 var(--serif); color: var(--wine); opacity: .85; }

/* Um tom suave por categoria (troque por foto no products.js) */
.cat-0 { background: linear-gradient(140deg, #f7f0ee, #ecdfdc); }
.cat-1 { background: linear-gradient(140deg, #fbeef1, #efd5dc); }
.cat-2 { background: linear-gradient(140deg, #fcefea, #f0d6cc); }
.cat-3 { background: linear-gradient(140deg, #f5edf4, #e6d3e2); }
.cat-4 { background: linear-gradient(140deg, #faf3ea, #eedfca); }
.cat-5 { background: linear-gradient(140deg, #fbf0ef, #f0dad7); }
.cat-6 { background: linear-gradient(140deg, #eff4f0, #d9e5dc); }

.tag {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--white); color: var(--wine);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 1px 4px rgb(60 20 30 / .12);
}

.card-body { display: flex; flex-direction: column; flex: 1; padding: 12px; }
.card-cat { margin: 0; color: var(--wine); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card-title { margin-top: 4px; font: 600 1.3rem/1.15 var(--serif); }
.card-desc { margin: 6px 0 10px; color: var(--muted); font-size: .85rem; line-height: 1.45; flex: 1; }
.card-price { margin: 0 0 10px; font-size: .85rem; font-weight: 700; color: var(--text); }
.btn-card { width: 100%; padding: 10px 6px; font-size: .8rem; white-space: nowrap; min-height: 42px; }

.empty {
  text-align: center; padding: 40px 20px;
  background: var(--cream); border: 1px dashed #d9c3ca; border-radius: var(--radius);
}
.empty h3 { font: 600 1.5rem/1.2 var(--serif); }
.empty p { max-width: 38ch; margin: 10px auto 20px; color: var(--muted); }

.catalog-note {
  display: grid; gap: 14px; justify-items: start;
  margin-top: 40px; padding: 22px; border-radius: var(--radius);
  background: var(--wine); color: #fff;
}
.catalog-note p { margin: 0; color: #f6e6ea; }
.catalog-note strong { color: #fff; }
.btn-light { background: #fff; color: var(--wine); }
.btn-light:hover { background: var(--wine-soft); }

/* ===== Rodapé (escuro, com a logo clara) ===== */
.site-footer { background: var(--wine-deep); color: #e9dfda; padding: 40px 0 100px; }
.footer-grid { display: grid; gap: 22px; }
.footer-brand img { width: 150px; }
.site-footer h2 {
  margin-bottom: 4px; color: var(--gold);
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.site-footer p { margin: 0; color: #e3d3d6; font-size: .9rem; }
.site-footer a { color: #f4ece7; text-decoration: none; border-bottom: 1px solid rgb(200 162 135 / .5); }
.site-footer a:hover { border-color: var(--gold); }
.site-footer .footer-extra { margin-top: 8px; }
.site-footer .fineprint { margin: 28px auto 0; font-size: .78rem; color: #b49aa2; }
#inicio:focus { outline: none; }

/* ===== Botão fixo do WhatsApp ===== */
.whats-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 25;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 18px 0 14px;
  background: var(--wine); color: #fff; text-decoration: none;
  border-radius: 999px; box-shadow: 0 10px 26px rgb(60 20 30 / .35);
  font-weight: 700; font-size: .95rem;
  transition: background-color .2s ease, transform .2s ease;
}
.whats-float:hover { background: var(--wine-hover); transform: translateY(-2px); }
.whats-float svg { width: 24px; height: 24px; fill: currentColor; }

/* ===== Telas maiores ===== */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .card-body { padding: 16px; }
  .btn-card { font-size: .85rem; }
  .age-actions { grid-template-columns: 1fr auto; }
  .visit-card { grid-template-columns: 1.1fr 1fr; padding: 28px; align-items: start; }
  .steps-list { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-note { grid-template-columns: 1fr auto; align-items: center; padding: 24px 28px; }
  .footer-grid { grid-template-columns: 1.2fr repeat(3, 1fr); align-items: start; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .hero { padding-top: 64px; padding-bottom: 48px; }
  .cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .chips { margin: 10px 0 0; padding: 2px 0 4px; flex-wrap: wrap; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
