/* ===========================================
   WineX — Catálogo Editorial
   Branco off-white · Tipografia clássica
   Roxo apenas em detalhes
   =========================================== */

:root {
  /* Paleta principal — branco puro, sem creme */
  --paper: #ffffff;
  --paper-warm: #f7f7f5;
  --paper-cool: #fafafa;
  --ink: #0f0f0f;
  --ink-soft: #1f1f1f;
  --muted: #525252;
  --muted-light: #8a8a8a;
  --line: #ececec;
  --line-soft: #f2f2f2;
  --line-strong: #d8d8d8;

  /* Verde-musgo escuro — cor de fundo de destaque */
  --moss: #2a3d2f;
  --moss-deep: #1d2c22;
  --moss-soft: #eef1ee;
  --moss-tint: #f5f7f4;

  /* Dourado — acentos sutis */
  --gold: #b8862e;
  --gold-deep: #8a6520;
  --gold-soft: #f5edd9;

  /* Roxo escuro WineX — identidade da marca */
  --purple: #3d2e6b;
  --purple-deep: #2a1f4d;
  --purple-soft: #ece9f4;
  --purple-tint: #f4f2f8;

  /* Acentos */
  --green: #2d7a4d;
  --amber: #b8862e;
  --red: #c0392b;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; background: transparent; border: none; outline: none; }

/* ───────────────────────────────────────────
   HEADER — minimalista editorial
   ─────────────────────────────────────────── */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Header menor em tablet/mobile */
@media (max-width: 820px) {
  header.site-header { height: 88px; }
  .header-logo svg { height: 56px !important; }
}
@media (max-width: 480px) {
  header.site-header { height: 72px; padding: 0 1.25rem; }
  .header-logo svg { height: 44px !important; }
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}

.header-logo svg {
  width: auto;
  display: block;
}

.header-nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.header-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--ink);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  font-weight: 500;
  position: relative;
}
.header-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.header-nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  color: var(--ink);
  transition: color 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.cart-btn:hover { color: var(--purple); }
.cart-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}
.cart-count {
  background: var(--purple);
  color: white;
  border-radius: 100px;
  min-width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  padding: 0 6px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0;
}
.cart-count.hidden { display: none; }

@media (max-width: 820px) {
  .header-nav { display: none; }
  .cart-btn span:not(.cart-count) { display: none; }
}

/* ─── HAMBÚRGUER (só mobile) ─── */
.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  margin-right: 0.5rem;
}
.hamburger-btn svg {
  width: 24px;
  height: 24px;
}
@media (max-width: 820px) {
  .hamburger-btn { display: inline-flex; }
}

/* ─── DRAWER LATERAL ─── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 86vw;
  max-width: 360px;
  background: var(--paper);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
}
.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.drawer-logo {
  display: flex;
  align-items: center;
  color: var(--ink);
}
.drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
}
.drawer-close svg {
  width: 22px;
  height: 22px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 0.5rem;
}
.drawer-nav a {
  display: block;
  padding: 0.85rem 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.drawer-nav a:hover,
.drawer-nav a:active {
  color: var(--purple);
  padding-left: 1.75rem;
}

.drawer-divider {
  margin: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.drawer-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
}

.drawer-nav-sub a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.55rem 1.5rem;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.drawer-foot {
  margin-top: auto;
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
}
.drawer-foot a {
  color: var(--purple-deep);
  border-bottom: 1px solid var(--purple-soft);
  padding-bottom: 1px;
}

/* ───────────────────────────────────────────
   FOOTER — bem espaçado, editorial
   ─────────────────────────────────────────── */
footer.site-footer {
  margin-top: 0;
  padding: 5rem clamp(1.5rem, 5vw, 4rem) 3rem;
  background: var(--moss-deep);
  color: rgba(255,255,255,0.85);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand svg {
  width: auto;
  display: block;
  margin-bottom: 1rem;
  opacity: 1;
  color: #ffffff;
}
.footer-brand-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
  line-height: 1.65;
  max-width: 360px;
}

.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  font-weight: 600;
}
.footer-col a, .footer-col div {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: #ffffff; }

.footer-bottom {
  max-width: 1280px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.05em;
}

@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 500px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; }
}

/* ───────────────────────────────────────────
   BOTÕES
   ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--moss);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-large {
  padding: 1.1rem 2.5rem;
  font-size: 0.82rem;
}

.btn-link {
  background: none;
  padding: 0;
  color: var(--purple);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--purple);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn-link:hover { color: var(--purple-deep); border-color: var(--purple-deep); }

/* ───────────────────────────────────────────
   PILLS / TAGS
   ─────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1;
}
.pill-purple {
  background: var(--purple-soft);
  color: var(--purple-deep);
}
.pill-amber {
  background: rgba(184,134,46,0.1);
  color: var(--amber);
}
.pill-green {
  background: rgba(45,122,77,0.1);
  color: var(--green);
}
.pill-outline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.pill-ink {
  background: var(--ink);
  color: var(--paper);
}

/* ───────────────────────────────────────────
   ANIMAÇÕES
   ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Animação de entrada épica — cards revelam em cascata */
