/* ============================
   Fuentes
   ============================ */
@font-face {
  font-family: "Chewy";
  src: url("../fuentes/Chewy-Regular.ttf");
}
@font-face {
  font-family: "titan_one";
  src: url("../fuentes/TitanOne-Regular.ttf");
}

/* ============================
   Reset básico
   ============================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: #fffdf8;
  color: #333333;
}

/* ============================
   Tipografía global
   ============================ */
h1,
h2,
h3 {
  font-family: "titan_one", "Chewy", system-ui, sans-serif;
  letter-spacing: 0.03em;
}

p,
li {
  font-size: 0.98rem;
}

/* ============================
   Header y navegación
   ============================ */
header {
  background-color: #30618c;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.caja_logo {
  padding: 0.3rem 0.7rem;
}

.logo {
  max-height: 80px;
  width: auto;
}

.navbar {
  background-color: transparent !important;
}

.navbar .nav-link,
.navbar .dropdown-item {
  font-weight: 500;
}

.navbar .nav-link.text-light {
  color: #fdfdfd !important;
}

.navbar .nav-link.text-light:hover {
  color: #f2b279 !important;
}

.dropdown-menu {
  background-color: #30618c;
  border-radius: 0.5rem;
  border: none;
}

.dropdown-menu .dropdown-item {
  color: #ffffff;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #59a8d9;
}

