/* ============================================================
   HURRA HÉROES — DESIGN SYSTEM UNIFICADO
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:ital,wght@0,400;0,700;0,800;0,900;1,400&family=Nunito+Sans:wght@400;700&display=swap');

:root {
  /* PALETA HURRA HÉROES */
  --color-primary:          #e8844a;   /* Naranja coral */
  --color-primary-dark:      #d4703a;
  --color-primary-xlight:    #fdf0e6;
  --color-secondary:         #f7c948;   /* Amarillo estrellas */
  --color-accent-green:      #5db87a;
  --color-accent-pink:       #ff6b9d;
  
  /* NEUTROS */
  --color-white:             #ffffff;
  --color-off-white:         #fffdf9;
  --color-bg-warm:           #faf7f4;
  --color-bg-light:          #f7f3ee;
  --color-gray-200:          #e8e0d8;
  --color-gray-700:          #4a3f38;
  --color-gray-900:          #2c2420;

  /* TIPOGRAFÍA */
  --font-display:  'Fredoka One', cursive;
  --font-heading:  'Nunito', sans-serif;
  --font-body:     'Nunito', sans-serif;
  --font-ui:       'Nunito Sans', sans-serif;

  /* RADIOS Y SOMBRAS */
  --radius-xl:     24px;
  --radius-full:   9999px;
  --shadow-lg:     0 8px 32px rgba(44, 36, 32, 0.12);
  --navbar-height: 68px;
}

/* RESET BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background-color: var(--color-off-white);
  color: var(--color-gray-700);
  line-height: 1.6;
}

/* ── NAVEGACIÓN ── */
.top-bar {
  background: var(--color-bg-light);
  text-align: center;
  font-size: 12px;
  color: #888;
  padding: 8px 0;
}

.navbar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  height: var(--navbar-height);
  padding: 0 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 40px; height: 40px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.logo-text .lt1 { font-family: var(--font-heading); font-size: 17px; font-weight: 800; color: var(--color-gray-900); display: block; line-height: 1.2; }
.logo-text .lt2 { font-family: var(--font-ui); font-size: 10px; font-weight: 700; color: var(--color-primary); text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; list-style: none; gap: 24px; margin-left: 40px; height: 100%; }
.nav-link { font-weight: 700; color: var(--color-gray-900); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-link:hover { color: var(--color-primary); }

/* ── CONTENIDO PRINCIPAL ── */
.container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; text-align: center; }
.badge-main {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
h1 { font-family: var(--font-display); font-size: 3rem; color: var(--color-gray-900); margin: 20px 0; }
.promo-text { max-width: 750px; margin: 0 auto 50px; font-size: 1.1rem; color: var(--color-gray-700); }

/* ── PRODUCTOS ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.product-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 25px;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--color-gray-200);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-image { width: 100%; border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; background: var(--color-bg-light); }
.product-tag { background: #00bcd4; color: white; padding: 5px 12px; font-size: 11px; border-radius: 6px; display: inline-block; margin: 15px 0; font-weight: 800; }
.stars { color: var(--color-secondary); font-size: 14px; margin-bottom: 10px; }

.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.price-val { font-family: var(--font-ui); font-weight: 900; font-size: 1.4rem; color: var(--color-gray-900); }

/* BOTONES */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 800;
  transition: 0.2s;
  border: none;
  display: inline-block;
}
.btn-primary:hover { background: var(--color-primary-dark); transform: scale(1.05); }

/* ── SERVICIOS ── */
.servicios-container { display: flex; flex-wrap: wrap; gap: 30px; max-width: 1200px; margin: 60px auto; padding: 0 20px; }
.columna { flex: 1; min-width: 280px; text-align: center; }
.columna img { width: 100%; border-radius: 20px; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 20px; }
.columna h3 { font-family: var(--font-heading); font-weight: 900; margin-bottom: 10px; color: var(--color-gray-900); }

