/* =========================================================
   AROMÉ — Sistema de diseño
   Paleta tomada del logotipo de la marca:
   vino #6B2223 · lavanda #AFADD5
   ========================================================= */

:root {
  /* Marca */
  --wine: #6b2223;
  --wine-deep: #4c1718;
  --wine-soft: #8f3d3e;
  --lavender: #afadd5;
  --lavender-soft: #ddddef;

  /* Neutros cálidos */
  --bone: #fbf8f4;
  --sand: #f1e9dd;
  --sand-deep: #e3d7c6;
  --ink: #2b2523;
  --muted: #7d716a;
  --line: #e6ddd2;
  --white: #fff;

  /* Acento bienestar */
  --sage: #8b9a83;
  --sage-soft: #edf1ea;

  /* Tipografía */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Escala */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(0.98rem, 0.95rem + 0.16vw, 1.06rem);
  --step-1: clamp(1.16rem, 1.09rem + 0.34vw, 1.35rem);
  --step-2: clamp(1.42rem, 1.28rem + 0.68vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.52rem + 1.4vw, 2.7rem);
  --step-4: clamp(2.3rem, 1.75rem + 2.7vw, 4rem);

  /* Ritmo */
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --wrap: 1200px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(43, 37, 35, 0.05), 0 4px 14px rgba(43, 37, 35, 0.05);
  --shadow-md: 0 2px 6px rgba(43, 37, 35, 0.06), 0 16px 40px rgba(43, 37, 35, 0.09);

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

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

.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 999;
  background: var(--wine);
  color: var(--white);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--sand { background: var(--sand); }
.section--bone { background: var(--bone); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.eyebrow {
  font-size: var(--step--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine-soft);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.section-title { font-size: var(--step-3); }

.lede {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--wine);
  --btn-fg: var(--white);
  --btn-bd: var(--wine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--wine);
  --btn-bd: var(--sand-deep);
}
.btn--ghost:hover { --btn-bd: var(--wine); }

.btn--light {
  --btn-bg: var(--white);
  --btn-fg: var(--wine);
  --btn-bd: var(--white);
}

.btn--wa { --btn-bg: #1fa855; --btn-bd: #1fa855; }

/* En las tarjetas el ancho es estrecho: aprieta el interlineado para que
   "Pedir por WhatsApp" quepa en una sola línea. */
.btn--block {
  width: 100%;
  padding-inline: 0.85rem;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
}
.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.78rem; }

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 20px rgba(43, 37, 35, 0.05);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.brand img { width: auto; height: 34px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.nav a {
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  padding-block: 0.35rem;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--wine);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav a:hover { color: var(--wine); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--wine); }

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

/* El CTA vive dos veces en el marcado: dentro del menú (móvil) y
   en .header-actions (escritorio). Solo uno se muestra a la vez. */
.nav > .btn { display: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 19px; height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: background 0.2s var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 19px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.6rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 0.95rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
  .nav a::after { display: none; }
  .nav > .btn { display: inline-flex; margin-top: 1.4rem; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(90% 70% at 78% 15%, var(--sand) 0%, transparent 60%),
    radial-gradient(70% 60% at 5% 90%, var(--sage-soft) 0%, transparent 55%),
    var(--bone);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.02fr 0.98fr; }
}

.hero-title {
  font-size: var(--step-4);
  margin-bottom: 1.2rem;
}
.hero-title em {
  font-style: italic;
  color: var(--wine);
}

.hero-text {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute;
  left: clamp(0.9rem, 2vw, 1.4rem);
  bottom: clamp(0.9rem, 2vw, 1.4rem);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(251, 248, 244, 0.94);
  backdrop-filter: blur(8px);
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}
.hero-badge img { width: 26px; height: 26px; object-fit: contain; }

.hero-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}
.hero-marks span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-marks svg { width: 1.05em; height: 1.05em; color: var(--sage); flex: none; }

/* ---------- Grid de categorías ---------- */
/* Seis categorías: 1 / 2 / 3 columnas para que siempre cierren en
   filas completas (3+3) en vez de dejar huecos. */
.cat-grid {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 940px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

.cat-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--sand);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.cat-card:hover img { transform: scale(1.05); }
.cat-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(43, 37, 35, 0.74) 0%, rgba(43, 37, 35, 0.12) 45%, transparent 70%);
}
.cat-card-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 1.1rem 1.2rem;
  color: var(--white);
}
.cat-card-label strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.15;
}
.cat-card-label small {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.82;
  margin-top: 0.25rem;
}