.dropdown-divider {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================
   Redes sociales header
   ============================ */
.rrss-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rrss-header img {
  height: 30px;
  width: auto;
}

/* ============================
   Botón WhatsApp flotante
   ============================ */
.whatsapp {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 150;
}

.whatsapp img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.whatsapp img:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ============================
   Portada (home)
   ============================ */
.portada {
  background: linear-gradient(135deg, #30618c 0%, #59a8d9 45%, #f2b279 100%);
  color: #ffffff;
  padding: 3rem 1rem 2rem;
}

.texto_portada h1 {
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  margin-bottom: 0.8rem;
}

.texto_portada p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.texto_portada ul {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
}

.texto_portada li {
  margin-bottom: 0.25rem;
}

.custom-carousel-img {
  border-radius: 16px;
  max-height: 360px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

/* Líneas decorativas portada */
.lineas_portada {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 3px;
  margin-top: 2rem;
  height: 4px;
}

.lineas_portada .linea1 {
  background-color: #f2b279;
}
.lineas_portada .linea2 {
  background-color: #ffc667;
}
.lineas_portada .linea3 {
  background-color: #ffe7a3;
}
.lineas_portada .linea4 {
  background-color: #59a8d9;
}
.lineas_portada .linea5 {
  background-color: #30618c;
}

/* ============================
   Sección categorías (home)
   ============================ */
.seccion_categorias {
  padding: 3rem 1rem;
}

.seccion_categorias h2 {
  margin-bottom: 0.5rem;
}

.seccion_categorias p {
  margin-bottom: 1.5rem;
}

.galeria_categorias {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

.galeria_categorias > div {
  flex: 0 1 160px;
}

.galeria_index {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 0.6rem 0.6rem 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.galeria_index img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.4rem;
}

.galeria_index h3 {
  font-size: 1.05rem;
  color: #30618c;
}

.galeria_index:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

/* ============================
   Sección destacados (home)
   ============================ */
.seccion_destacados {
  padding: 3rem 1rem;
  background-color: #f7fbff;
}

.seccion_destacados h2 {
  margin-bottom: 0.5rem;
}

/* ============================
   Sección confianza (home)
   ============================ */
.seccion_confianza {
  padding: 0 1rem 3rem;
}

.seccion_confianza h2 {
  margin-bottom: 0.7rem;
}

.seccion_confianza ul {
  padding-left: 1.2rem;
}

.seccion_confianza li {
  margin-bottom: 0.25rem;
}

/* Ajuste de la imagen en la sección "¿Por qué elegir Aamilú?" */
.seccion_confianza img {
  display: block;
  max-width: 340px;
  width: 100%;
  margin: 1rem auto 0;
  border-radius: 16px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .seccion_confianza img {
    max-width: 260px;
  }
}

/* ============================
   Sección marcas (home)
   ============================ */
.marcas {
  padding: 3rem 1rem 3.5rem;
  background-color: #fff7ef;
}

.contenedor_marcas {
  width: min(1100px, 100%);
  margin: 0 auto;
  text-align: center;
}

.contenedor_marcas h2 {
  margin-bottom: 0.6rem;
}

.marcas__texto {
  max-width: 720px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

.marcas__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.marca {
  background-color: #ffffff;
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marca img {
  display: block;
  max-width: 130px;
  max-height: 55px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ============================
   Banners de categoría
   ============================ */
.img_accesorios,
.img_higiene,
.img_juguetes,
.img_snacks,
.img_trabajo_cognitivo {
  height: 30vh;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.img_accesorios {
  background-image: url("../img/Portada accesorios.jpg");
}
.img_higiene {
  background-image: url("../img/Portada higiene.jpg");
}
.img_juguetes {
  background-image: url("../img/Portada juguetes.jpg");
}
.img_snacks {
  background-image: url("../img/Portada snacks.jpg");
}
.img_trabajo_cognitivo {
  background-image: url("../img/Portada trabajo cognitivo.jpg");
}

.img_accesorios h1,
.img_higiene h1,
.img_juguetes h1,
.img_snacks h1,
.img_trabajo_cognitivo h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
}

/* líneas bajo banner */
.lineas {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 3px;
  margin: 0 auto 2rem;
  width: min(80%, 900px);
  height: 4px;
}

.lineas .linea1 {
  background-color: #f2b279;
}
.lineas .linea2 {
  background-color: #ffc667;
}
.lineas .linea3 {
  background-color: #ffe7a3;
}
.lineas .linea4 {
  background-color: #59a8d9;
}
.lineas .linea5 {
  background-color: #30618c;
}

/* ============================
   Catálogo: filtros + subcategorías
   ============================ */
.barra-subcategorias {
  padding: 1.5rem 0 0.5rem;
}

.lista-subcategorias {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.lista-subcategorias li {
  margin: 0;
}

.boton-subcat {
  border-radius: 999px;
  border: 1px solid #30618c;
  background-color: #ffffff;
  color: #30618c;
  font-size: 0.9rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.boton-subcat--activo,
.boton-subcat:hover {
  background-color: #30618c;
  color: #ffffff;
}

.filtros-catalogo {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.filtros-catalogo__campo {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filtros-catalogo__label {
  font-weight: 600;
  color: #30618c;
  font-size: 0.9rem;
}

.filtros-catalogo__input {
  border-radius: 8px;
  border: 1px solid #ced4da;
  padding: 0.4rem 0.65rem;
  font-size: 0.95rem;
}

/* ============================
   Galería de productos
   ============================ */
.mensaje-vacio {
  text-align: center;
  font-size: 0.95rem;
  color: #555555;
  padding: 2rem 1rem;
}

.galeria_productos {
  width: min(1200px, 100%);
  margin: 1.5rem auto 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

.fotos_productos {
  margin: 0;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 0.5rem 0.5rem 1rem;
  box-shadow: 0 0 5px #acabab;
  justify-self: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    filter 0.18s ease;
}

.fotos_productos img {
  width: 200px;
  height: 200px;
  margin: 0.5rem auto;
  display: block;
  object-fit: cover;
}

.fotos_productos:hover {
  transform: translateY(-3px);
  filter: saturate(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
}

.pie_foto_productos {
  padding-top: 0.25rem;
}

.pie_foto_productos .nombre_producto {
  font-size: 1rem;
  color: #30618c;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pie_foto_productos .precio_producto {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.pie_foto_productos .precio_producto span {
  color: #30618c;
}

.botones_producto {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-consulta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #59a8d9, #30618c);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    filter 0.15s ease;
}

.btn-consulta:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

.btn-detalles {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #30618c;
  font-size: 0.9rem;
  background-color: #ffffff;
  color: #30618c;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, color 0.15s ease;
}

.btn-detalles:hover {
  background-color: #30618c;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

.bloque-subcategoria {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}

.bloque-subcategoria .productos h2 {
  font-size: 1.4rem;
  color: #30618c;
  text-align: left;
}

/* Destacados en home */
.galeria_productos--destacados .fotos_productos {
  max-width: 260px;
}

/* ============================
   Modal de producto (detalle)
   ============================ */
.modal-producto .modal-title {
  font-family: "titan_one", "Chewy", system-ui, sans-serif;
  font-size: 1.25rem;
}

.modal-producto__img {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.modal-producto__bloque + .modal-producto__bloque {
  margin-top: 0.75rem;
}

.modal-producto__bloque h6 {
  font-weight: 700;
  color: #30618c;
  margin-bottom: 0.25rem;
}

.modal-producto__bloque p {
  margin-bottom: 0.2rem;
}

.modal-producto__bloque ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.modal-producto__precio {
  font-weight: 700;
  color: #30618c;
  font-size: 1rem;
}

.modal-producto__tabla {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.modal-producto__tabla th,
.modal-producto__tabla td {
  border-bottom: 1px solid #eee;
  padding: 0.25rem 0.4rem;
}

.modal-producto__tabla th {
  font-weight: 600;
  color: #30618c;
}

/* ============================
   Contacto
   ============================ */
.caja_completa_contacto {
  padding: 2rem 1rem 3rem;
}

.img_contacto {
  height: 30vh;
  min-height: 210px;
  background-image: url("../img/contacto.jpg");
  background-position: center;
  background-size: cover;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.form_contacto h2 {
  margin-bottom: 0.75rem;
  color: #30618c;
}

.form_contacto p {
  margin-bottom: 0.75rem;
}

/* ============================
   Footer
   ============================ */
.footer {
  background-color: #30618c;
  color: #ffffff;
  padding: 1rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.texto_footer {
  font-size: 0.85rem;
  text-align: center;
}

/* (clase rrss antigua, por si se usa en otras páginas) */
.rrss {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.rrss img {
  height: 35px;
  width: auto;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 768px) {
  .portada {
    padding-top: 2.4rem;
  }

  .rrss-header {
    margin-top: 0.75rem;
    justify-content: center;
  }

  .marcas {
    padding: 2.5rem 1rem 3rem;
  }

  .marca {
    padding: 0.5rem 1rem;
  }

  .marca img {
    max-width: 110px;
    max-height: 50px;
  }
}
/* =========================================================
   FIX: Header fijo + offset de scroll (para anchors)
   ========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 9999; /* por encima de todo el contenido */
}

/* Evita que al navegar a #secciones el header tape el contenido */
html {
  scroll-padding-top: 110px;
}

/* =========================================================
   WhatsApp flotante: más grande + tooltip al hover
   ========================================================= */
.whatsapp {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;

  width: 78px;
  height: 78px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  text-decoration: none;
}

.whatsapp img {
  width: 78px;
  height: 78px;
  transition: transform 0.2s ease;
  display: block;
}

.whatsapp:hover img {
  transform: scale(1.08);
}

/* Tooltip */
.whatsapp .whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 50%;
  transform: translateY(50%) translateX(6px);

  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;

  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* “Punta” del globito */
.whatsapp .whatsapp-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.85);
}

/* Mostrar tooltip */
.whatsapp:hover .whatsapp-tooltip,
.whatsapp:focus-visible .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(50%) translateX(0);
}

/* En pantallas chicas, que el tooltip se muestre arriba (más cómodo) */
@media (max-width: 576px) {
  .whatsapp {
    width: 72px;
    height: 72px;
    bottom: 18px;
    right: 18px;
  }

  .whatsapp img {
    width: 72px;
    height: 72px;
  }

  .whatsapp .whatsapp-tooltip {
    right: 0;
    bottom: calc(100% + 10px);
    transform: translateY(6px);
  }

  .whatsapp .whatsapp-tooltip::after {
    right: 18px;
    top: auto;
    bottom: -12px;
    transform: none;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
    border-width: 6px;
  }

  .whatsapp:hover .whatsapp-tooltip,
  .whatsapp:focus-visible .whatsapp-tooltip {
    transform: translateY(0);
  }
}