/* ── FOOTER ── */
footer { background: var(--color-bg-light); padding: 80px 20px 40px; border-top: 1px solid var(--color-gray-200); }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-col h4 { font-weight: 800; margin-bottom: 20px; color: var(--color-gray-900); }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 12px; font-size: 14px; color: var(--color-gray-700); cursor: pointer; }

.social-bar { text-align: center; padding-top: 40px; border-top: 1px solid var(--color-gray-200); margin-top: 50px; }
.social-bar i { font-size: 1.8rem; margin: 0 15px; color: var(--color-gray-900); transition: 0.2s; }
.social-bar i:hover { color: var(--color-primary); }

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .nav-menu { display: none; }
}

/* ============================================================
   ELEMENTOS DE CABECERA Y MENÚ RESPONSIVO (DRAWER Y MEGA MENÚ)
   ============================================================ */

.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-link { display: flex; align-items: center; gap: 4px; padding: 0 14px; height: 100%; }
.nav-link .arr { font-size: 9px; color: #bbb; transition: transform 0.2s; }
.nav-item:hover .arr { transform: rotate(180deg); color: var(--color-primary); }

/* MEGA DROPDOWN */
.mega {
  display: none;
  position: absolute;
  top: var(--navbar-height);
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-top: 3px solid var(--color-primary);
  box-shadow: var(--shadow-lg);
  min-width: 680px;
  z-index: 999;
}
.nav-item:hover .mega { display: flex; }

.mega-sidebar {
  width: 190px;
  background: var(--color-bg-warm);
  border-right: 1px solid var(--color-gray-200);
  padding: 8px 0;
  flex-shrink: 0;
}
.si {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-900);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.si:hover, .si.active {
  background: var(--color-white);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
}
.si .ch { font-size: 11px; color: #ccc; }

.mega-content { flex: 1; padding: 22px 26px; }
.mega-content h4 {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  color: #bbb;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* PRODUCT GRID INSIDE MEGA */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pgrid-2col { grid-template-columns: repeat(2, 1fr); }
.pcard { cursor: pointer; display: block; text-decoration: none; }
.pcard:hover .pimg { border-color: var(--color-primary); }
.pimg {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  background: var(--color-primary-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
}
.pph .ico { font-size: 38px; }
.pph .lbl {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  color: #c9845a;
  text-align: center;
  padding: 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pname {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-top: 7px;
  line-height: 1.3;
}
.pprice {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 800;
  margin-top: 2px;
}
.pprice-free { color: var(--color-accent-green); }

/* NAVBAR RIGHT */
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gray-900);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--color-primary-xlight); color: var(--color-primary); }

/* CARRITO */
.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gray-900);
}
.cart-btn:hover { background: var(--color-primary-xlight); color: var(--color-primary); }
.cart-ico { font-size: 22px; line-height: 1; }
.cart-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA BUTTON */
.btn-cta {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 9px 18px;
  border-radius: 25px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--color-primary-dark); }

/* ── HAMBURGER (MOBILE) ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2.5px;
  background: var(--color-gray-900);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* CARRITO MOBILE */
.cart-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
}
.cart-mobile-ico { font-size: 30px; line-height: 1; }
.cart-mobile-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 900;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── DRAWER (MOBILE NAV) ── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 32, 0.45);
  z-index: 1200;
  opacity: 0;
  transition: opacity 0.25s;
}
.drawer-overlay.open { display: block; opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  max-width: 85vw;
  height: 100%;
  background: var(--color-white);
  z-index: 1300;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 30px rgba(0,0,0,0.13);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-gray-200);
}
.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #888;
  line-height: 1;
  transition: color 0.15s;
}
.drawer-close:hover { color: var(--color-gray-900); }

.drawer-nav { flex: 1; overflow-y: auto; }

