/* =========================================================
   MyGoody — Rediseño de la página de inicio (home)
   Se carga SOLO en index.html, después de style.css.
   Redefine los tokens de diseño para la home (paleta cálida,
   tipografías Fraunces + Figtree) sin afectar al resto de páginas.
   ========================================================= */

.site-v2 {
  --color-bg: #F6F1E7;          /* fondo crema */
  --color-bg-alt: #FFFDF8;      /* tarjetas / cabecera */
  --color-text: #1C231D;        /* texto principal */
  --color-text-muted: #5B6459;  /* texto secundario */
  --text-2: #4A5448;
  --color-border: #E6DECF;
  --color-accent: #24452B;      /* verde bosque principal */
  --color-accent-dark: #16301C; /* verde oscuro */
  --color-accent-contrast: #FFFFFF;
  --color-success: #24452B;
  --color-danger: #A8482A;
  --terracota: #A8482A;
  --sage: #DCE5D3;
  --sand: #EBDCCB;
  --beige: #E3E0CC;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 16px;
}

/* Fondo con huellas (v2, sutil sobre crema) */
body.site-v2 {
  background-color: var(--color-bg);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='170'%20height='170'%20viewBox='0%200%20170%20170'%3E%3Cg%20fill='%2324452B'%20fill-opacity='0.05'%3E%3Cg%20transform='translate%2840%2048%29%20rotate%28-15%29%20scale%280.9%29'%3E%3Cg%3E%3Cellipse%20cx='0'%20cy='7'%20rx='13'%20ry='10'/%3E%3Cellipse%20cx='-12'%20cy='-6'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='-4'%20cy='-13'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='4'%20cy='-13'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='12'%20cy='-6'%20rx='4.5'%20ry='6'/%3E%3C/g%3E%3C/g%3E%3Cg%20transform='translate%28128%20104%29%20rotate%2820%29%20scale%281.05%29'%3E%3Cg%3E%3Cellipse%20cx='0'%20cy='7'%20rx='13'%20ry='10'/%3E%3Cellipse%20cx='-12'%20cy='-6'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='-4'%20cy='-13'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='4'%20cy='-13'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='12'%20cy='-6'%20rx='4.5'%20ry='6'/%3E%3C/g%3E%3C/g%3E%3Cg%20transform='translate%2874%20142%29%20rotate%28-6%29%20scale%280.72%29'%3E%3Cg%3E%3Cellipse%20cx='0'%20cy='7'%20rx='13'%20ry='10'/%3E%3Cellipse%20cx='-12'%20cy='-6'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='-4'%20cy='-13'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='4'%20cy='-13'%20rx='4.5'%20ry='6'/%3E%3Cellipse%20cx='12'%20cy='-6'%20rx='4.5'%20ry='6'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: 170px 170px;
  background-repeat: repeat;
}

.site-v2 .container { max-width: 1240px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

.site-v2 h1, .site-v2 h2, .site-v2 h3 { letter-spacing: -0.015em; }

/* ===================== 1. Barra de anuncio ===================== */
.promo-v2 {
  background: var(--color-accent-dark);
  color: #F3EEE2;
  min-height: 40px;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
}
.promo-v2-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
}
.promo-v2-sep { opacity: 0.5; }

/* ===================== 2. Cabecera ===================== */
.header-v2 {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.header-v2-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.brand-v2 { flex-shrink: 0; display: flex; align-items: center; }
.brand-v2-logo { height: 88px; width: auto; display: block; }

/* Buscador */
.search-v2 {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0 18px;
  height: 48px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-v2:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(36, 69, 43, 0.12);
}
.search-v2-icon { color: var(--color-text-muted); flex-shrink: 0; }
.search-v2 input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  outline: none;
}
.search-v2 input::placeholder { color: var(--color-text-muted); }

