/* ── Arbella Studio · design tokens ── */
:root {
  --bg: #F9F6EE;
  --surface: #FFFFFF;
  --wine: #7A2E3E;
  --wine-tint: #F1DEE1;
  --wine-dark-text: #5A1F29;
  --cream-text: #F7F3EA;
  --border: #EAE1D0;
  --chrome-bg: #F0E9DA;
  --text-primary: #332F2A;
  --text-secondary: #6E6A60;
  --text-muted: #8C8577;
  --placeholder-bg: #E6D2D5;
  --placeholder-icon: #B98A94;
  --success: #7FA07A;

  --font-voice: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 8px;
  --radius-lg: 12px;
}

/* Fade a blanco entre navegaciones de página (Chrome/Edge; se ignora en navegadores sin soporte) */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.4s;
  animation-timing-function: ease-in-out;
}
::view-transition-old(root) { animation-name: vt-fade-out; }
::view-transition-new(root) { animation-name: vt-fade-in; }
/* Sin solape: lo viejo termina de desvanecerse antes de que empiece a aparecer lo nuevo,
   dejando un instante en blanco (parpadeo sutil), no un cross-dissolve directo entre ambos. */
@keyframes vt-fade-out {
  0% { opacity: 1; }
  45% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes vt-fade-in {
  0% { opacity: 0; }
  55% { opacity: 0; }
  100% { opacity: 1; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  opacity: 1;
  transition: opacity 0.2s ease;
}
/* Respaldo manual del fade a blanco para navegadores sin View Transitions nativas (Safari/iOS) */
body.page-fade-out,
body.page-fade-in { opacity: 0; }

h1, h2, h3 {
  font-family: var(--font-voice);
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 0.5em;
}
h1 { font-size: 28px; line-height: 1.3; }
h2 { font-size: 22px; line-height: 1.35; }
h3 { font-size: 18px; line-height: 1.4; }
p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: inherit; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Buttons ── */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius);
  padding: 13px 26px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--wine);
  color: var(--cream-text);
  border-color: var(--wine);
}
.btn-primary:hover { background: var(--wine-dark-text); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.btn-secondary:hover { background: var(--surface); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Form controls, shared across pages */
.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  margin: 0 0 8px;
}
.finput {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  font-family: var(--font-sans);
}
.pill {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface);
  cursor: pointer;
}
.pill.sel { border-color: var(--wine); background: var(--wine); color: var(--cream-text); }
.pd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
}
.pd-card.sel { border: 1.5px solid var(--wine); background: var(--wine-tint); }
.pd-card i { font-size: 20px; color: var(--placeholder-icon); display: block; margin-bottom: 6px; }
.pd-card.sel i { color: var(--wine-dark-text); }
.pd-card .emoji { font-size: 20px; display: block; margin-bottom: 6px; line-height: 1; }
.pd-card span { font-size: 12px; color: var(--text-primary); }

/* ── Header / nav ── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
}
.nav-logo {
  font-family: var(--font-voice);
  font-size: 20px;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  flex-wrap: wrap;
}
.nav-links a { text-decoration: none; color: inherit; white-space: nowrap; }
.nav-links a:hover { color: var(--wine); }
.nav-icons { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--text-primary); flex-shrink: 0; }
.lang-toggle { display: flex; align-items: center; gap: 4px; }
.lang-flag-btn {
  border: 1px solid transparent; background: none; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 4px; border-radius: 6px;
  opacity: 0.45; filter: grayscale(60%);
}
.lang-flag-btn.active { opacity: 1; filter: none; border-color: var(--border); background: var(--surface); }
.gift-code-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px; font-weight: 500; color: var(--cream-text);
  background: var(--wine); border: 1px solid var(--wine);
  border-radius: 20px; cursor: pointer;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.gift-code-btn i { font-size: 15px; }
.gift-code-btn:hover { background: var(--wine-dark-text); border-color: var(--wine-dark-text); }
@media (max-width: 480px) {
  .gift-code-btn { padding: 0; width: 32px; height: 32px; border-radius: 50%; justify-content: center; }
  .gift-code-btn span { display: none; }
  /* En vez de amontonar banderas + regalo + cuenta + solicitud + compartir
     junto al logo (donde terminaban envolviendo la hamburguesa a una fila
     aparte), la fila 1 queda solo con logo + hamburguesa y estos íconos
     pasan a su propia fila, repartidos con espacio. */
  .nav-icons { order: 3; width: 100%; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
  .nav-hamburger { order: 2; }
}
.nav-hamburger { display: none; font-size: 22px; cursor: pointer; background: none; border: none; color: var(--text-primary); }