.ditem { border-bottom: 1px solid #f2ede7; }
.dlink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  color: var(--color-gray-900);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.dlink:hover { background: var(--color-primary-xlight); color: var(--color-primary); }
.dlink .dch { font-size: 12px; color: #ccc; transition: transform 0.2s; }
.dlink.open .dch { transform: rotate(90deg); color: var(--color-primary); }

.dsub { display: none; background: var(--color-bg-warm); border-top: 1px solid #f2ede7; }
.dsub.open { display: block; }
.dsub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 32px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  border-bottom: 1px solid #f2ede7;
  transition: color 0.15s;
}
.dsub-link:last-child { border-bottom: none; }
.dsub-link:hover { color: var(--color-primary); }
.dsub-link::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5c49a;
  flex-shrink: 0;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--color-gray-200);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-footer .btn-cta { text-align: center; font-size: 14px; padding: 13px; border-radius: 30px; width: 100%; }
.btn-secondary {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gray-700);
  padding: 10px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: 30px;
  background: none;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ── RESPONSIVE ADAPTATIONS FOR HEADER ── */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    justify-content: space-between;
  }
  .hamburger { display: flex; }
  .cart-mobile { display: flex; }
  .nav-right { display: none !important; }
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-right: 0;
  }
  .top-bar { font-size: 10px; padding: 6px 12px; }
}

/* ── ELEMENTOS ESPECÍFICOS DE LANDING ── */
.hero-title { margin-top: 40px; }
.hero-banner-container {
  background-color: #f2ede7; /* Gris/arena claro de la marca */
  width: 100%;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.hero-banner-img {
  width: 100%;
  height: auto;
  max-width: 1200px;
  object-fit: cover;
}
.copyright { text-align: center; font-size: 0.75rem; opacity: 0.7; }
.payment-methods { display: flex; justify-content: center; gap: 15px; font-size: 2rem; color: var(--color-gray-700); }
.footer-col a { color: inherit; text-decoration: none; display: block; }
.footer-col a:hover { text-decoration: underline; }
.logo-img { height: 48px; width: auto; display: block; }

/* ============================================================
   ESTILOS DE LA PÁGINA DE LIBRO (SLIDER Y ACORDEÓN DE COMPRA)
   ============================================================ */

.slider-section { text-align: center; margin-bottom: 40px; margin-top: 20px; }
.main-slider-container { position: relative; max-width: 720px; margin: 0 auto; }
#main-display { width: 100%; max-width: 720px; height: auto; aspect-ratio: 720/540; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow-lg); }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8); border: none; cursor: pointer; padding: 10px 15px; font-size: 20px; border-radius: 50%; z-index: 10; transition: background 0.2s; }
.nav-arrow:hover { background: var(--color-primary-xlight); }
.prev-arrow { left: 10px; }
.next-arrow { right: 10px; }
.thumbnails-row { display: flex; justify-content: center; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.thumb { width: 80px; height: 60px; cursor: pointer; border: 2px solid transparent; border-radius: 4px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--color-primary); }

.info-section { text-align: center; padding: 20px; }
.description-text { line-height: 1.6; color: var(--color-gray-700); max-width: 700px; margin: 20px auto; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 600px; margin: 20px auto; border-top: 1px solid var(--color-gray-200); border-bottom: 1px solid var(--color-gray-200); padding: 20px 0; font-size: 14px; }
.price { font-size: 22px; font-weight: bold; margin: 20px 0; color: var(--color-gray-900); }

.btn-cta-page { 
    background: none; 
    border: none; 
    color: var(--color-primary); 
    font-size: 18px; 
    font-weight: bold; 
    text-decoration: underline; 
    cursor: pointer; 
    padding: 10px;
}
.btn-cta-page:hover {
    color: var(--color-primary-dark);
}

.builder-section { max-width: 800px; margin: 40px auto; padding-bottom: 50px; }
.step {
  background: transparent;
  margin-bottom: 0;
  box-shadow: none;
  overflow: hidden;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--color-gray-200);
}
.step:last-of-type {
  border-bottom: 1px solid var(--color-gray-200);
}
.step-header {
  padding: 22px 10px;
  font-size: 1.4em;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  user-select: none;
  color: var(--color-gray-900);
  background-color: transparent;
  border-bottom: none;
  transition: color 0.2s;
}
.step-header:hover {
  color: var(--color-primary);
}
.step-content {
  padding: 20px 10px 40px 10px;
  display: none;
  text-align: center;
}
.step.active .step-content { display: block; }
.step.minimized .step-header { background-color: transparent; color: var(--color-gray-700); }

