/* Gama cromática oficial — Manual de Identidad Limpio tu Desmadre */
:root {
  --color-primary: #1a1661;   /* azul logo */
  --color-primary-dark: #100d3d;
  --color-ice: #e9f9fe;       /* azul hielo logo */
  --color-steel: #b6ced8;     /* azul acero logo */
  --color-accent: #fb9a3b;    /* naranja logo / fondo */
  --color-yellow: #fccf02;    /* amarillo fondo */
  --color-lime: #e2e743;      /* amarillo-lima logo */
  --color-bg: #f5f5f5;
  --color-text: #1a1661;
  --color-muted: #5a5a72;
  --color-white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(26, 22, 97, 0.12);
  --font-heading: Impact, 'Anton', sans-serif; /* Títulos: IMPACT (manual) */
  --font-body: 'Montserrat', sans-serif;       /* Subtítulos y cuerpo: Montserrat */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

ul { list-style: none; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 400;
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-yellow);
  color: var(--color-primary);
  box-shadow: 0 8px 20px rgba(252, 207, 2, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-whatsapp {
  width: 100%;
  background: #25d366;
  color: var(--color-white);
  padding: 16px;
  font-size: 1rem;
  text-transform: uppercase;
  border-radius: 12px;
}
.btn-whatsapp:disabled {
  background: #b9c3c3;
  cursor: not-allowed;
  transform: none;
}

/* Header — píldora navy flotante; la franja alrededor es transparente
   para que al hacer scroll solo se vea la píldora */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  padding: 18px 0;
  pointer-events: none;
  transition: padding 0.3s ease;
}
.nav-pill { pointer-events: auto; }

/* Al hacer scroll la píldora se expande en un rectángulo de extremo a extremo */
.site-header.scrolled { padding: 0; }
.site-header.scrolled .nav-pill {
  --bleed: calc((100vw - min(100vw, 1140px)) / 2 + 20px);
  margin: 0 calc(-1 * var(--bleed));
  padding-left: calc(var(--bleed) + 32px);
  padding-right: calc(var(--bleed) + 32px);
  border-radius: 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--color-primary);
  border-radius: 999px;
  padding: 12px 32px;
  box-shadow: 0 6px 18px rgba(26, 22, 97, 0.25);
  transition: margin 0.3s ease, padding 0.3s ease, border-radius 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 38px;
  flex: 1;
  justify-content: center; /* enlaces centrados como grupo, con espacios uniformes */
}
.main-nav a {
  font-weight: 700;
  color: var(--color-white);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--color-yellow); }
.nav-register {
  background: var(--color-yellow);
  color: var(--color-primary);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-register:hover {
  background: var(--color-accent);
  color: var(--color-white);
}
/* La versión del menú desplegable solo existe en móvil */
.nav-register-mobile { display: none; }

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Nota temporal junto a "Regístrate" (aparece a los 3s, dura 5s) */
.register-note {
  position: absolute;
  top: calc(100% + 22px);
  right: 30px;
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(26, 22, 97, 0.25);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
}
.register-note::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 34px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid var(--color-white);
}
.register-note.show {
  opacity: 1;
  transform: translateY(0);
}

.cart-btn {
  position: relative;
  background: var(--color-yellow);
  color: var(--color-white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cart-btn svg { display: block; }

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-white);
  cursor: pointer;
}

/* Hero — fondo naranja institucional sólido, pantalla completa.
   Sube detrás del header transparente para que no quede franja gris arriba */
.hero {
  background-color: var(--color-accent);
  color: var(--color-primary);
  margin-top: -100px; /* 100px ≈ alto del header sticky */
  padding: 140px 0 0;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
}
.hero-text {
  flex: 1 1 420px;
  text-align: left;
  padding-bottom: 40px;
}
/* H1 SEO — keyword principal como "eyebrow" arriba del titular */
.hero-kicker {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-white);
  border-left: 6px solid var(--color-white);
  padding-left: 12px;
  margin-bottom: 14px;
}
.hero .hero-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 20px;
  max-width: none;
  color: #000000;
  text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