/* Acciones */
.header-v2-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.action-v2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
}
.action-v2:hover { background: var(--color-bg); }
.action-v2-label { white-space: nowrap; }
.action-v2 .cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--terracota);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Botón carrito (verde relleno) */
.cart-v2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.cart-v2:hover { background: var(--color-accent-dark); }
.cart-v2-label { white-space: nowrap; }
.cart-count-v2 {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Botón hamburguesa: siempre visible (escritorio y móvil) */
.nav-toggle-v2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}
.nav-toggle-v2:hover { background: var(--color-bg-alt); border-color: var(--color-accent); }
.nav-toggle-v2[aria-expanded="true"] { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* La barra de navegación horizontal se sustituye por el menú hamburguesa */
.mainnav-v2 { display: none; }

/* Menú desplegable (panel bajo la hamburguesa, en todos los tamaños) */
.mobile-nav-v2 {
  display: none;
  position: absolute;
  top: 100%;
  right: calc((100% - min(1240px, 100% - 40px)) / 2);
  z-index: 60;
  width: min(320px, calc(100vw - 24px));
  margin-top: 8px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(22, 48, 28, 0.18);
  max-height: min(74vh, 560px);
  overflow-y: auto;
}
.mobile-nav-v2.open { display: block; }
.mobile-nav-v2 .mobile-nav-v2-inner { display: flex; flex-direction: column; padding: 8px; max-width: none; margin: 0; }
.mobile-nav-v2-inner a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-text);
}
.mobile-nav-v2-inner a:hover { background: var(--color-bg); color: var(--color-accent); }
.mobile-nav-v2-inner a[aria-current="page"] { background: var(--color-bg); color: var(--color-accent); }
.mobile-nav-v2-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin: 12px 0 2px;
  padding: 0 14px;
}

/* ===================== 3. Hero ===================== */
.hero-v2 { padding: 56px 0 40px; }
.hero-v2-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-v2-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 18px;
}
.hero-v2-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.35rem, 5.2vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0 0 20px;
}
.hero-v2-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--terracota);
}
.hero-v2-sub {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 46ch;
  margin: 0 0 28px;
}
.hero-v2-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-v2-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.hero-v2-checks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
}
.hero-v2-checks svg { color: var(--color-accent); flex-shrink: 0; }

/* Botones */
.btn-v2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
  border: 2px solid transparent;
}
.btn-v2:active { transform: translateY(1px); }
.btn-v2-primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-v2-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }
.btn-v2-outline { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }
.btn-v2-outline:hover { background: rgba(36, 69, 43, 0.07); }

/* Mosaico de fotos */
.hero-v2-visual {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}
.hero-v2-hero-img {
  position: relative;
  margin: 0;
  border-radius: 26px;
  overflow: hidden;
  background: var(--sage);
  aspect-ratio: 3 / 4;
}
.hero-v2-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-v2-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  padding: 11px 15px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  box-shadow: 0 6px 20px rgba(22, 48, 28, 0.14);
}
.hero-v2-tag-kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--terracota);
  margin-bottom: 2px;
}
.hero-v2-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.hero-v2-mini {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.hero-v2-mini img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hero-v2-mini--white { background: #FFFFFF; border: 1px solid var(--color-border); }
.hero-v2-mini--sage { background: var(--sage); }

/* ===================== 4. Franja de confianza ===================== */
.trust-v2 { padding: 8px 0 44px; }
.trust-v2-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: 0 8px 26px rgba(22, 48, 28, 0.06);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.trust-v2-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-left: 1px solid var(--color-border);
}
.trust-v2-item:first-child { border-left: none; }
.trust-v2-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--sage);
  color: var(--color-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-v2-item:nth-child(2) .trust-v2-icon { background: var(--sand); }
.trust-v2-item:nth-child(3) .trust-v2-icon { background: var(--beige); }
.trust-v2-item:nth-child(4) .trust-v2-icon { background: var(--sage); }
.trust-v2-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trust-v2-text strong { font-size: 0.96rem; font-weight: 700; color: var(--color-text); }
.trust-v2-text span { font-size: 0.84rem; color: var(--color-text-muted); line-height: 1.4; }

/* ===================== Encabezado de sección ===================== */
.section-head-v2 { text-align: center; margin: 8px 0 26px; }
.section-head-v2 h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--color-text);
}
.section-head-v2 p { margin: 0; color: var(--color-text-muted); font-size: 1rem; }
.catalog-v2 { padding-top: 34px; padding-bottom: 20px; }