.btn-container { display: flex; justify-content: center; width: 100%; margin-top: 20px; }
.btn-accent { padding: 15px 40px; border: none; cursor: pointer; border-radius: 25px; font-weight: bold; background: var(--color-primary); color: white; font-size: 16px; transition: background 0.2s, transform 0.2s; }
.btn-accent:hover { background: var(--color-primary-dark); transform: scale(1.02); }

#preview-section {
  margin-top: 40px;
  padding: 40px 10px;
  text-align: center;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--color-gray-200);
}

/* ============================================================
   ESTILOS DE LOS EDITORES DE PERSONAJES (NIÑO/NIÑA Y PAPÁ)
   ============================================================ */

/* Editores con ancho idéntico */
.builder-wrapper {
  max-width: 580px;
  width: 100%;
  margin: 30px auto;
  padding: 20px 0;
  background: transparent;
}

/* Sección de selección previa para los niños */
.gender-selector-zone {
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 20px;
  text-align: center;
}
.gender-selector-zone h2 {
  font-size: 24px;
  color: var(--color-gray-900);
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-weight: 800;
}
.gender-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: bold;
  color: var(--color-gray-700);
}
.name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--color-gray-700);
}
.name-input {
  padding: 8px 15px;
  font-size: 16px;
  border: 2px solid var(--color-gray-200);
  border-radius: 8px;
  outline: none;
  width: 200px;
  font-family: var(--font-body);
  color: var(--color-gray-900);
  transition: border-color 0.2s;
}
.name-input:focus {
  border-color: var(--color-primary);
}

/* Área de contenedores superpuestos */
.kids-container-stack {
  position: relative;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}
.kids-container-stack .builder-wrapper {
  margin: 0 auto;
}

/* Clases auxiliares para alternar visibilidad */
.hidden-editor {
  display: none !important;
}

/* --- TABS SUPERIORES --- */
.header-grey-bar {
  background-color: var(--color-bg-light);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  border: 1px solid var(--color-gray-200);
}
.tabs-container {
  display: flex;
  gap: 15px;
}
.tab-icon {
  width: 60px;
  height: 60px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: transform 0.2s, border-color 0.2s;
}
.tab-icon.active {
  border-color: var(--color-primary);
  transform: scale(1.1);
}
.tab-icon img {
  width: 43px;
  height: 42px;
}

/* --- AVATAR PREVIEWS --- */
.preview-area {
  text-align: center;
  margin-bottom: 30px;
}
.avatar-preview {
  width: 292px;
  height: 252px;
  position: relative;
  margin: 0 auto;
}

/* Tamaño niños y niñas (185x184px) */
.avatar-preview-nino,
.avatar-preview-nina {
  width: 185px;
  height: 184px;
  position: relative;
  margin: 0 auto;
}

.avatar-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- CONTENEDOR DE OPCIONES --- */
.options-container {
  background-color: var(--color-bg-light);
  padding: 25px;
  border-radius: 12px;
  margin-top: 20px;
  border: 1px solid var(--color-gray-200);
}
.category-content {
  display: none;
}
.category-content.active {
  display: block;
}

.options-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.options-grid:last-child {
  margin-bottom: 0;
}
.option-btn {
  cursor: pointer;
  transition: transform 0.2s;
  border: none;
  background: none;
  padding: 0;
}
.option-btn:hover {
  transform: scale(1.08);
}
.option-btn img {
  width: 43px;
  height: 43px;
  display: block;
}

/* ============================================================
   ESTILOS DEL LIBRO 3D (VOLTEO DE PÁGINAS)
   ============================================================ */
:root {
    --ancho-pag: 520px;
    --alto-pag: 390px;
}

