/* ========= Google Fonts ========= */
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ========= Paleta ========= */
:root {
  --acento: #E95D66;
  --secundario: #23262E;
  --textogris: #a4a4a4;
  --fondoscuro: #ECEADE;
  --fondoscuro-borde: #D5D2CA;
  --fondoclaro: #FAF7F0;
  --lineas: #E2DFD6;
  --fondoclaro-borde: #D5D2CA;
  --blanco: #fff;
}

/* ========= Base ========= */
* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: 'Lexend Deca', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--secundario);
  background: var(--fondoclaro);
  /* fondo global */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--acento);
  text-decoration: none
}

a:hover {
  color: var(--acento);
  text-decoration: none
}

img {
  max-width: 100%;
  height: auto
}

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

/* ========= Navbar ========= */
.navbar {
  background: var(--acento);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

/* Estilos para iconos de flecha desplegable */
.dropdown-icon {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.3s ease;
  vertical-align: middle;
}

.nav-links button[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  margin-right: auto;
  /* Pushes content to the left */
}

.brand img {
  width: 200px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a,
.nav-links button {
  background-color: var (--acento);
  border-radius: 50px;
  padding: 10px 15px;
  color: var(--fondoclaro);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: background .3s ease;
}

/* Ocultar dropdowns móviles en desktop */
.mobile-dropdown {
  display: none;
}

.nav-dropdown {
  position: relative;
}

/* En desktop, los nav-dropdown-btn actúan como botones normales */
.nav-dropdown-btn {
  background-color: var (--acento);
  border-radius: 50px;
  padding: 10px 15px;
  color: var(--fondoclaro);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: background .3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover,
.nav-links button:hover,
.nav-dropdown-btn:hover {
  padding: 10px 15px;
  background-color: rgba(0, 0, 0, .06);
  border-radius: 50px;
  transition: background .3s ease;
}

.nav-cta {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--acento);
  color: #fff;
}

/* Burger menu button */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 50;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background: var(--fondoclaro);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger-menu[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger-menu[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 720px) {
  .burger-menu {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--acento);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    padding-top: 80px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 45;
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-dropdown {
    width: 90%;
    max-width: 300px;
  }

  .nav-dropdown-btn {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 1.2rem !important;
    padding: 15px 20px !important;
    background: none !important;
    border: none !important;
    color: var(--fondoclaro) !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: background 0.3s ease !important;
    gap: 0 !important;
  }

  .nav-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 15px 20px !important;
  }

  /* Mostrar dropdowns móviles solo en móvil */
  .mobile-dropdown {
    display: block !important;
  }

  .nav-dropdown {
    width: 90%;
    max-width: 300px;
  }

  .nav-dropdown-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    padding: 15px 20px;
    background: none;
    border: none;
    color: var(--fondoclaro);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s ease;
  }

  .nav-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-dropdown-btn .dropdown-icon {
    transition: transform 0.3s ease;
  }

  .nav-dropdown-btn[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
  }

  .mobile-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 5px;
  }

  .mobile-dropdown.active {
    max-height: 400px;
  }

  .mobile-dropdown-content {
    padding: 15px;
  }

  .mobile-dropdown-content h5 {
    color: var(--fondoclaro);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .mobile-dropdown-content a {
    display: block;
    color: var(--fondoclaro);
    text-decoration: none;
    padding: 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease;
  }

  .mobile-dropdown-content a:last-child {
    border-bottom: none;
  }

  .mobile-dropdown-content a:hover {
    color: rgba(255, 255, 255, 0.8);
  }

  .nav-links>a {
    font-size: 1.2rem;
    padding: 15px 20px;
    width: 90%;
    max-width: 300px;
    text-align: center;
    border-radius: 8px;
    transition: background 0.3s ease;
  }

  .nav-links>a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-wrap {
    justify-content: space-between;
  }

  /* Ocultar mega menús en móvil */
  .mega {
    display: none !important;
  }
}

/* ========= Mega/Jumbo Menu ========= */
.mega {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  background: var(--fondoclaro);
  border: 1px solid var(--lineas);
  border-top: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .06);
  display: none;
  padding: 18px;
  z-index: 50;
  width: auto;
  min-width: fit-content;
  max-width: calc(100vw - 40px);
}