/* ===================== Armonizar componentes compartidos ===================== */
/* Tarjetas de producto más redondeadas y cálidas */
.site-v2 .product-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 22px;
}
.site-v2 .product-card .thumb { border-radius: 18px 18px 0 0; }
.site-v2 .filter-chip { border-radius: 999px; }

/* Botones de sistema (carrito, checkout, éxito) en píldora y con la nueva paleta */
.site-v2 .primary-btn,
.site-v2 .secondary-btn { border-radius: 999px; }

/* Cómo funciona / testimonios / sobre nosotros */
.site-v2 .how-it-works h2,
.site-v2 .about-section h2,
.site-v2 .testimonials-section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.site-v2 .step,
.site-v2 .testimonial {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 22px;
}
.site-v2 .step-number { background: var(--color-accent); color: #fff; }
.site-v2 .testimonial .stars { color: #E1A73E; }
.site-v2 .about-section { background: var(--sage); }

/* Footer coherente con la paleta */
.site-v2 .site-footer { background: var(--color-accent-dark); color: #D9DFCF; border-top: none; }
.site-v2 .site-footer h4 { color: #FFFDF8; }
.site-v2 .site-footer a { color: #C7CFBB; }
.site-v2 .site-footer a:hover { color: #FFFDF8; }
.site-v2 .footer-badges,
.site-v2 .footer-bottom { border-top-color: rgba(255, 255, 255, 0.12); }

/* ===================== Sección de Packs (portada) ===================== */
.packs-v2 { background: var(--sage); padding: 44px 0 48px; margin: 8px 0 10px; }
.packs-v2 .section-head-v2 { margin-bottom: 30px; }
.packs-v2-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}
.packs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: stretch;
}
.pack-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pack-card:hover,
.pack-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(36, 69, 43, 0.14);
  border-color: var(--color-accent);
  outline: none;
}
.pack-card-media { position: relative; aspect-ratio: 1 / 1; background: #fff; }
.pack-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pack-flag {
  position: absolute; top: 12px; left: 12px;
  background: var(--color-accent); color: #fff;
  font-size: 0.76rem; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.pack-flag.out { background: #8a1f1f; }
.pack-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.pack-card-kicker { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-accent); }
.pack-card-title { font-family: var(--font-display); font-weight: 500; font-size: 1.22rem; letter-spacing: -0.01em; margin: 0; color: var(--color-text); line-height: 1.2; }
.pack-card-desc {
  margin: 2px 0 0; font-size: 0.88rem; line-height: 1.5; color: var(--color-text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pack-card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pack-card-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pack-price-now { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--color-accent); }
.pack-price-was { text-decoration: line-through; color: var(--color-text-muted); font-size: 0.95rem; }
.pack-card-btn {
  flex-shrink: 0;
  background: var(--color-accent); color: #fff;
  font-size: 0.85rem; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  transition: background 0.18s ease;
}
.pack-card:hover .pack-card-btn { background: var(--color-accent-dark); }
.pack-card.is-out { opacity: 0.72; }
.pack-card.is-out .pack-card-btn { background: var(--color-text-muted); }

/* ===================== Responsive ===================== */
@media (max-width: 1100px) {
  .packs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero-v2-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-v2-visual { max-width: 560px; }
  .trust-v2-card { grid-template-columns: 1fr 1fr; }
  .trust-v2-item:nth-child(odd) { border-left: none; }
  .trust-v2-item:nth-child(3), .trust-v2-item:nth-child(4) { border-top: 1px solid var(--color-border); }
}
@media (max-width: 560px) {
  .packs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .action-v2-account .action-v2-label { display: none; }
  .cart-v2-label { display: none; }
  .cart-v2 { padding: 0 14px; }
  .brand-v2-logo { height: 52px; }
  .search-v2 { order: 3; flex-basis: 100%; max-width: none; }
  .header-v2-top { flex-wrap: wrap; gap: 10px 12px; }
  .brand-v2 { margin-right: auto; }
  .header-v2-actions { gap: 6px; }
  .action-v2 { padding: 0 8px; }
}

@media (max-width: 480px) {
  .hero-v2 { padding: 34px 0 28px; }
  .hero-v2-visual { grid-template-columns: 1fr 0.8fr; gap: 12px; }
  .promo-v2 { font-size: 0.78rem; }
  .promo-v2-inner { gap: 8px; }
  .brand-v2-logo { height: 46px; }
}

/* ===================== Páginas interiores (v2) ===================== */
.site-v2 .page-hero {
  background: var(--sage);
  border-bottom: 1px solid var(--color-border);
  padding: 52px 0;
}
.site-v2 .page-hero h1 {
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}
.site-v2 .page-content h2,
.site-v2 .page-content h3 { font-weight: 500; letter-spacing: -0.015em; }

.site-v2 .contact-card,
.site-v2 .legal-note,
.site-v2 .faq-item,
.site-v2 .contact-form-wrap,
.site-v2 .checkout-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
}
.site-v2 .contact-card { padding: 22px; }
.site-v2 .contact-card a,
.site-v2 .contact-card a:visited { color: var(--color-accent); font-weight: 600; }
.site-v2 .faq-item { border-radius: 16px; }
.site-v2 .form-row input,
.site-v2 .form-row textarea {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}
.site-v2 .legal-jump a {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--color-bg-alt);
  font-weight: 600;
}
.site-v2 .legal-jump a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ===================== Cuentas de cliente (v2) ===================== */
.account-root { display: block; }
.account-loading { color: var(--color-text-muted); }

.account-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 8px 26px rgba(22, 48, 28, 0.06);
}
.account-card-title { margin: 0 0 14px; font-weight: 500; }
.auth-tabs { display: flex; gap: 6px; background: var(--color-bg); border-radius: 999px; padding: 5px; margin-bottom: 18px; }
.auth-tab {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 10px 12px; border-radius: 999px; font-family: inherit; font-size: 0.92rem;
  font-weight: 600; color: var(--color-text-muted);
}
.auth-tab.active { background: var(--color-bg-alt); color: var(--color-accent); box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08)); }
.auth-form { display: flex; flex-direction: column; gap: 4px; }
.auth-form[hidden] { display: none; }
.auth-intro { margin: 0 0 6px; color: var(--color-text-muted); font-size: 0.92rem; }
.field-hint { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 4px; }
.account-submit { width: 100%; margin-top: 10px; }
.linklike {
  background: none; border: none; color: var(--color-accent); cursor: pointer;
  font-family: inherit; font-size: 0.88rem; font-weight: 600; padding: 10px 4px 0; text-align: center;
}
.linklike:hover { text-decoration: underline; }
.auth-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 0.88rem; }
.auth-msg.error { background: #f7e2dc; color: #8a2f1a; }
.auth-msg.success { background: var(--sage); color: #1f5130; }

/* Panel del cliente */
.account-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.account-side {
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 20px;
  padding: 20px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px;
}
.account-hello { display: flex; align-items: center; gap: 12px; }
.account-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-accent); color: #fff; font-weight: 700; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
}
.account-hello-txt { display: flex; flex-direction: column; min-width: 0; }
.account-hello-txt strong { font-size: 1rem; }
.account-hello-txt span { font-size: 0.82rem; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; }
.account-logout { width: 100%; }
.account-main h2 { font-weight: 500; margin: 4px 0 16px; }
.account-empty {
  background: var(--color-bg-alt); border: 1px dashed var(--color-border); border-radius: 18px;
  padding: 28px; text-align: center; color: var(--color-text-muted); display: flex;
  flex-direction: column; align-items: center; gap: 14px;
}