@media (max-width: 1120px) {
  :root {
    --ancho-pag: 420px;
    --alto-pag: 315px;
  }
}
@media (max-width: 900px) {
  :root {
    --ancho-pag: 340px;
    --alto-pag: 255px;
  }
}
@media (max-width: 768px) {
  :root {
    --ancho-pag: 280px;
    --alto-pag: 210px;
  }
}
@media (max-width: 600px) {
  :root {
    --ancho-pag: 175px;
    --alto-pag: 131px;
  }
}

.book-wrapper {
    position: relative;
    width: calc(var(--ancho-pag) * 2);
    height: var(--alto-pag);
    perspective: 2000px;
    margin: 40px auto;
}

.leaf {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--ancho-pag);
    height: 100%;
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform-style: preserve-3d;
    z-index: 1;
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: white;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.1);
    cursor: pointer;
    user-select: none;
}

.page img { width: 100%; height: 100%; object-fit: cover; }
.back { transform: rotateY(180deg); }
.leaf.flipped { transform: rotateY(-180deg); }

/* Insignias de confianza (Trust Badges) */
.trust-badges-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 40px auto 10px;
  max-width: 680px;
  flex-wrap: wrap;
}
.badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-gray-700);
}
.badge-icon {
  font-size: 22px;
}

/* ============================================================
   ESTILOS DE LA PÁGINA DEL CARRITO (carrito.html)
   ============================================================ */
.cart-page-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: left;
}

.cart-left-column {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.cart-right-column {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.cart-items-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(44, 36, 32, 0.04);
}

.cart-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.cart-title-row h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--color-gray-900);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--color-bg-light);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.cart-item-img {
  width: 90px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--color-gray-200);
  background: var(--color-bg-light);
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 4px;
}

.cart-item-meta {
  font-size: 13px;
  color: var(--color-gray-700);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cart-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.quantity-picker {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--color-gray-200);
  border-radius: 30px;
  background: var(--color-white);
  overflow: hidden;
  height: 38px;
}

.qty-btn {
  background: none;
  border: none;
  width: 32px;
  height: 100%;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-gray-700);
  transition: background 0.15s;
}
.qty-btn:hover {
  background: var(--color-bg-light);
  color: var(--color-primary);
}

.qty-input {
  width: 36px;
  text-align: center;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-900);
  background: transparent;
  outline: none;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-price {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-gray-900);
  min-width: 90px;
  text-align: right;
}

.remove-item-btn {
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.remove-item-btn:hover {
  color: var(--color-accent-pink);
}

/* CROSS SELL SECTION */
.cross-sell-card {
  background: var(--color-primary-xlight);
  border: 1px dashed var(--color-primary);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.cross-sell-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cross-sell-icon {
  font-size: 30px;
}

.cross-sell-text h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 2px;
}

.cross-sell-text p {
  font-size: 13px;
  color: var(--color-gray-700);
}

.cross-sell-action {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cross-sell-price {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 800;
  color: var(--color-gray-900);
}

.btn-add-add-on {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-add-add-on:hover {
  background: var(--color-primary-dark);
}

.btn-add-add-on.added {
  background: var(--color-accent-green);
}

/* SUMMARY CARD */
.summary-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(44, 36, 32, 0.04);
  position: sticky;
  top: calc(var(--navbar-height) + 20px);
}

.summary-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14.5px;
  color: var(--color-gray-700);
}

.summary-row.discount-row {
  color: var(--color-accent-green);
  font-weight: 700;
}

.summary-row.total-row {
  border-top: 1px solid var(--color-gray-200);
  padding-top: 15px;
  margin-top: 15px;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 24px;
}

.coupon-container {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.coupon-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 13.5px;
  border: 2px solid var(--color-gray-200);
  border-radius: 8px;
  outline: none;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  text-transform: uppercase;
}
.coupon-input:focus {
  border-color: var(--color-primary);
}

.btn-coupon {
  padding: 10px 16px;
  background: var(--color-bg-light);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-gray-700);
}
.btn-coupon:hover {
  background: var(--color-primary-xlight);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.coupon-msg {
  font-size: 12px;
  margin-top: -15px;
  margin-bottom: 15px;
  font-weight: 700;
}
.coupon-msg.success { color: var(--color-accent-green); }
.coupon-msg.error { color: var(--color-accent-pink); }

.btn-checkout {
  width: 100%;
  padding: 15px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-align: center;
  box-shadow: 0 4px 12px rgba(232, 132, 74, 0.2);
}
.btn-checkout:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.cart-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-gray-700);
  margin-top: 15px;
  text-align: center;
}