/* ---------- Grid de productos ---------- */
.product-grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.9rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--sand-deep);
  box-shadow: var(--shadow-md);
}

.card-media {
  position: relative;
  aspect-ratio: 1;
  background: var(--sand);
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  width: 100%;
  display: block;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card-media img { transform: scale(1.04); }

.card-tag {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  background: rgba(251, 248, 244, 0.92);
  color: var(--wine);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.55rem;
  padding: 1.05rem 1.1rem 1.2rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.2;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.6rem;
}

.price {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--wine);
  letter-spacing: -0.01em;
}
.price--ask {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.card-actions { display: grid; gap: 0.5rem; margin-top: 0.75rem; }

.pay-note {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.03em;
}

/* ---------- Filtros de tienda ---------- */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.chip:hover { border-color: var(--wine-soft); color: var(--wine); }
.chip[aria-pressed="true"] {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--white);
}

.search-field { position: relative; flex: 1 1 220px; max-width: 320px; }
.search-field svg {
  position: absolute;
  left: 0.9rem; top: 50%;
  transform: translateY(-50%);
  width: 1rem; height: 1rem;
  color: var(--muted);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.9rem;
}
.search-field input:focus { outline: none; border-color: var(--wine-soft); }

.result-count { font-size: 0.85rem; color: var(--muted); }

/* ---------- Estados ---------- */
.state {
  padding: clamp(2.5rem, 8vw, 5rem) 1rem;
  text-align: center;
  color: var(--muted);
}
.state h3 { font-size: var(--step-2); color: var(--ink); margin-bottom: 0.6rem; }
.state p { max-width: 46ch; margin-inline: auto; }

