:root {
  --burgundy: #6d0719;
  --burgundy-dark: #41030e;
  --burgundy-soft: #8f2437;
  --gold: #b48743;
  --cream: #f7f2e9;
  --paper: #fffdf9;
  --ink: #261d1b;
  --muted: #746965;
  --line: #e4d8c9;
  --shadow: 0 18px 45px rgba(65, 3, 14, 0.1);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
body.dialog-open { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 5vw, 74px);
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid rgba(109, 7, 25, 0.1);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 50px; height: 50px; object-fit: cover; border-radius: 50%; }
.brand span { display: grid; line-height: 1; }
.brand strong { color: var(--burgundy); font-family: Georgia, "Times New Roman", serif; font-size: 1.16rem; letter-spacing: 0.08em; }
.brand small { color: var(--gold); margin-top: 5px; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { text-decoration: none; font-weight: 650; font-size: 0.92rem; }
.nav-whatsapp { padding: 10px 16px; color: white; background: var(--burgundy); border-radius: 999px; }

.hero {
  position: relative;
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  color: white;
  background: var(--burgundy-dark) url("assets/hero-mountains.webp") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(35, 1, 7, 0.95) 0%, rgba(66, 4, 15, 0.78) 40%, rgba(66, 4, 15, 0.14) 78%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  z-index: -1;
  background: linear-gradient(transparent, rgba(31, 1, 6, 0.42));
}
.hero-content { width: min(700px, calc(100% - 36px)); margin-left: clamp(18px, 8vw, 128px); padding: 84px 0 72px; }
.eyebrow { margin: 0 0 16px; color: #ebca8f; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.eyebrow.burgundy { color: var(--burgundy-soft); }
.hero h1, .catalog h2, dialog h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero h1 { font-size: clamp(3rem, 7vw, 6.6rem); text-wrap: balance; }
.hero h1 em { color: #e2b969; font-weight: 400; }
.hero-copy { max-width: 590px; margin: 26px 0 0; color: rgba(255,255,255,.83); font-size: clamp(1rem, 2vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 760;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .payment-option:focus-visible, input:focus-visible, select:focus-visible, .dialog-close:focus-visible, .wine-card:focus-visible { outline: 3px solid #d9a954; outline-offset: 3px; }
.button-primary { color: var(--burgundy-dark); background: #f2cf8e; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.button-ghost { color: white; border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.button-secondary { color: white; background: var(--burgundy); }
.button-whatsapp { width: 100%; color: white; background: #167b44; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 46px; }
.hero-facts span { display: flex; align-items: baseline; gap: 7px; color: rgba(255,255,255,.72); font-size: .88rem; }
.hero-facts strong { color: white; font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; }

.catalog { max-width: 1480px; margin: 0 auto; padding: 104px clamp(18px, 5vw, 74px) 110px; }
.catalog-heading { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: end; gap: 30px; }
.catalog-heading h2 { max-width: 760px; color: var(--burgundy-dark); font-size: clamp(2.35rem, 5vw, 4.3rem); }
.catalog-heading > p { margin: 0 0 7px; color: var(--muted); font-size: 1.03rem; }

.payment-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 48px;
  padding: 16px 18px 16px 22px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.payment-switch > span { color: var(--muted); font-weight: 700; }
.segmented { display: inline-grid; grid-template-columns: 1fr 1.35fr; padding: 4px; background: #e9dfd2; border-radius: 999px; }
.payment-option { min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; color: #665a55; background: transparent; cursor: pointer; font-weight: 750; }
.payment-option.is-active { color: white; background: var(--burgundy); box-shadow: 0 5px 14px rgba(109,7,25,.2); }

.filters { display: grid; grid-template-columns: minmax(260px, 1.6fr) minmax(180px, .7fr) minmax(180px, .7fr); gap: 12px; margin-top: 20px; }
.filters label { position: relative; }
.filters input, .filters select {
  width: 100%;
  height: 52px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.filters input { padding: 0 18px 0 46px; }
.filters select { padding: 0 42px 0 16px; cursor: pointer; }
.search-field svg { position: absolute; z-index: 1; top: 15px; left: 16px; width: 21px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.result-bar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.result-bar p { margin: 0; color: var(--muted); font-size: .9rem; }
.text-button { border: 0; color: var(--burgundy); background: none; cursor: pointer; font-weight: 750; }

.wine-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.wine-card {
  position: relative;
  display: flex;
  min-height: 610px;
  flex-direction: column;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(65,3,14,.04);
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.wine-card:hover { transform: translateY(-6px); border-color: #ccb590; box-shadow: var(--shadow); }
.wine-number { position: absolute; z-index: 2; top: 14px; left: 14px; padding: 5px 9px; color: #776a62; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 999px; font-size: .7rem; font-weight: 750; }
.wine-image-wrap { position: relative; height: 350px; display: grid; place-items: end center; overflow: hidden; background: linear-gradient(180deg, #fff 0%, #faf5ed 100%); }
.wine-image-wrap::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 7px; height: 18px; background: rgba(45,19,16,.14); border-radius: 50%; filter: blur(9px); }
.wine-image { position: relative; z-index: 1; width: 142px; height: 100%; object-fit: cover; object-position: center top; transition: transform .28s ease; }
.wine-card:hover .wine-image { transform: scale(1.025); }
.wine-info { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.wine-grape { width: fit-content; margin: 0 0 9px; padding: 4px 9px; color: var(--burgundy-soft); background: #f7ebed; border-radius: 999px; font-size: .72rem; font-weight: 760; }
.wine-info h3 { min-height: 56px; margin: 0; color: var(--burgundy-dark); font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; line-height: 1.16; }
.wine-price { margin-top: auto; padding-top: 18px; border-top: 1px solid #efe5d9; }
.price-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.price-main { display: block; color: var(--burgundy); font-family: Georgia, "Times New Roman", serif; font-size: 1.82rem; font-weight: 700; line-height: 1; }
.installment { display: block; min-height: 20px; margin-top: 6px; color: var(--muted); font-size: .82rem; }
.card-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 17px; }
.details-button, .order-button { min-height: 43px; border-radius: 12px; cursor: pointer; font-weight: 760; }
.details-button { width: 45px; border: 1px solid var(--line); color: var(--burgundy); background: white; font-size: 1.2rem; }
.order-button { display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 0; color: white; background: var(--burgundy); text-decoration: none; font-size: .86rem; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state span { font-size: 2.8rem; }
.empty-state h3 { margin: 12px 0 4px; color: var(--burgundy); font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; }
.empty-state p { margin: 0 0 22px; color: var(--muted); }

footer { display: grid; grid-template-columns: auto 1fr minmax(260px, 440px); align-items: center; gap: 26px; padding: 34px clamp(18px, 5vw, 74px); color: #f7ead8; background: var(--burgundy-dark); }
footer img { width: 86px; height: 86px; object-fit: cover; border-radius: 50%; }
footer p { margin: 3px 0; }
footer strong { color: #e5bd72; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; }
.legal { color: rgba(255,255,255,.58); font-size: .8rem; text-align: right; }

dialog {
  width: min(800px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(28,0,5,.45);
}
dialog::backdrop { background: rgba(29, 2, 7, .74); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--burgundy); background: rgba(255,255,255,.94); cursor: pointer; font-size: 1.55rem; line-height: 1; }
.dialog-layout { display: grid; grid-template-columns: .85fr 1.15fr; min-height: 550px; }
.dialog-image-wrap { display: grid; place-items: end center; overflow: hidden; background: linear-gradient(180deg, white, var(--cream)); }
.dialog-image-wrap img { width: 220px; height: 520px; object-fit: cover; object-position: top center; }
.dialog-content { display: flex; flex-direction: column; justify-content: center; padding: 58px 50px; }
.dialog-content h2 { color: var(--burgundy-dark); font-size: clamp(2rem, 4vw, 3.15rem); }
.dialog-grape { margin: 18px 0 0; color: var(--muted); }
.dialog-price { margin-top: 30px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dialog-price .price-main { font-size: 2.4rem; }
.availability { margin: 18px 0 24px; color: var(--muted); font-size: .86rem; }

.floating-whatsapp { position: fixed; z-index: 18; right: 22px; bottom: 22px; width: 58px; height: 58px; display: grid; place-items: center; color: white; background: #1f9d55; border: 3px solid white; border-radius: 50%; box-shadow: 0 12px 28px rgba(0,0,0,.24); }
.floating-whatsapp svg { width: 29px; fill: currentColor; }

@media (max-width: 1120px) {
  .wine-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .catalog-heading { grid-template-columns: 1fr; }
  .catalog-heading > p { max-width: 620px; }
  .payment-switch { align-items: stretch; flex-direction: column; }
  .segmented { width: 100%; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .wine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { grid-template-columns: auto 1fr; }
  .legal { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 68px; }
  .site-header { height: 66px; padding: 0 14px; }
  .brand img { width: 43px; height: 43px; }
  .brand small { display: none; }
  nav { gap: 10px; }
  nav > a:first-child { display: none; }
  .nav-whatsapp { padding: 8px 13px; font-size: .82rem; }
  .hero { min-height: calc(100svh - 66px); background-position: 62% center; }
  .hero::before { background: linear-gradient(90deg, rgba(35,1,7,.93), rgba(55,3,12,.7)); }
  .hero-content { margin-left: 18px; padding: 62px 0 48px; }
  .hero h1 { font-size: clamp(2.7rem, 14vw, 4.1rem); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-facts { justify-content: space-between; gap: 10px; }
  .hero-facts span { align-items: flex-start; flex-direction: column; gap: 0; }
  .catalog { padding-top: 72px; padding-bottom: 80px; }
  .payment-switch { padding: 14px; }
  .segmented { grid-template-columns: 1fr; border-radius: 16px; }
  .payment-option { border-radius: 12px; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .wine-grid { grid-template-columns: 1fr; gap: 16px; }
  .wine-card { min-height: 560px; }
  .wine-image-wrap { height: 320px; }
  footer { grid-template-columns: 1fr; text-align: center; }
  footer img { margin: 0 auto; }
  .legal { text-align: center; }
  .dialog-layout { grid-template-columns: 1fr; max-height: calc(100svh - 28px); overflow-y: auto; }
  .dialog-image-wrap { min-height: 310px; }
  .dialog-image-wrap img { width: 150px; height: 310px; }
  .dialog-content { padding: 32px 24px 26px; }
  .floating-whatsapp { right: 15px; bottom: 15px; width: 54px; height: 54px; }
}

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