/* Tarjetas de pedido */
.order-row { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 18px; padding: 16px 18px; margin-bottom: 14px; }
.order-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.order-row-head strong { font-size: 1rem; }
.order-date { display: block; font-size: 0.8rem; color: var(--color-text-muted); }
.order-status { font-size: 0.75rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.status-pendiente { background: #fdeccd; color: #8a5a00; }
.status-preparando { background: #dbe9fb; color: #1b4d8a; }
.status-enviado { background: #d7efe0; color: #1f6d3d; }
.status-entregado { background: #cfe8d6; color: #14532d; }
.status-cancelado { background: #f3d6d6; color: #8a1f1f; }
.order-items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 0.9rem; color: var(--color-text); }
.order-items .oi-var { color: var(--color-text-muted); }
.order-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--color-border); padding-top: 10px; }
.order-total { font-weight: 700; font-size: 1.02rem; }
.order-invoice { color: var(--color-accent); font-weight: 600; font-size: 0.9rem; }
.order-invoice:hover { text-decoration: underline; }
.order-track { margin-top: 8px; font-size: 0.82rem; color: var(--color-text-muted); }

@media (max-width: 720px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-side { position: static; }
  /* El menú de secciones pasa a barra horizontal desplazable */
  .account-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .account-nav a { white-space: nowrap; flex-shrink: 0; border: 1px solid var(--color-border); }
}

/* ===================== Panel de cuenta ampliado ===================== */
.account-nav { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.account-nav a { padding: 9px 12px; border-radius: 10px; font-size: 0.92rem; font-weight: 600; color: var(--color-text-muted); }
.account-nav a:hover { background: var(--color-bg); color: var(--color-accent); }
.account-nav a.active { background: var(--color-bg); color: var(--color-accent); }
.verify-badge { font-size: 0.72rem; font-weight: 700; color: #1f6d3d; }
.verify-badge.pending { color: #8a5a00; }

.account-section { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 20px; padding: 22px; margin-bottom: 18px; scroll-margin-top: 120px; }
.account-section h2 { font-weight: 500; margin: 0 0 14px; font-size: 1.3rem; }
.account-intro { margin: 0 0 14px; color: var(--color-text-muted); }
.account-form { display: flex; flex-direction: column; gap: 4px; max-width: 460px; }
.account-form .btn-v2 { align-self: flex-start; margin-top: 10px; }
.account-check { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; color: var(--text-2); margin: 8px 0 2px; cursor: pointer; }
.account-check input { width: 18px; height: 18px; accent-color: var(--color-accent); }
.account-msg { margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; font-size: 0.86rem; }
.account-msg.success { background: var(--sage); color: #1f5130; }
.account-msg.error { background: #f7e2dc; color: #8a2f1a; }
.account-warn { color: #8a2f1a; font-size: 0.9rem; margin: 0 0 6px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: #fdeccd; border: 1px solid #f0d9a8; border-radius: 16px; padding: 14px 18px; margin-bottom: 18px; }
.verify-banner strong { display: block; color: #8a5a00; }
.verify-banner span { font-size: 0.86rem; color: #7a5410; }

.btn-danger { background: #fff; color: #a51f1f; border: 2px solid #e3b7b7; }
.btn-danger:hover { background: #a51f1f; color: #fff; border-color: #a51f1f; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.88rem; }
.order-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
a.order-track { color: var(--color-accent); font-weight: 600; font-size: 0.88rem; }
a.order-track:hover { text-decoration: underline; }

/* ===================== Descuentos en el carrito ===================== */
#cart-discounts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cart-coupon-row { display: flex; gap: 8px; }
.cart-coupon-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--color-border);
  border-radius: 10px; font-family: inherit; font-size: 0.9rem; background: var(--color-bg); color: var(--color-text);
}
.cart-coupon-row button {
  flex-shrink: 0; padding: 0 16px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--color-accent); color: #fff; font-weight: 700; font-family: inherit; font-size: 0.88rem;
}
.cart-coupon-row button:hover { background: var(--color-accent-dark); }
.coupon-applied {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--sage); border-radius: 10px; padding: 9px 12px; font-size: 0.9rem; font-weight: 600; color: #1f5130;
}
.coupon-applied button { background: none; border: none; color: #1f5130; cursor: pointer; font-weight: 700; text-decoration: underline; font-size: 0.84rem; }
.coupon-msg { margin: 0; font-size: 0.82rem; }
.coupon-msg.error { color: #a51f1f; }
.cart-points-btn {
  width: 100%; padding: 11px 12px; border: 1px dashed var(--color-accent); border-radius: 10px; cursor: pointer;
  background: rgba(36, 69, 43, 0.05); color: var(--color-accent); font-weight: 700; font-family: inherit; font-size: 0.9rem;
}
.cart-points-btn:hover { background: rgba(36, 69, 43, 0.1); }
.cart-points-btn.active { background: var(--color-accent); color: #fff; border-style: solid; }
.cart-discount-line span { color: var(--terracota); font-weight: 700; }

/* Saldo de puntos en el panel de cuenta */
.account-points { background: var(--sage); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 1px; text-align: center; }
.account-points-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--color-accent-dark); line-height: 1; }
.account-points-lbl { font-size: 0.78rem; color: #3c5a41; font-weight: 600; }

/* Control de cantidad en el carrito */
.cart-qty { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
.cart-qty-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--color-border);
  background: var(--color-bg); color: var(--color-text); font-size: 1.1rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cart-qty-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.cart-qty-val { min-width: 22px; text-align: center; font-weight: 700; font-size: 0.95rem; }
.cart-line-total { margin-left: auto; font-weight: 700; }

/* ===================== Robustez móvil ===================== */
/* overflow-x: clip evita el scroll horizontal SIN romper el header sticky.
   Solo max-width en imágenes (NO tocar height, para no romper el logo). */
body.site-v2 { max-width: 100%; overflow-x: clip; }
.site-v2 .product-card img, .site-v2 .hero-v2-visual img { max-width: 100%; }
/* Respaldo para navegadores sin soporte de aspect-ratio: evita imágenes de 0 de alto */
@supports not (aspect-ratio: 1 / 1) {
  .hero-v2-hero-img { min-height: 320px; }
  .hero-v2-mini { min-height: 150px; }
}

/* ===================== Aviso de cookies ===================== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 660px; margin: 0 auto;
  background: var(--color-accent-dark); color: #F3EEE2;
  border-radius: 16px; padding: 15px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
}
.cookie-banner p { margin: 0; font-size: 0.86rem; line-height: 1.5; flex: 1 1 260px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-accept {
  flex-shrink: 0; background: #fff; color: var(--color-accent-dark);
  border: none; border-radius: 999px; padding: 10px 24px; font-weight: 700;
  font-family: inherit; font-size: 0.9rem; cursor: pointer; min-height: 44px;
}
.cookie-accept:hover { background: var(--sage); }
@media (max-width: 480px) { .cookie-banner { left: 10px; right: 10px; bottom: 10px; } }

/* ===================== Catálogo de recompensas (puntos) ===================== */
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.reward-card {
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 16px;
  padding: 16px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.reward-card.is-locked { opacity: 0.62; }
.reward-val { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--color-accent-dark); line-height: 1; }
.reward-pts { font-size: 0.82rem; color: var(--color-text-muted); font-weight: 600; }
.reward-card .reward-redeem { margin-top: 6px; width: 100%; justify-content: center; }
.reward-codes-title { font-weight: 500; font-size: 1.05rem; margin: 20px 0 10px; }
.reward-codes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reward-codes-list li {
  display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  background: var(--sage); border-radius: 12px; padding: 10px 14px;
}
.rc-code { font-family: monospace; font-weight: 700; font-size: 1rem; letter-spacing: 0.04em; color: var(--color-accent-dark); }
.rc-val { font-weight: 600; font-size: 0.88rem; color: #1f5130; }
.rc-exp { margin-left: auto; font-size: 0.8rem; color: #3c5a41; }