.mega.open {
  display: block
}

.mega-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: fit-content(100%);
  width: fit-content;
}

.mega-cols {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
  width: fit-content;
}

/* Estilos específicos para cada mega-menú */
#mega-categorias .mega-cols {
  grid-template-columns: repeat(3, minmax(150px, max-content));
}

#mega-destinatario .mega-cols {
  grid-template-columns: repeat(2, minmax(180px, max-content));
}

#mega-ocasion .mega-cols {
  grid-template-columns: repeat(2, minmax(180px, max-content));
}

#mega-precios .mega-cols {
  grid-template-columns: minmax(180px, max-content);
}

#mega-sagas .mega-cols {
  grid-template-columns: repeat(2, minmax(180px, max-content));
}

/* Mega menu footer styles */
.mega-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  width: 100%;
}

.mega-separator {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 0 0 1rem 0;
}

.mega-view-all {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  color: var(--acento) !important;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mega-view-all:hover {
  background-color: rgba(255, 127, 127, 0.1) !important;
  border-radius: 50px;
  text-decoration: none;
}

/* Listados page - reutilizando estilos del footer */
.listados-header {
  text-align: center;
  margin: 2rem 0 3rem 0;
  padding: 2rem 0;
  border-bottom: 1px solid var(--lineas);
}

.listados-header h1 {
  font-size: 2.5rem;
  color: var(--secundario);
  margin-bottom: 0.5rem;
}

.listados-header p {
  font-size: 1.1rem;
  color: var(--texto);
  margin: 0;
}

/* Modificación del footer-grid para 4 columnas fijas */
.footer-grid.listados-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .footer-grid.listados-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-grid.listados-grid {
    grid-template-columns: 1fr;
  }

  .listados-header h1 {
    font-size: 2rem;
  }
}

.mega-col h5 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0
}

.mega-col li {
  margin: 1em 0
}

.mega-col a {
  margin: 10px 0 8px;
  padding: 8px 12px;
  color: var(--acento);
  text-decoration: none;
  display: inline;
  line-height: 1.4;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.mega-col a:hover {
  color: var(--acento);
  padding: 8px 12px;
  background-color: rgba(255, 127, 127, 0.1);
  border-radius: 50px;
  text-decoration: none;
}

.mega-banners {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.banner {
  position: relative;
  border: 1px solid var(--lineas);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.banner .frame {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  object-fit: cover;
}

.banner .cap {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .55) 90%);
  color: #fff;
  padding: 10px 12px;
  font-size: .95rem;
}

.banner strong {
  font-weight: 700
}

/* ========= Hero (buscador + tags) ========= */
.hero {
  background: var(--fondoclaro);
  text-align: center;
  padding: clamp(16px, 5vw, 40px) 16px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--secundario);
  line-height: 1.2;
  margin: 0;
}

.logo {
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: .3px;
  font-size: clamp(18px, 3vw, 22px);
}

.search-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto clamp(14px, 3vw, 24px);
  max-width: 720px;
  padding: 0 8px;
}

.search {
  width: min(640px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 4px solid var(--fondoclaro-borde);
  border-radius: 999px;
  padding: 10px 12px 10px 16px;
  transition: border-color 0.2s ease;
}

.search:focus-within {
  border-color: var(--acento);
}

.search input[type="search"] {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 6px 2px;
  color: var(--secundario);
}

.search button {
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--acento);
  color: #fff;
  cursor: pointer;
}

/* ========= Tags ========= */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 10px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--lineas);
  background: #fff;
  color: var(--secundario);
  text-decoration: none;
  font-size: .95rem;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}