.hero .highlight { color: var(--color-white); }
.hero p {
  max-width: 560px;
  margin: 0 0 34px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #000000;
  opacity: 0.92;
}
.hero .btn-primary { color: #000000; }
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-figure {
  position: relative;
  flex: 1 1 440px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  align-self: flex-end;
  /* deja que el héroe se extienda hasta el borde derecho de la pantalla
     sin desalinear el texto del container */
  margin-right: min(0px, calc((1140px - 100vw) / 2));
}
/* Sombra en el piso, a los pies del héroe */
.hero-figure::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(16, 13, 61, 0.35) 0%, transparent 70%);
  z-index: 0;
}
.hero-figure img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: calc(100svh - 110px);
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.hero-figure img:hover {
  transform: translateY(-14px) rotate(-2deg);
}

/* Section titles */
.section-title {
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: 36px;
}

/* Catalog */
.catalog { padding: 80px 0; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover { background: rgba(26, 22, 97, 0.08); }
.filter-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Carrusel del catálogo (solo en "Todos") */
.catalog-slider {
  position: relative;
}

.slider-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(26, 22, 97, 0.3);
  transition: background 0.15s ease, opacity 0.15s ease;
}
.slider-arrow.visible { display: flex; }
.slider-arrow:hover:not(:disabled) { background: var(--color-accent); }
.slider-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.slider-arrow.prev { left: -24px; }
.slider-arrow.next { right: -24px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}
.product-grid.paginated {
  grid-template-columns: repeat(4, 1fr);
}

@keyframes gridSlideIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
.product-grid.slide-in { animation: gridSlideIn 0.25s ease; }

@media (max-width: 950px) {
  .product-grid.paginated { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .product-grid.paginated { grid-template-columns: 1fr; }
  .slider-arrow.prev { left: -10px; }
  .slider-arrow.next { right: -10px; }
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}
.product-card:hover { transform: translateY(-4px); }

.product-emoji {
  font-size: 2.8rem;
  text-align: center;
  background: var(--color-bg);
  border-radius: 12px;
  padding: 24px 0;
  margin-bottom: 16px;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-desc {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--color-primary-dark);
}

.add-btn {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
  text-transform: uppercase;
}
.add-btn:hover { background: var(--color-accent); }

/* About */
.about {
  background: var(--color-white);
  padding: 80px 0;
}
.about-inner {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}
.about-text { flex: 1 1 380px; }
.about-text p {
  color: var(--color-muted);
  margin-bottom: 18px;
  font-size: 1.05rem;
}
.about-text p.about-steps-intro {
  font-weight: 700;
  color: var(--color-text);
}
.about-steps {
  list-style: none;
  margin-bottom: 28px;
}
.about-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 600;
}
.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-cta { box-shadow: 0 8px 20px rgba(252, 207, 2, 0.45); }

/* Héroe volador sobre tarjeta amarilla (como el sitio original) */
.about-figure {
  flex: 1 1 320px;
  display: flex;
  justify-content: center;
}
.hero-card {
  position: relative;
  background: var(--color-yellow);
  border-radius: 44px;
  width: min(320px, 75%);
  aspect-ratio: 0.85;
}
.hero-card img {
  position: absolute;
  top: 50%;
  left: 12%;
  transform: translateY(-50%);
  width: 125%;
  max-width: none;
  filter: drop-shadow(0 14px 22px rgba(26, 22, 97, 0.3));
  transition: transform 0.3s ease, filter 0.3s ease;
}
.hero-card img:hover {
  transform: translateY(-54%) rotate(-4deg) scale(1.05);
  filter: drop-shadow(0 22px 30px rgba(26, 22, 97, 0.35));
}