.spinner {
  width: 30px; height: 30px;
  margin: 0 auto 1.1rem;
  border: 2px solid var(--sand-deep);
  border-top-color: var(--wine);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-grid { display: contents; }
.skeleton {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--white);
}
.skeleton-media {
  aspect-ratio: 1;
  background: linear-gradient(100deg, var(--sand) 30%, var(--sand-deep) 50%, var(--sand) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-line {
  height: 12px;
  margin: 1rem 1.1rem 0;
  border-radius: 6px;
  background: var(--sand);
}
.skeleton-line:last-child { width: 45%; margin-bottom: 1.4rem; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* ---------- Split (sobre nosotros) ---------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split-media { order: 2; }
}

.split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }

.split-body > * + * { margin-top: 1.1rem; }
.split-body p { color: var(--muted); }

.credentials {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 1.8rem !important;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.credentials img { height: 62px; width: auto; object-fit: contain; }
.credentials p { font-size: 0.85rem; max-width: 30ch; }

/* ---------- Franja de valores ---------- */
.values {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.value { text-align: left; }
.value-ico {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--wine);
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.value-ico svg { width: 20px; height: 20px; }
.value h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.value p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Galería ---------- */
.gallery {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
}
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

/* ---------- CTA ---------- */
.cta-band {
  background: var(--wine);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 820px) {
  .cta-band { grid-template-columns: 1.4fr auto; }
}
.cta-band h2 { font-size: var(--step-3); }
.cta-band p { color: rgba(255, 255, 255, 0.78); margin-top: 0.6rem; max-width: 48ch; }
.cta-band .btn { --btn-bg: var(--white); --btn-fg: var(--wine); --btn-bd: var(--white); }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.contact-card .value-ico { margin-bottom: 0.4rem; }
.contact-card h3 { font-size: var(--step-1); }
.contact-card p { font-size: 0.9rem; color: var(--muted); }
/* .link es un <span> dentro de la tarjeta —que ya es un <a>— para no
   anidar enlaces; por eso el selector no lleva `a`. */
.contact-card .link {
  color: var(--wine);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--sand-deep);
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.4rem;
  transition: border-color 0.2s var(--ease);
}
.contact-card:hover .link { border-color: var(--wine); }

.faq { display: grid; gap: 0.7rem; max-width: 780px; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.3rem;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: var(--wine);
  line-height: 1;
  flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 0.7rem; color: var(--muted); font-size: 0.93rem; }

/* ---------- Pagos ---------- */
.pay-methods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pay-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
.pay-pill svg { width: 0.95em; height: 0.95em; color: var(--sage); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
  font-weight: 500;
}
.site-footer a { color: rgba(255, 255, 255, 0.7); transition: color 0.2s var(--ease); }
.site-footer a:hover { color: var(--white); }
.footer-list { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.footer-brand img { height: 40px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { margin-top: 1rem; max-width: 30ch; line-height: 1.6; }

.socials { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.socials a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transition: all 0.2s var(--ease);
}
.socials a:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.socials svg { width: 17px; height: 17px; }

.footer-pay .pay-pill {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
}
.footer-pay .pay-pill svg { color: var(--lavender); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.8rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 1rem; bottom: 1rem;
  z-index: 40;
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1fa855;
  color: var(--white);
  box-shadow: 0 6px 24px rgba(31, 168, 85, 0.4);
  transition: transform 0.25s var(--ease);
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 27px; height: 27px; }

/* ---------- Modal producto ---------- */
.modal {
  /* El navegador centra <dialog> de forma nativa con `margin: auto`,
     pero nuestro reset `* { margin: 0 }` lo pisa (una regla de autor
     siempre gana sobre la del user-agent). Hay que devolverlo aquí.
     El max-width propio del <dialog> también se anula, por la misma
     razón que en .carrito. */
  margin: auto;
  max-width: 100%;
  border: 0;
  padding: 0;
  width: min(880px, calc(100vw - 2rem));
  max-height: min(86dvh, 760px);
  border-radius: var(--radius-lg);
  background: var(--bone);
  color: var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.modal::backdrop { background: rgba(43, 37, 35, 0.55); backdrop-filter: blur(3px); }

.modal-inner {
  display: grid;
  grid-template-columns: 1fr;
  max-height: min(86dvh, 760px);
  overflow-y: auto;
}
@media (min-width: 720px) {
  .modal-inner { grid-template-columns: 1fr 1fr; overflow: hidden; }
  .modal-body { overflow-y: auto; }
}

.modal-media { background: var(--sand); aspect-ratio: 1; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: 0.8rem; }
.modal-body h2 { font-size: var(--step-3); }
.modal-body .card-desc {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  font-size: 0.95rem;
  white-space: pre-line;
}
.modal-body .card-actions { margin-top: 1rem; }

.modal-close {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  background: rgba(251, 248, 244, 0.92);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  font-size: 1.1rem;
  line-height: 1;
}
.modal-close:hover { background: var(--white); }

/* ---------- Aviso admin ---------- */
.notice {
  background: var(--lavender-soft);
  border: 1px solid var(--lavender);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 1.8rem;
}
.notice strong { color: var(--wine); }
.notice code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Carrito ---------- */
.carrito-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.carrito-btn:hover { border-color: var(--wine); color: var(--wine); }
.carrito-btn svg { width: 19px; height: 19px; }

.carrito-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: var(--wine);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
}

/* Panel lateral en escritorio, hoja inferior en móvil */
.carrito {
  /* El navegador impone a <dialog> un max-width: calc(100% - 6px - 2em).
     Sin anularlo, el ancho que pedimos nunca se cumple y en pantallas
     angostas el panel queda pegado a un lado con un hueco al otro. */
  max-width: 100%;
  margin: 0 0 0 auto;
  border: 0;
  padding: 0;
  width: min(460px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bone);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}
.carrito::backdrop { background: rgba(43, 37, 35, 0.5); backdrop-filter: blur(3px); }

.carrito-inner { display: flex; flex-direction: column; height: 100dvh; }

.carrito-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.carrito-head h2 { font-size: var(--step-2); }
.carrito-head .modal-close { position: static; }

.carrito-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem var(--gutter) 2rem;
}

.carrito-aviso {
  background: #fdf4e3;
  border: 1px solid #e8d3a4;
  color: #8a5b12;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.carrito-lista { list-style: none; padding: 0; display: grid; gap: 1rem; }

.carrito-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 0.8rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.carrito-item img,
.carrito-img-vacia {
  width: 62px; height: 62px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--sand);
  display: block;
}
.carrito-item-info { display: grid; gap: 0.3rem; min-width: 0; }
.carrito-item-info strong { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; line-height: 1.2; }
.carrito-unit { font-size: 0.8rem; color: var(--muted); }
.carrito-item-total { font-weight: 500; white-space: nowrap; }

.qty { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.2rem; }
.qty button {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.qty button:hover { border-color: var(--wine); color: var(--wine); }
.qty span { min-width: 22px; text-align: center; font-size: 0.9rem; }
.qty .carrito-quitar {
  width: auto; height: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: underline;
  margin-left: 0.3rem;
  padding: 0.2rem;
}
.qty .carrito-quitar:hover { color: var(--wine); }

.carrito-bloque {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  margin-top: 1.4rem;
  background: var(--white);
}
.carrito-bloque legend {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wine-soft);
  padding-inline: 0.4rem;
}
.carrito-bloque label { display: block; font-size: 0.85rem; margin-top: 0.7rem; }
.carrito-bloque input[type="text"],
.carrito-bloque input[type="tel"],
.carrito-bloque input[type="email"] {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bone);
  font-size: 0.92rem;
}
.carrito-bloque input:focus { outline: none; border-color: var(--wine-soft); }

.radio, .check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.6rem !important;
  cursor: pointer;
}
.radio input, .check input { margin-top: 0.25rem; flex: none; accent-color: var(--wine); }
.radio small, .check span { display: block; }
.radio small { color: var(--muted); font-size: 0.78rem; }
.radio--off { opacity: 0.55; cursor: not-allowed; }
.check span { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.check a { color: var(--wine); text-decoration: underline; }

.carrito-totales { margin-top: 1.4rem; display: grid; gap: 0.45rem; font-size: 0.92rem; }
.carrito-totales > div { display: flex; justify-content: space-between; gap: 1rem; }
.carrito-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.7rem;
  margin-top: 0.3rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--wine);
}