.tag:hover {
  color: var(--acento);
  border-color: var(--acento);
}

.tag.active,
.tag--active {
  color: var(--acento);
  border-color: color-mix(in oklab, var(--acento), white 70%);
  background: color-mix(in oklab, var(--acento), white 92%)
}


/* semántica, por si quieres estilos distintos */
.tag--extra {
  display: none;
}

.tags.show-extra .tag--extra {
  display: inline-flex;
}

/* Botón + */
.tag--toggle {
  vertical-align: middle;
  width: 36px;
  height: 36px;
  font-weight: 700;
  font-size: 20px;
  background: var(--blanco);
  color: var(--acento);
}

.tag--toggle:hover {
  transform: none;
  background: var(--acento);
  color: var(--fondoclaro);
}

/* ========= Grid MOSAICO (sin gap) ========= */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0px;
  width: 100%;
}

.grid .item {
  flex: 0 0 300px;
  max-width: 300px;
}

.item {
  padding: 5px;
  /* solo padding interno */
  background: transparent;
}

.thumb {
  position: relative;
  /* para el badge */
  width: 100%;
  aspect-ratio: 1/1;
  /* formato cuadrado */
  background: #fff;
  display: grid;
  place-items: center;
  /* imagen centrada */
  padding: 12px;
  /* padding interno para las imágenes */
  overflow: hidden;
}

.thumb img {
  max-width: calc(80% - 24px);
  max-height: calc(80% - 24px);
  width: auto;
  height: 200px;
  object-fit: contain;
  object-position: center;
  /* contain para ver imagen completa */
  display: block;
  transition: transform 0.3s ease;
}

.thumb:hover img {
  transform: translateY(-8px);
}

/* Información del producto */
.item-info {
  padding: 12px 8px 8px 8px;
  text-align: center;
}

.item-info h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--secundario);
  text-transform: capitalize;
}

.item-info .price {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--acento);
  background: var(--fondoscuro);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--fondoscuro-borde);
}

/* Badge de producto destacado */
.badge-featured {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #fff;
  display: grid;
  place-items: center;
}

.badge-featured svg {
  color: var(--acento);
  width: 30px;
  height: 30px;
  display: block
}

.featured .badge-featured {
  display: grid;
}

/* por defecto, no se muestra si el item no es .featured */
.badge-featured {
  display: none;
}

/* Rango de precios en esquina superior izquierda */
.price-range-grid {
  background-color: var(--fondoclaro);
  border-radius: 50px;
  margin-top: 6px;
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 16px;
  color: var(--textogris);
  padding: 4px 10px;
  font-weight: 500;
  /* Animación slide desde arriba */
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Nombre de franquicia centrado en la parte inferior */
.franchise-name {
  margin-bottom: 15px;
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  font-size: 16px;
  color: var(--secundario);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  /* Animación slide desde abajo */
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animaciones hover en el contenedor item */
.item:hover .price-range-grid {
  transform: translateY(0);
  opacity: 1;
}

.item:hover .franchise-name {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========= Paginación ========= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 22px 16px 34px;
}

.pagination a,
.pagination span {
  min-width: 36px;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid var(--lineas);
  border-radius: 8px;
  color: var(--secundario);
  text-decoration: none;
  background: #fff;
}

.pagination .current {
  background: var(--acento);
  color: #fff;
  border-color: var(--acento);
}

.pagination .disabled {
  opacity: .45;
  pointer-events: none
}

.pagination .ellipsis {
  border: none;
  background: transparent;
  color: var(--text-light);
  pointer-events: none;
}

/* ========= Secciones SEO ========= */
.seo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.seo section {
  padding: 18px 0;
  border-top: 1px solid var(--lineas)
}

.seo h2 {
  margin: .2em 0 .5em;
  font-size: 1.6rem
}

.seo h3 {
  margin: 1em 0 .4em;
  font-size: 1.15rem
}

.seo p {
  margin: .6em 0
}

.seo ul {
  margin: .4em 0 .8em 1.2em
}

/* Sección de palabras clave SEO */
.seo-keywords-section {
  margin: 2.5rem 0;
  padding: 1.5rem;
}

.seo-keywords-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--secundario);
  font-weight: 700;
}