/* Contact */
.contact { padding: 80px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.contact-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  text-align: center;
}
.contact-card h3 { margin-bottom: 12px; color: var(--color-primary-dark); }
.contact-card p { color: var(--color-muted); }
.contact-card a { color: var(--color-primary); font-weight: 700; }

/* Teléfono y WhatsApp — íconos en color sólido sobre fondo transparente */
.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--color-primary);
  transition: opacity 0.15s ease;
}
.contact-link:hover { opacity: 0.75; }
.contact-link svg { flex-shrink: 0; }
.contact-link.whatsapp { color: #25d366; }

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 24px 0;
  font-size: 0.9rem;
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--color-white);
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}
.cart-drawer.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}
.cart-header h2 { font-size: 1.3rem; color: var(--color-primary-dark); }
.cart-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--color-muted);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-empty {
  color: var(--color-muted);
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cart-item-emoji {
  font-size: 1.8rem;
  background: var(--color-bg);
  border-radius: 10px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; }
.cart-item-price { color: var(--color-muted); font-size: 0.8rem; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: var(--color-white);
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.cart-item-remove {
  background: none;
  border: none;
  color: #d9534f;
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: 8px;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid #eee;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--color-primary-dark);
}

/* Floating WhatsApp button */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: #25d366;
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
  z-index: 90;
  transition: transform 0.15s ease;
}
.floating-whatsapp:hover { transform: scale(1.08); }

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: calc(100% - 10px);
    left: 20px;
    right: 20px;
    background: var(--color-primary);
    border-radius: 22px;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px;
    display: none;
    box-shadow: 0 10px 24px rgba(26, 22, 97, 0.3);
  }
  .main-nav.open { display: flex; }
  .menu-toggle { display: block; }
  .site-header { position: relative; }
  /* en móvil "Regístrate" vive resaltado dentro del menú desplegable */
  .main-nav .nav-register-mobile { display: inline-block; }
  .header-actions .nav-register { display: none; }
  .register-note { display: none; }
  .hero { padding-top: 150px; }
  .hero-text {
    text-align: center;
    padding-bottom: 0;
  }
  .hero p { margin: 0 auto 34px; }
  .hero-cta { justify-content: center; }
  .about-inner { text-align: center; }

  /* (1) Kicker SEO en una sola línea */
  .hero-kicker {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    border-left-width: 4px;
    padding-left: 8px;
  }

  /* (2) Catálogo como carrusel: un producto a la vez, swipe horizontal.
     Aplica a todas las categorías; el JS desactiva la paginación de "Todos" */
  .product-grid,
  .product-grid.paginated {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    scrollbar-width: none;
  }
  .product-grid::-webkit-scrollbar { display: none; }
  .product-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    padding: 28px;
  }
  /* Fichas más grandes y legibles en móvil */
  .product-emoji {
    font-size: 4.5rem;
    padding: 46px 0;
  }
  .product-name { font-size: 1.3rem; }
  .product-desc { font-size: 0.95rem; margin-bottom: 20px; }
  .product-price { font-size: 1.4rem; }
  .add-btn { padding: 12px 24px; font-size: 0.95rem; }

  /* Flechas del carrusel sobre los costados de la ficha */
  .slider-arrow {
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 12px rgba(26, 22, 97, 0.35);
  }
  .slider-arrow.prev { left: 6px; }
  .slider-arrow.next { right: 6px; }

  /* (3) Pasos de "Sobre nosotros": texto alineado a la izquierda y más compacto */
  .about-text p { font-size: 0.98rem; }
  .about-steps {
    display: inline-block;
    text-align: left;
  }
  .about-steps li {
    font-size: 0.92rem;
    text-align: left;
  }

  /* (4) Héroe volador centrado dentro de la tarjeta, sin salirse del encuadre */
  .hero-card { width: min(280px, 82%); }
  .hero-card img {
    width: 108%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .hero-card img:hover {
    transform: translate(-50%, -54%) rotate(-4deg) scale(1.04);
  }
}