@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Slow zoom suave nas garrafas */
@keyframes slowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Stagger reveal — cada card entra com delay incremental */
.product-card {
  animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.product-card:nth-child(1)  { animation-delay: 0.05s; }
.product-card:nth-child(2)  { animation-delay: 0.10s; }
.product-card:nth-child(3)  { animation-delay: 0.15s; }
.product-card:nth-child(4)  { animation-delay: 0.20s; }
.product-card:nth-child(5)  { animation-delay: 0.25s; }
.product-card:nth-child(6)  { animation-delay: 0.30s; }
.product-card:nth-child(7)  { animation-delay: 0.35s; }
.product-card:nth-child(8)  { animation-delay: 0.40s; }
.product-card:nth-child(9)  { animation-delay: 0.45s; }
.product-card:nth-child(10) { animation-delay: 0.50s; }
.product-card:nth-child(11) { animation-delay: 0.55s; }
.product-card:nth-child(12) { animation-delay: 0.60s; }
.product-card:nth-child(n+13) { animation-delay: 0.65s; }

/* Entrada da intro da home */
@keyframes introReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.intro-anim-1 { animation: introReveal 0.8s cubic-bezier(0.16,1,0.3,1) 0.1s backwards; }
.intro-anim-2 { animation: introReveal 0.8s cubic-bezier(0.16,1,0.3,1) 0.25s backwards; }
.intro-anim-3 { animation: introReveal 0.8s cubic-bezier(0.16,1,0.3,1) 0.4s backwards; }
.intro-anim-4 { animation: introReveal 0.8s cubic-bezier(0.16,1,0.3,1) 0.55s backwards; }

.fadeInUp { animation: fadeInUp 0.6s ease forwards; opacity: 0; }

/* ───────────────────────────────────────────
   TÍTULOS DE SEÇÃO
   ─────────────────────────────────────────── */
.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
  font-weight: 400;
}
.section-title em {
  font-style: italic;
  color: var(--purple);
  font-weight: 400;
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 580px;
  font-weight: 400;
}

/* ───────────────────────────────────────────
   CONTAINER
   ─────────────────────────────────────────── */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  position: relative;
}
.container-tight {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* ───────────────────────────────────────────
   PRODUCT CARD — Editorial, branco, foto grande
   ─────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
}

.product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease;
  background: transparent;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-img-wrap {
  aspect-ratio: 3/4;
  background: var(--paper-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
}

.product-card:hover .product-img-wrap {
  background: var(--paper-cool);
}

.product-img-wrap img {
  max-height: 90%;
  max-width: 66%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  mix-blend-mode: multiply;
  position: relative;
  z-index: 2;
}
.product-card:hover .product-img-wrap img {
  transform: translateY(-4px) scale(1.02);
}

.product-card-score {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.product-card-body {
  padding: 1.25rem 0.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-card-region {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}

.product-card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 600;
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1rem;
  transition: color 0.2s ease;
}
.product-card:hover .product-card-name { color: var(--purple-deep); }

.product-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

.product-card-vintage {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.product-card-price {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--ink);
  font-weight: 600;
}

/* ───────────────────────────────────────────
   FORM INPUTS
   ─────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
  padding: 0.9rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.2s ease;
  width: 100%;
  border-radius: 0;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-bottom-color: var(--purple);
}

.form-textarea {
  border: 1px solid var(--line-strong);
  padding: 0.85rem 1rem;
  resize: vertical;
  min-height: 80px;
}
.form-textarea:focus {
  border-color: var(--purple);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 1.5rem;
  cursor: pointer;
}

.form-input::placeholder {
  color: var(--muted-light);
  opacity: 0.7;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ───────────────────────────────────────────
   NOTICES & ALERTS
   ─────────────────────────────────────────── */
.notice {
  padding: 1.1rem 1.35rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.notice-purple {
  background: var(--purple-tint);
  border-left: 2px solid var(--purple);
}
.notice-purple svg {
  color: var(--purple);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ───────────────────────────────────────────
   EMPTY STATE & LOADING
   ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  opacity: 0.4;
}
.empty-state h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.empty-state p {
  font-size: 0.95rem;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  color: var(--muted);
  gap: 0.85rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.loading::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--line-strong);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ───────────────────────────────────────────
   DIVIDER ELEGANTE
   ─────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider-dot {
  width: 4px;
  height: 4px;
  background: var(--purple);
  border-radius: 50%;
}