.seo-keywords-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.seo-keyword-tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--lineas);
  border-radius: 50px;
  color: var(--acento);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.seo-keyword-tag:hover {
  background-color: var(--acento);
  color: var(--blanco);
  border-color: var(--acento);
}

/* Texto SEO oculto visualmente pero disponible para motores de búsqueda */
.seo-hidden-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========= 404 Error Page Styles ========= */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.error-container {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.error-code {
  font-size: 8rem;
  font-weight: bold;
  color: var(--acento);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.error-page h1 {
  font-size: 2.5rem;
  color: var(--secundario);
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.2rem;
  color: var(--textogris);
  margin-bottom: 2rem;
}

.error-suggestions {
  margin: 2rem 0;
  text-align: left;
}

.error-suggestions h2 {
  color: var(--secundario);
  margin-bottom: 1rem;
  text-align: center;
}

.error-suggestions ul {
  list-style: none;
  padding: 0;
}

.error-suggestions li {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: var(--fondoclaro);
  border-radius: 5px;
  border-left: 3px solid var(--acento);
}

.error-suggestions a {
  color: var(--acento);
  text-decoration: none;
  font-weight: 500;
}

.error-suggestions a:hover {
  color: var(--acento);
  text-decoration: underline;
}

.search-section {
  margin: 2rem 0;
}

.search-section h3 {
  color: var(--secundario);
  margin-bottom: 1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.search-input {
  padding: 0.75rem;
  border: 2px solid var(--lineas);
  border-radius: 5px;
  font-size: 1rem;
  min-width: 250px;
  flex: 1;
  max-width: 300px;
}

.search-input:focus {
  outline: none;
  border-color: var(--acento);
}

.search-btn {
  padding: 0.75rem 1.5rem;
  background: var(--acento);
  color: var(--blanco);
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background: color-mix(in oklab, var(--acento), black 10%);
}

.popular-categories {
  margin: 2rem 0;
}

.popular-categories h3 {
  color: var(--secundario);
  margin-bottom: 1rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.category-card {
  display: block;
  padding: 1rem;
  background: var(--fondoclaro);
  border: 2px solid var(--lineas);
  border-radius: 8px;
  text-decoration: none;
  color: var(--secundario);
  font-weight: 500;
  transition: all 0.3s;
}

.category-card:hover {
  background: var(--acento);
  color: var(--blanco);
  border-color: var(--acento);
  transform: translateY(-2px);
}

.back-home-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: var(--acento);
  color: var(--blanco);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.back-home-btn:hover {
  background: color-mix(in oklab, var(--acento), black 10%);
  color: var(--blanco);
}

@media (max-width: 768px) {
  .error-code {
    font-size: 5rem;
  }

  .error-page h1 {
    font-size: 2rem;
    color: var(--secundario);
  }

  .search-input {
    min-width: 200px;
    border-color: var(--lineas);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* ========= Critical CSS (Above the fold) ========= */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.logo img {
  height: 40px;
}

.main-content {
  min-height: 50vh;
}

/* ========= Footer ========= */
footer {
  background: var(--secundario);
  border-top: 1px solid var(--lineas);
}

.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
  display: grid;
  gap: 24px;
}

.footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-col h3,
.footer-col h4 {
  color: var(--fondoscuro);
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0
}

.footer-col li {
  margin: .3em 0
}

.footer-col a {
  margin: 10px 0 8px;
  padding: 8px 12px;
  color: var(--acento);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--acento);
  padding: 8px 12px;
  background-color: rgba(255, 127, 127, 0.1);
  border-radius: 50px;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--lineas);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.legal {
  display: flex;
  gap: 14px;
  flex-wrap: wrap
}

/* === ESTILOS PARA FICHA DE PRODUCTO === */

/* Head de la ficha */
.product-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--fondoclaro);
  border-bottom: 1px solid var(--lineas);
  max-width: 1400px;
  margin: 0 auto;
}

/* Navegación superior de productos */
.product-navigation-top {
  display: flex;
  gap: 10px;
  align-items: center;
}

.product-navigation-top .nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--fondoscuro-borde);
  background: var(--blanco);
  color: var(--acento);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.product-navigation-top .nav-btn:hover {
  border-color: var(--acento);
  background: var(--acento);
  color: white;
}

.product-navigation-top .nav-btn svg {
  width: 20px;
  height: 20px;
}

.back-btn {
  color: var(--acento);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.2s;
}

.back-btn:hover {
  color: var(--secundario);
}

/* Layout principal del producto */
.product {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Columna izquierda */
.col-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.p-photo {
  margin: 0;
}

.p-photo .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 80px;
  overflow: hidden;
}

/* Cambios aquí */
.p-photo .frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.2s ease;
}