.carrito-error {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #fdeceb;
  border: 1px solid #f0b8b4;
  color: #8c2f28;
  font-size: 0.85rem;
}

.carrito-body .btn { margin-top: 1.2rem; }
.carrito-body .pay-note { margin-top: 0.6rem; }

.carrito-confirmar h3 { font-size: var(--step-2); margin-bottom: 1rem; }
.carrito-resumen { list-style: none; padding: 0; display: grid; gap: 0.55rem; font-size: 0.92rem; }
.carrito-resumen li { display: flex; justify-content: space-between; gap: 1rem; }

@media (max-width: 560px) {
  .carrito {
    /* Hoja inferior a todo el ancho: sin bordes libres, no hay lado
       hacia el que se vea desplazada. */
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 92dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .carrito-inner { height: auto; max-height: 92dvh; }
}

/* `hidden` debe ganarle a cualquier `display` que definamos arriba:
   sin esto, .carrito-totales > div { display:flex } deja visible la
   línea del domicilio aunque el pedido sea para recoger. */
[hidden] { display: none !important; }

/* ---------- Panel de pedidos ---------- */
.pedidos-barra {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 1.6rem 0 1rem;
}

.pedidos-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.pedido {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sand-deep);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.9rem;
}
.pedido--pagado { border-left-color: #1fa855; }
.pedido--rechazado { border-left-color: #c2453c; }
.pedido--pendiente { border-left-color: var(--lavender); }

.pedido-cab {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}
.pedido-cab strong { font-family: var(--font-display); font-size: 1.1rem; display: block; }
.pedido-fecha { font-size: 0.78rem; color: var(--muted); }
.pedido-cab-der { text-align: right; }
.pedido-total { font-family: var(--font-display); font-size: 1.2rem; color: var(--wine); display: block; }

.pedido-estado {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.pedido--pagado .pedido-estado { background: #e6f6ec; color: #14713a; }
.pedido--rechazado .pedido-estado { background: #fdeceb; color: #8c2f28; }

.pedido-items {
  list-style: none;
  padding: 0.8rem 0;
  margin: 0;
  border-block: 1px solid var(--line);
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
}
.pedido-items li { display: flex; justify-content: space-between; gap: 1rem; }

.pedido-datos { display: grid; gap: 0.35rem; font-size: 0.85rem; }
.pedido-dato { display: flex; gap: 0.6rem; }
.pedido-dato span { color: var(--muted); min-width: 82px; flex: none; }
.pedido-dato strong { font-weight: 400; overflow-wrap: anywhere; }

.pedido-acciones { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- Páginas legales ---------- */
.legal { margin-top: 2.4rem; }
.legal h2 {
  font-size: var(--step-2);
  margin: 2.2rem 0 0.7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal p { color: var(--muted); margin-bottom: 0.8rem; }
.legal ul { color: var(--muted); padding-left: 1.2rem; margin-bottom: 1rem; display: grid; gap: 0.35rem; }
.legal a { color: var(--wine); border-bottom: 1px solid var(--sand-deep); }
.legal a:hover { border-color: var(--wine); }
.legal strong { color: var(--ink); }

/* Aviso al cliente cuando el catálogo en vivo no está disponible.
   Tono de advertencia, no de error: la tienda sigue siendo usable. */
.notice--aviso {
  background: #fdf4e3;
  border-color: #e8d3a4;
}
.notice--aviso strong { color: #8a5b12; }
.notice--aviso a {
  color: var(--wine);
  text-decoration: underline;
  font-weight: 500;
}