/* Trust banner */
.trust-banner {
  background: var(--wine);
  color: var(--cream-text);
  text-align: center;
  padding: 12px 16px;
}
.trust-banner .headline { font-size: 13px; font-weight: 500; }
.trust-banner .stars { letter-spacing: 2px; }
.trust-banner .rating { font-size: 12px; margin-top: 4px; }

/* Category marquee */
.marquee-outer { position: relative; }
.marquee-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.marquee-wrap::-webkit-scrollbar { display: none; }
.marquee-wrap.dragging { cursor: grabbing; scroll-snap-type: none; }
.marquee-track {
  display: flex;
  gap: 7px;
  width: max-content;
  padding-left: 28px;
  animation: arbella-scroll 65s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
.marquee-track.user-controlled { animation-play-state: paused !important; }
.marquee-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; z-index: 3;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-primary); padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.marquee-arrow:hover { border-color: var(--wine); color: var(--wine); }
.marquee-arrow-left { left: 4px; }
.marquee-arrow-right { right: 4px; }
.cat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--surface);
  text-decoration: none;
}
.cat-pill .emoji { font-size: 12px; line-height: 1; }
.cat-pill.sel { border-color: var(--wine); color: var(--wine-dark-text); background: var(--wine-tint); }
.cat-pill-led {
  background: #0a0a0f;
  border-color: #0a0a0f;
  color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 10px #6ee7ff, 0 0 18px #d946ef;
  animation: cat-pill-led-glow 2.4s ease-in-out infinite;
}
.cat-pill-led .emoji { filter: drop-shadow(0 0 4px #fff); }
.cat-pill-led.sel { background: #0a0a0f; border-color: #0a0a0f; color: #fff; }
@keyframes cat-pill-led-glow {
  0%, 100% { box-shadow: 0 0 8px 1px rgba(110, 231, 255, 0.55), 0 0 18px 4px rgba(217, 70, 239, 0.35); }
  50% { box-shadow: 0 0 14px 3px rgba(110, 231, 255, 0.85), 0 0 28px 8px rgba(217, 70, 239, 0.6); }
}
@keyframes arbella-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Footer ── */
.site-footer { background: var(--chrome-bg); border-top: 1px solid var(--border); }
.footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
}
.footer-col h3 { font-size: 13px; margin-bottom: 12px; }
.footer-col a, .footer-col span {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--wine); }
.newsletter-row { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); }
.newsletter-row input { flex: 1; border: none; padding: 10px 12px; font-size: 13px; font-family: var(--font-sans); }
.newsletter-row button { background: var(--text-primary); color: var(--bg); border: none; padding: 0 16px; cursor: pointer; }
.footer-bottom { text-align: center; padding: 16px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ── Compartir ── */
.section-eyebrow-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-eyebrow-row .share-btn { color: var(--text-muted); }
.share-wrap.section-share-corner { position: absolute; top: 8px; right: 20px; z-index: 2; }
.section-share-corner .share-btn { color: var(--text-muted); }
.share-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.share-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: none; border: none; color: inherit;
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.share-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; gap: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.share-menu.show { display: flex; }
.share-option {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--bg);
  color: var(--text-primary); font-size: 16px; cursor: pointer; padding: 0;
}
.share-option:hover { border-color: var(--wine); color: var(--wine); }
.share-option[data-network="whatsapp"]:hover { color: #25d366; border-color: #25d366; }
.share-option[data-network="facebook"]:hover { color: #1877f2; border-color: #1877f2; }
.share-option[data-network="instagram"]:hover { color: #e1306c; border-color: #e1306c; }

.back-to-top {
  position: fixed; right: 20px; bottom: 80px; z-index: 500;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--wine); color: var(--cream-text);
  border: none; display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--wine-dark-text); }
@media (max-width: 640px) {
  .back-to-top { right: 14px; bottom: 66px; width: 40px; height: 40px; font-size: 18px; }
}

.whatsapp-float {
  position: fixed; right: 20px; bottom: 24px; z-index: 500;
  width: 46px; height: 46px; border-radius: 50%;
  background: #25D366; color: #fff;
  border: none; display: flex; align-items: center; justify-content: center;
  font-size: 24px; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, background 0.2s ease;
}
.whatsapp-float:hover { background: #1FAF57; transform: scale(1.06); }
@media (max-width: 640px) {
  .whatsapp-float { right: 14px; bottom: 18px; width: 42px; height: 42px; font-size: 21px; }
}

.share-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 3000;
  transform: translateX(-50%) translateY(16px);
  background: var(--text-primary); color: var(--cream-text);
  padding: 11px 20px; border-radius: 8px; font-size: 13px;
  max-width: 90vw; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-links.nav-links-open {
    display: flex;
    flex-direction: column;
    width: 100%;
    order: 3;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .nav-hamburger { display: block; }
}

.embalaje-image-full {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  aspect-ratio: 20/9;
  overflow: hidden;
  cursor: pointer;
}
.embalaje-image-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