.p-photo .frame img {
  min-width: 0;
  /* <- clave en grid */
  min-height: 0;
  /* <- clave en grid */
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.2s ease;
}


/* Galería de thumbnails */
.p-gallery {
  margin: 1rem 0 0 0;
}

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.thumb-item {
  flex-shrink: 0;
  cursor: pointer;
}

.thumb-item .frame {
  position: relative;
  width: 80px;
  height: 80px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 6px;
  overflow: hidden;
  border: 2px solid var(--fondoscuro-borde);
  transition: all 0.2s ease;
}

.thumb-item .frame:hover {
  border-color: var(--acento);
}

.thumb-item.active .frame {
  border-color: var(--acento);
  border-width: 2px;
}

.thumb-item .frame img {
  min-width: 0;
  /* evita que grid fuerce tamaño mínimo */
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}


.p-description {
  padding: 2rem 0;
  line-height: 1.6;
}

.p-description h2 {
  color: var(--secundario);
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

.p-description h3 {
  color: var(--secundario);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem 0;
}

.p-description p {
  color: var(--secundario);
  margin: 0 0 1rem 0;
}

/* Columna derecha */
.col-right {
  height: fit-content;
}

.p-summary {
  padding: 0rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.p-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secundario);
  line-height: 1.2;
  margin: 0;
}

.p-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--acento);
}

/* Estilos para rango de precios */
.p-price-range {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-range {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secundario);
}

.price-disclaimer {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}

.price-disclaimer em {
  font-style: italic;
}

.p-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rating-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stars {
  display: flex;
  gap: 0.2rem;
  font-size: 1.2rem;
}

.stars .filled {
  color: #ffa500;
}

.stars span:not(.filled) {
  color: var(--lineas);
}

.rating-count {
  font-size: 0.9rem;
  color: var(--secundario);
}

.prime-badge {
  background: #00a8e1;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
}

.btn-amz {
  background: var(--acento);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-amz:hover {
  background: color-mix(in oklab, var(--acento), black 10%);
  transform: translateY(-1px);
  color: white;
}

/* Botón flotante móvil */
.btn-amz-mobile-float {
  display: none;
  /* Oculto por defecto */
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--acento);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(233, 93, 102, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
  max-width: calc(100vw - 40px);
  white-space: nowrap;
}

.btn-amz-mobile-float:hover {
  background: color-mix(in oklab, var(--acento), black 10%);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 25px rgba(233, 93, 102, 0.4);
  color: white;
}

/* Mostrar solo en móvil */
@media (max-width: 768px) {
  .btn-amz-mobile-float {
    display: flex;
  }

  /* Ocultar botón normal en móvil si se desea */
  .btn-amz {
    display: flex;
    /* Mantener visible también en móvil */
  }
}

.features h3 {
  margin: 0 0 1rem 0;
  color: var(--secundario);
  font-size: 1.1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--secundario);
}