/* EMPTY VIEW */
.empty-cart-container {
  max-width: 600px;
  margin: 80px auto;
  text-align: center;
  padding: 0 20px;
}

.empty-cart-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.empty-cart-container h2 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--color-gray-900);
  margin-bottom: 12px;
}

.empty-cart-container p {
  color: var(--color-gray-700);
  font-size: 16px;
  margin-bottom: 30px;
}

/* RESPONSIVE CARRITO */
@media (max-width: 860px) {
  .cart-page-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .summary-card {
    position: static;
  }
}

@media (max-width: 480px) {
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cart-item-img {
    width: 100%;
    height: 140px;
  }
  .cart-item-actions {
    width: 100%;
    justify-content: space-between;
  }
  .cart-item-price {
    min-width: auto;
  }
}

/* ============================================================
   ESTILOS DE LA PÁGINA DE CHECKOUT (checkout.html)
   ============================================================ */
.checkout-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkout-header .back-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-700);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.checkout-header .back-link:hover {
  color: var(--color-primary);
}

.checkout-page-container {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 30px;
  max-width: 1100px;
  margin: 30px auto 60px;
  padding: 0 20px;
  text-align: left;
}

.checkout-left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkout-right-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkout-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(44, 36, 32, 0.03);
}

.checkout-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  color: var(--color-gray-900);
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 8px;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group:last-of-type {
  margin-bottom: 0;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--color-gray-900);
}

.form-group input,
.form-group select {
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  border: 2px solid var(--color-gray-200);
  border-radius: 8px;
  outline: none;
  background: var(--color-white);
  color: var(--color-gray-900);
  transition: border-color 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--color-primary);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkout-checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-gray-700);
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

.checkout-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.billing-form-wrapper {
  margin-top: 15px;
  border-top: 1px dashed var(--color-gray-200);
  padding-top: 15px;
}

/* CARRIERS & PAYMENT SELECTION CARDS */
.selectable-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--color-gray-200);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--color-white);
  user-select: none;
}
.selectable-card:last-child {
  margin-bottom: 0;
}

.selectable-card:hover {
  border-color: #f5c49a;
  background: var(--color-bg-warm);
}

.selectable-card.active {
  border-color: var(--color-primary);
  background: var(--color-primary-xlight);
}

.selectable-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selectable-card-left input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.selectable-card-label {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--color-gray-900);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selectable-card-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-gray-700);
}

.badge-best-choice {
  background: var(--color-accent-green);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

.selectable-card-price {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 800;
  color: var(--color-gray-900);
}

.selectable-card-price.free {
  color: var(--color-accent-green);
}

.payment-logos {
  display: flex;
  gap: 6px;
  align-items: center;
}
.payment-logos img {
  height: 22px;
  object-fit: contain;
}

/* SIDEBAR SUMMARY CHECKOUT */
.checkout-summary-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(44, 36, 32, 0.03);
}

.checkout-summary-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-gray-900);
  margin-bottom: 15px;
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 10px;
}

.checkout-item-row {
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--color-bg-light);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.checkout-item-img {
  width: 65px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--color-gray-200);
}

.checkout-item-details {
  flex: 1;
}

.checkout-item-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1.3;
}

.checkout-item-meta {
  font-size: 11px;
  color: var(--color-gray-700);
  margin-top: 2px;
}

.checkout-item-price {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--color-gray-900);
}

/* RESPONSIVE CHECKOUT */
@media (max-width: 860px) {
  .checkout-page-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}