/* Estilo de la tienda: diseño limpio de retail (fondo blanco, acento naranja).
   La organización de secciones se inspira en tiendas de electrónica en línea;
   marca, textos e imágenes son de DistribuRed. */

:root {
  --acento: #000000;
  --acento-oscuro: #333333;
  --texto: #1f1f1f;
  --gris: #6b6b6b;
  --linea: #ececec;
  --fondo-suave: #f5f5f5;
  --blanco: #ffffff;
  --radio: 12px;
  --sombra: 0 2px 10px rgba(0, 0, 0, .06);
  --sombra-alta: 0 8px 24px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; margin: 0; }

/* El color naranja se reserva para estados hover de navegación. */
/* ---------- Cabecera ---------- */
.cabecera-tienda { position: relative; z-index: 60; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.fila-superior {
  display: flex; align-items: center; gap: 1.5rem; padding: .9rem 1.5rem;
  max-width: 1200px; margin: 0 auto; flex-wrap: nowrap;
}
.marca { font-size: 1.35rem; font-weight: 700; color: var(--acento); }
.marca:hover { color: var(--acento-oscuro); }
.buscador { flex: 1; min-width: 220px; }
.buscador input {
  width: 100%; padding: .65rem 1.1rem; font: inherit; color: var(--texto);
  background: var(--fondo-suave); border: 1px solid transparent; border-radius: 999px;
}
.buscador input:focus { outline: none; border-color: var(--acento); background: var(--blanco); }
.acciones { display: flex; gap: 1.2rem; align-items: center; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.accion:hover { color: #ff6900; }
.contador {
  display: inline-block; background: var(--acento); color: #fff; border-radius: 999px;
  padding: 0 .5rem; font-size: .75rem; font-weight: 600; margin-left: .2rem;
}

.menu-categorias {
  flex: 1; min-width: 0; display: flex; gap: 1.4rem; overflow-x: auto;
  padding: 0; margin: 0; justify-content: center;
}
.menu-categorias a {
  white-space: nowrap; font-size: .92rem; font-weight: 500; padding: .2rem 0;
  border-bottom: 2px solid transparent;
}
.menu-categorias a:hover { color: #ff6900; }
.menu-categorias a.activa { color: var(--acento); border-bottom-color: var(--acento); }

/* ---------- Contenedor ---------- */
.contenedor { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 1rem; }

/* ---------- Banner ---------- */
.banner {
  position: relative; border-radius: var(--radio); overflow: hidden; color: #fff;
  background: linear-gradient(120deg, #1f1f1f 0%, #3a3a3a 60%, #5b3a1e 100%);
  display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 2rem;
  padding: 3rem 3rem; min-height: 300px;
}
.banner h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin: .4rem 0 .8rem; }
.banner p { margin: .3rem 0; color: #e8e8e8; }
.etiqueta {
  display: inline-block; background: var(--acento); color: #fff; font-size: .78rem;
  font-weight: 600; border-radius: 999px; padding: .2rem .75rem;
}
.banner-lateral {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radio); padding: 1.5rem; text-align: center;
}
.banner-lateral .grande { font-size: 2.8rem; font-weight: 700; color: var(--acento); margin: 0; }

/* ---------- Beneficios ---------- */
.beneficios {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  padding: 0; margin: 1.5rem 0 2rem;
}
.pildora {
  background: var(--fondo-suave); border-radius: var(--radio); padding: .9rem 1rem;
  font-size: .9rem; font-weight: 500; text-align: center;
}

/* ---------- Categorías (fila de íconos) ---------- */
.mosaico {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; margin-bottom: 2.5rem;
}
.cat {
  display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center;
  font-size: .92rem; font-weight: 500; padding: .5rem;
}
.cat:hover { color: #ff6900; }
.cat-imagen {
  width: 96px; height: 96px; object-fit: cover; border-radius: 50%;
  background: var(--fondo-suave);
}
.cat-nombre { display: block; }
.cat-cuenta { display: none; }

/* ---------- Secciones de producto ---------- */
.seccion { margin-bottom: 3rem; }
.encabezado-seccion {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.encabezado-seccion h2 { font-size: 1.5rem; }
.encabezado-seccion span { font-size: .9rem; color: var(--gris); }

.rejilla {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.tarjeta {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1rem; display: flex; flex-direction: column; gap: .35rem;
  transition: box-shadow .2s ease, transform .2s ease;
}
.tarjeta:hover { box-shadow: var(--sombra-alta); transform: translateY(-2px); }
.tarjeta-imagen {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px;
  background: var(--fondo-suave); margin-bottom: .4rem;
}
.tarjeta .nombre { font-size: .98rem; font-weight: 500; line-height: 1.35; }
.tarjeta .marca { font-size: .8rem; color: var(--gris); }
.tarjeta .precio { font-size: 1.1rem; font-weight: 700; margin-top: auto; padding-top: .4rem; }
.tarjeta .boton { width: 100%; margin-top: .4rem; }

.pestanas { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pestanas button {
  background: var(--fondo-suave); border: 0; border-radius: 999px; padding: .4rem 1rem;
  font: inherit; font-size: .88rem; color: var(--texto); cursor: pointer;
}
.pestanas button.activa { background: var(--texto); color: #fff; }

.ver-todos { text-align: center; margin-top: 1.25rem; }

/* ---------- Botones ---------- */
.boton {
  display: inline-block; cursor: pointer; font: inherit; font-size: .95rem; font-weight: 600;
  color: #fff; background: var(--acento); border: 0; border-radius: 999px;
  padding: .6rem 1.4rem; transition: background .15s ease;
  text-align: center;
}
.boton:hover { background: var(--acento-oscuro); color: #fff; }
.boton:disabled { opacity: .5; cursor: not-allowed; }
.boton.secundario { background: var(--fondo-suave); color: var(--texto); }
.boton.secundario:hover { background: var(--linea); color: var(--texto); }

/* ---------- Tablas, formularios y avisos (carrito y confirmación) ---------- */
table { width: 100%; border-collapse: collapse; background: var(--blanco); }
th, td { text-align: left; padding: .8rem .75rem; border-bottom: 1px solid var(--linea); }
th { font-weight: 600; color: var(--gris); font-size: .85rem; }
tfoot th { color: var(--texto); font-size: .95rem; }

.campo { margin-bottom: .9rem; }
.campo label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .3rem; color: var(--gris); }
.campo input, .campo select {
  width: 100%; padding: .65rem .8rem; font: inherit; color: var(--texto);
  background: var(--blanco); border: 1px solid #d6d6d6; border-radius: 8px;
}
.campo input:focus, .campo select:focus { outline: none; border-color: var(--acento); }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }

.aviso {
  padding: .85rem 1rem; border-radius: var(--radio); margin: 1rem 0; font-size: .92rem;
}
.aviso.ok { background: #e9f8ef; color: #17693a; }
.aviso.mal { background: #fdecec; color: #a12a2a; }

/* ---------- Pie ---------- */
.pie-tienda {
  background: var(--fondo-suave); padding: 2.5rem 1.5rem 1.5rem; margin-top: 2rem;
}
.pie-columnas {
  max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.pie-columnas h3 { font-size: .95rem; margin-bottom: .7rem; }
.pie-columnas ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; font-size: .88rem; color: var(--gris); }
.pie-legal {
  max-width: 1200px; margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid #dedede;
  font-size: .82rem; color: var(--gris); text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .rejilla { grid-template-columns: repeat(3, 1fr); }
  .beneficios { grid-template-columns: repeat(2, 1fr); }
  .mosaico { grid-template-columns: repeat(3, 1fr); }
  .banner { grid-template-columns: 1fr; padding: 2rem; }
  .pie-columnas { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .rejilla { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .mosaico { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .cat-imagen { width: 64px; height: 64px; }
  .fila { grid-template-columns: 1fr; }
  .contenedor { padding: 1rem; }
}

/* ---------- Bloques de productos por categor�a ---------- */
.seccion-catalogo { margin-top: 1rem; }
.bloque-categoria { margin: 0 0 3.5rem; scroll-margin-top: 130px; }
.bloque-categoria.bloque-oculto { display: none; }
.titulo-bloque { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.titulo-bloque h2 { font-size: 1.55rem; }
.titulo-bloque span { color: var(--gris); font-size: .9rem; }
.producto-layout {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
}
.producto-bloque { min-width: 0; }
.producto-bloque.producto-destacado {
  grid-column: span 2; grid-row: span 2; display: grid;
  grid-template-columns: 1fr 1fr; align-items: center; gap: 1rem;
  min-height: 330px; padding: 1.5rem;
}
.producto-destacado .tarjeta-imagen { aspect-ratio: 1 / 1; margin: 0; }
.producto-info { display: flex; flex-direction: column; gap: .35rem; min-width: 0; height: 100%; }
.producto-destacado .producto-info { justify-content: space-between; }
.producto-destacado .nombre { font-size: 1.2rem; font-weight: 600; }
.producto-extra { display: none; }
.mostrar-todos .producto-extra { display: flex; }
.todos-productos {
  border: 0; background: #f1f3f8; color: var(--texto); min-height: 170px;
  align-items: center; justify-content: center; text-align: center; cursor: pointer;
  gap: .35rem;
}
.todos-productos strong { font-size: 1rem; }
.todos-productos span { color: var(--gris); font-size: .82rem; }
.todos-productos:hover { background: #e7eaf2; box-shadow: var(--sombra-alta); }
.producto-oculto { display: none !important; }

@media (max-width: 960px) {
  .producto-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .producto-bloque.producto-destacado { grid-column: span 2; }
}
@media (max-width: 640px) {
  .producto-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .producto-bloque.producto-destacado { grid-column: span 2; grid-row: auto; min-height: 260px; }
  .producto-destacado .nombre { font-size: 1rem; }
  .titulo-bloque h2 { font-size: 1.25rem; }
}

/* ---------- Slideshow principal ---------- */
.slideshow {
  width: 100vw; margin-left: calc(50% - 50vw); margin-top: -1.5rem; margin-bottom: 1.5rem;
  overflow: hidden; background: #eef1f4;
}
.slide {
  position: relative; width: 100%; aspect-ratio: 1920 / 620; min-height: 320px;
  overflow: hidden; background: #eef1f4;
}
.slide > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.slide-contenido {
  position: absolute; z-index: 1; left: clamp(1.5rem, 8vw, 8rem); top: 50%;
  transform: translateY(-50%); width: min(42%, 540px); color: #161616;
}
.slide-contenido h1 { font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.12; margin: .7rem 0; }
.slide-contenido p { max-width: 440px; margin: 0 0 1.25rem; color: #4d5358; }
.slide-controles {
  position: absolute; z-index: 2; inset: auto 1rem 1rem; display: flex;
  justify-content: center; align-items: center; gap: .8rem;
}
.slide-arrow {
  display: grid; place-items: center; width: 32px; height: 32px; border: 0;
  border-radius: 50%; background: #000; color: #fff; padding: 0; line-height: 1;
}
.slide-arrow svg { display: block; }
.slide-arrow:disabled { opacity: .5; cursor: default; }
.slide-progreso { display: flex; align-items: center; gap: .65rem; }
.slide-progreso .barra {
  display: block; width: 72px; height: 2px; background: rgba(0,0,0,.38); border-radius: 2px;
}
.slide-progreso .barra.activa { background: #000; height: 3px; }

@media (max-width: 640px) {
  .slideshow { width: 100vw; margin-left: calc(50% - 50vw); margin-top: -1rem; }
  .slide { aspect-ratio: 750 / 700; min-height: 430px; }
  .slide-contenido { left: 1.25rem; top: 1.5rem; transform: none; width: 52%; }
  .slide-contenido h1 { font-size: 1.65rem; }
  .slide-contenido p { font-size: .8rem; }
}

/* La cabecera queda ligera; el buscador vive debajo de las categor�as. */
.fila-superior { justify-content: space-between; }
.busqueda-catalogo { display: flex; justify-content: center; margin: 1.25rem 0 2rem; }
.buscador-catalogo { width: min(720px, 100%); flex: none; }

/* El slideshow se mantiene estrictamente monocrom�tico. */
.slide .etiqueta, .slide .boton { background: #000; color: #fff; }
.slide .indicador.activo { background: #000; }
.slide-controles button { background: #000; }

@media (max-width: 800px) {
  .fila-superior { flex-wrap: wrap; gap: .8rem; }
  .menu-categorias { order: 3; flex-basis: 100%; justify-content: flex-start; padding-top: .35rem; }
}

.icono-cabecera {
  display: grid; place-items: center; width: 34px; height: 34px; min-height: 0;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: #000;
}
.icono-cabecera:hover { background: #f2f2f2; color: #ff6900; }
.icono-cabecera svg { display: block; }

/* ---------- Controles del slideshow: solo �conos grises, sin c�rculos ---------- */
.slide-controles button.slide-arrow {
  background: transparent; color: #8a8a8a; width: auto; height: auto; padding: 4px;
  border-radius: 0; box-shadow: none;
}
.slide-controles button.slide-arrow:hover:not(:disabled) { color: #000; }
.slide-controles button.slide-arrow:disabled { opacity: .45; cursor: default; }
.slide-controles .slide-arrow svg { color: inherit; }
.slide-progreso .barra { background: rgba(0,0,0,.25); }
.slide-progreso .barra.activa { background: #8a8a8a; }

/* ---------- Panel de b�squeda deslizable ---------- */
.panel-busqueda {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: #fff; overflow: hidden;
  box-shadow: 0 18px 28px -12px rgba(0, 0, 0, .28), 0 6px 12px -6px rgba(0, 0, 0, .12);
}
.panel-busqueda[hidden] { display: none; }
.panel-interior {
  max-width: 1200px; margin: 0 auto; padding: 1.25rem 1.5rem 1.5rem;
  transform: translateY(-100%); transition: transform .28s ease;
}
.panel-busqueda.abierto .panel-interior { transform: translateY(0); }
.campo-busqueda {
  display: flex; align-items: center; gap: .75rem; max-width: 720px; margin: 0 auto;
  border: 1px solid #d6d6d6; border-radius: 999px; padding: .55rem 1rem; background: #fff;
}
.campo-busqueda:focus-within { border-color: #000; }
.campo-busqueda input {
  flex: 1; border: 0; outline: none; background: transparent; font: inherit;
  font-size: 1.05rem; color: #000; min-width: 0;
}
.campo-busqueda .lupa { display: grid; place-items: center; }
.cerrar-busqueda {
  display: grid; place-items: center; border: 0; background: transparent; padding: 4px;
  color: #8a8a8a; cursor: pointer; border-radius: 0;
}
.cerrar-busqueda:hover { color: #000; background: transparent; }
.enlaces-titulo {
  max-width: 720px; margin: 1.25rem auto .4rem; font-weight: 600; font-size: .9rem; color: #6b6b6b;
}
.enlaces-rapidos { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; }
.enlaces-rapidos li a {
  display: block; padding: .5rem 0; color: #555; font-size: 1rem; transition: color .12s ease;
}
.enlaces-rapidos li a:hover { color: #000; text-decoration: none; }

/* "Todos los productos" dentro del bloque: franja de ancho completo, con el
   mismo borde y radio que las tarjetas, en lugar de una tarjeta suelta. */
.producto-layout .todos-productos {
  grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between;
  min-height: 0; padding: .95rem 1.25rem; margin: 0; width: 100%;
  background: #f7f7f7; border: 1px solid var(--linea); border-radius: var(--radio);
  font: inherit; text-align: left; color: var(--texto); cursor: pointer;
  box-shadow: none; transform: none;
}
.producto-layout .todos-productos:hover { background: #efefef; box-shadow: none; transform: none; color: var(--texto); }
.producto-layout .todos-productos strong { font-size: 1rem; font-weight: 600; }
.producto-layout .todos-productos span { color: var(--gris); font-size: .88rem; white-space: nowrap; }