.feature-list svg {
  color: var(--acento);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.p-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: var(--lineas);
  color: var(--secundario);
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* CTA inferior */
.cta-bottom {
  padding: 2rem 0;
  text-align: center;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--lineas);
}

.affiliate-disclaimer {
  font-size: 0.8rem;
  color: var(--secundario);
  text-align: left;
}

/* Breadcrumb eliminado - ya no se usa en la página de producto */
/*
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--secundario);
}

.breadcrumb a {
  color: var(--secundario);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--acento);
}

.breadcrumb-separator {
  color: var(--lineas);
}
*/

/* ========= Responsive ========= */
@media (max-width:768px) {
  .grid .item {
    flex: 0 0 440px;
    max-width: 440px;
  }

  .mega-grid {
    grid-template-columns: 1fr;
  }

  .mega-banners {
    grid-template-columns: 1fr;
  }

  .product-head {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .product {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
  }

  .col-right {
    position: static;
  }

  .p-title {
    font-size: 1.5rem;
  }

  .p-price {
    font-size: 2rem;
  }

  .seo-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
  }
}

/* Sección SEO */
.seo {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.seo section {
  margin-bottom: 2rem;
}

.seo h2 {
  color: var(--secundario);
  font-size: 1.8rem;
  margin: 0 0 1rem 0;
}

.seo p {
  color: var(--secundario);
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.seo-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.seo-col h4 {
  color: var(--secundario);
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
}

/* Títulos h4 específicos para contenido de página */
.seo-content h4 {
  color: var(--secundario);
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
}

.seo-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.seo-col li {
  margin: 0 0 0.5rem 0;
}

.footer-col a {
  margin: 10px 0 8px;
  padding: 8px 12px;
  color: var(--acento);
  text-decoration: none;
  display: inline;
  line-height: 1.4;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.footer-col a:hover {
  color: var(--acento);
  background-color: rgba(255, 127, 127, 0.1);
  border-radius: 50px;
  text-decoration: none;
}

/* === MODAL DE IMAGEN — FIX COMPLETO === */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  /* 100vh -> 100dvh para móviles */
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
  overflow: hidden;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  /* margen interior del overlay */
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.modal-content {
  position: relative;
  box-sizing: border-box;
  display: flex;
  /* centra la imagen y respeta min-size */
  align-items: center;
  justify-content: center;

  /* El contenedor NUNCA supera la pantalla */
  max-width: 100%;
  max-height: 100%;

  /* Tamaño “ideal”: usa el lado más pequeño de la ventana */
  width: min(92vmin, 1200px);
  height: min(92vmin, 100dvh - 32px);
  /* resta el padding del overlay */

  background: white;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 5%;
  /* margen interior del marco */
  gap: 0;
  /* sin gaps que afecten al layout */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.3s ease-out;

  /* CRÍTICO en flex para que el hijo pueda encoger */
  min-width: 0;
  min-height: 0;
}

#modalImage {
  /* El truco: ocupa el contenedor y se "contain" */
  width: 100%;
  height: 100%;
  min-width: 0;
  /* evita overflow en flex */
  min-height: 0;
  object-fit: contain;
  /* SIEMPRE completa y centrada */
  object-position: center;
  display: block;
  border-radius: 8px;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  color: rgb(0, 0, 0);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  border: none;
  line-height: 1;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  z-index: 10001;
  opacity: 0.8;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.7);
  opacity: 1;
}

.modal-nav-prev {
  left: 20px;
}

.modal-nav-next {
  right: 20px;
}

.modal-nav svg {
  width: 24px;
  height: 24px;
}

/* Botón cerrar un pelín más pequeño en pantallas estrechas */
@media (max-width: 480px) {
  .close-modal {
    width: 35px;
    height: 35px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }

  .modal-nav {
    width: 40px;
    height: 40px;
  }

  .modal-nav-prev {
    left: 10px;
  }

  .modal-nav-next {
    right: 10px;
  }

  .modal-nav svg {
    width: 20px;
    height: 20px;
  }
}

/* ========= Navegación flotante entre productos ========= */
/* Navegación flotante eliminada - ahora está en la parte superior */

/* Responsivo para navegación superior */
@media (max-width: 768px) {
  .product-head {
    padding: 0.8rem 1rem;
  }

  .product-navigation-top .nav-btn {
    width: 36px;
    height: 36px;
  }

  .product-navigation-top .nav-btn svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .product-head {
    padding: 0.6rem 0.8rem;
  }

  .product-navigation-top {
    gap: 8px;
  }

  .product-navigation-top .nav-btn {
    width: 32px;
    height: 32px;
  }

  .product-navigation-top .nav-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Responsive para modal */
@media (max-width: 768px) {
  .image-modal.show {
    padding: 10px;
  }

  .modal-content {
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 15px;
  }

  .close-modal {
    width: 30px;
    height: 30px;
    font-size: 24px;
  }

  #modalImage {
    max-width: calc(100vw - 50px);
    max-height: calc(100vh - 50px);
  }
}

/* ========= PÁGINA SOBRE NOSOTROS ========= */
.about-hero {
  background: var(--acento);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
}

.about-container {
  max-width: 800px;
  margin: 0 auto;
}

.about-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.about-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-content {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 1rem;
  line-height: 1.8;
}

.about-content h2 {
  color: var(--acento);
  font-size: 2rem;
  margin: 3rem 0 1.5rem;
  font-weight: 600;
  text-align: center;
}

.about-content h3 {
  color: var(--secundario);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  font-weight: 600;
}

.about-content p {
  margin-bottom: 1.5rem;
  color: var(--secundario);
  font-size: 1.1rem;
}

.about-content strong {
  font-weight: 600;
  color: var(--acento);
}

/* Cajas destacadas */
.highlight-section {
  border: 1px solid var(--fondoclaro-borde);
  color: var(--secundario);
  padding: 2.5rem;
  border-radius: 16px;
  margin: 3rem 0;
  text-align: center;
}

.highlight-section h3 {
  color: var(--secundario);
  margin-top: 0;
  font-size: 1.8rem;
}

.highlight-section p {
  color: var(--secundario);
  opacity: 0.95;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.info-card {
  border: 1px solid var(--lineas);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}

.info-card h4 {
  color: var(--acento);
  font-size: 1.3rem;
  margin: 0 0 1rem;
  font-weight: 600;
}

.info-card p {
  margin-bottom: 0;
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb a {
  color: #666;
  transition: color 0.2s;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--acento);
}

.breadcrumb-separator {
  color: var(--lineas);
}

.cta-section {
  background: var(--fondoscuro);
  padding: 3rem 2rem;
  border-radius: 16px;
  text-align: center;
  margin: 4rem 0;
}

.cta-section h3 {
  color: var(--acento);
  margin-top: 0;
  font-size: 1.8rem;
}

.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 1rem 2.5rem;
  background: var(--acento);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: color-mix(in oklab, var(--acento), black 10%);
  color: var(--blanco);
}

/* Responsive para página Sobre Nosotros */
@media (max-width: 768px) {
  .about-title {
    font-size: 2.2rem;
  }

  .about-subtitle {
    font-size: 1.1rem;
  }

  .about-content {
    margin: 2.5rem auto;
  }

  .about-content h2 {
    font-size: 1.7rem;
  }

  .about-content h3 {
    font-size: 1.3rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .highlight-section,
  .cta-section {
    padding: 2rem 1.5rem;
  }

  .info-card {
    padding: 1.5rem;
  }
}
