@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Playfair+Display&display=swap');

:root {
  --bg: #f8f9f9;
  --card: #e8f5e8;
  --accent: #4caf50;
  --text: #212121;
  --muted: #6d7b6d;
  --border: #c8e6c9;
  --ring: #81c784;
  --shadow: rgba(0, 0, 0, 0.05);

  --menu-bg: #e8f5e8;
  --menu-bg-hover: #c8e6c9;
  --product-border: #c8e6c9;
  --product-hover: #f1f8e5;
}

/* Tipografías y base */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
}

.titulo, .subtitulo, .contenedor-producto h3 {
  font-family: 'Playfair Display', serif;
  color: var(--accent);
}

.titulo {
  text-align: center;
  font-weight: 700;
  font-size: 2.8rem;
  margin: 2rem 0 1rem 0;
}

.subtitulo {
  text-align: center;
  font-weight: 600;
  font-size: 1.6rem;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

/* Header */
header {
  position: sticky;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
}

.container {
  background: var(--card);
  padding: 0.7rem 2rem; /* Reducido de 1rem a 0.7rem */
  text-align: center;
  color: var(--muted);
  box-shadow: 0 4px 20px var(--shadow);
}

.container1 {
  max-width: 1200px;
  margin: auto;
  padding-inline: 2rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0; /* Reducido de 0.5rem a 0.2rem f*/
}

.brand {
  display: flex;
  align-items: center;
  gap: 2.4rem; /* Aumentado de 2rem a 2.4rem (20% más) */
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

/* === AJUSTES ESPECÍFICOS PARA EL LOGOTIPO - 20% MÁS GRANDE === */
.logo-wrapper {
  /* Eliminamos el fondo blanco y la sombra */
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 192px; /* 160px * 1.2 = 192px */
  width: 192px;  /* 160px * 1.2 = 192px */
  overflow: hidden;
  transition: all 0.3s ease;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.03);
}

/* === ESTILIZACIÓN DEL TEXTO "Laboratorio Vida Natural" === */
.brand-text {
  color: white; /* Texto en blanco */
  font-size: 2.4rem; /* 2rem * 1.2 = 2.4rem */
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Sombra sutil para mejor legibilidad */
}

/* Ajuste para móviles - tamaño optimizado */
@media (max-width: 768px) {
  .logo-wrapper {
    height: 144px; /* 120px * 1.2 = 144px */
    width: 144px;  /* 120px * 1.2 = 144px */
  }
  
  .logo-img {
    width: 100%;
    height: 100%;
  }
  
  .brand {
    gap: 1.8rem; /* 1.5rem * 1.2 = 1.8rem */
    padding: 0.5rem 0;
  }
  
  .brand-text {
    font-size: 1.92rem; /* 1.6rem * 1.2 = 1.92rem */
  }
}

/* Ajuste para móviles pequeños */
@media (max-width: 480px) {
  .logo-wrapper {
    height: 120px; /* 100px * 1.2 = 120px */
    width: 120px;  /* 100px * 1.2 = 120px */
  }
  
  .logo-img {
    width: 100%;
    height: 100%;
  }
  
  .brand {
    gap: 1.44rem; /* 1.2rem * 1.2 = 1.44rem */
  }
  
  .brand-text {
    font-size: 1.68rem; /* 1.4rem * 1.2 = 1.68rem */
  }
  
  /* En móviles pequeños, centrar el logo y el texto */
  .nav {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0; /* Reducido para compensar */
  }
  
  .brand {
    flex-direction: row;
  }
}

/* Improved menu styling */
.menu {
  display: flex;
  gap: 0.5rem;
}

/* Estilo común para todos los elementos del menú: enlaces y botones */
.menu a,
.menu button {
  display: inline-block;
  background-color: white;
  color: #212121;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  border-radius: 25px;
  padding: 0.45rem 1.2rem; /* Reducido verticalmente (0.45rem en lugar de 0.6rem) */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 2px solid var(--border);
  text-decoration: none;
  margin: 0;
  cursor: pointer;
  font-size: 1rem; /* ¡MANTENIDO IGUAL! (antes era 0.9rem) */
  line-height: 1.3;
}

.menu a:hover,
.menu button:hover,
.menu a[aria-current="page"],
.menu button.active {
  background-color: var(--menu-bg-hover);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
  transform: translateY(-2px);
}

/* Menú lateral de categorías */
.categories-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 1000;
  display: none;
}

.categories-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories-menu li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease;
}

.categories-menu li:last-child {
  border-bottom: none;
}

.categories-menu li a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: block;
}

.categories-menu li a:hover {
  color: #388e3c;
  background-color: var(--product-hover);
}

.categories-menu.active {
  display: block;
}

/* Productos grid */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  justify-items: center;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.contenedor-producto {
  text-align: center;
  border: 2px solid var(--product-border);
  border-radius: 20px;
  width: 260px;
  height: 320px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--bg);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--shadow);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.contenedor-producto::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.contenedor-producto:hover::before {
  left: 100%;
}

.contenedor-producto:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px var(--shadow);
  border-color: var(--accent);
  background: var(--product-hover);
}

.contenedor-producto h3 {
  margin: 0.5rem 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
  min-height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.liquidos,
.tabletas {
  width: 180px;
  height: 160px;
  object-fit: contain;
  margin: 0 auto;
  transition: transform 0.3s ease;
  border-radius: 10px;
}

.contenedor-producto:hover .liquidos,
.contenedor-producto:hover .tabletas {
  transform: scale(1.05);
}

/* Botón de "Ver más" */
.boton {
  margin: 1rem auto 0;
  background: linear-gradient(135deg, var(--accent), #45a049);
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  width: auto;
  min-width: 120px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--shadow);
  border: 2px solid transparent;
  cursor: pointer;
}

.boton:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow);
  background: linear-gradient(135deg, #45a049, var(--accent));
  border-color: var(--accent);
}

.boton a,
.texto-link {
  color: white !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Buscador - AJUSTADO: subido más arriba */
.buscador-container {
  max-width: 400px;
  margin: 0.5rem auto; /* Reducido de 1rem a 0.5rem */
  position: relative;
  font-family: 'Open Sans', sans-serif;
}

#buscador {
  width: 100%;
  padding: 10px 16px; /* Reducido de 12px a 10px */
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#buscador:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

#resultados {
  position: absolute;
  top: 48px;
  width: 100%;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1000;
  font-size: 0.95rem;
}

#resultados li {
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.25s ease;
  color: var(--text);
}

#resultados li:hover {
  background-color: var(--product-hover);
  color: var(--accent);
  font-weight: 600;
}

/* Footer */
footer {
  background: var(--card);
  color: var(--text);
  padding: 3rem 2rem 2rem;
  font-family: 'Open Sans', sans-serif;
  box-shadow: inset 0 1px 0 #c8e6c9;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.3rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  margin-top: 1rem;
}

.social-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.15);
}

.social-icon img {
  width: 100%;
  height: 100%;
  filter: none;
}

/* Información de contacto */
.contact-info p {
  margin: 0.8rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Sección de farmacovigilancia */
.farmacovigilancia {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.farmacovigilancia h4 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.farmacovigilancia p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

/* Texto de disclaimer */
.footer-disclaimer {
  background: var(--bg);
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Copyright final */
.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 1rem 2rem 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1rem;
  }

  .footer-social {
    justify-content: center;
  }

  .titulo {
    font-size: 2rem;
  }

  .subtitulo {
    font-size: 1.2rem;
  }

  .productos-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
  }

  .contenedor-producto {
    width: 240px;
    height: 320px;
  }

  .menu {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .menu a,
  .menu button {
    padding: 0.5rem 0.8rem;
    font-size: 1rem; /* ¡MANTENIDO IGUAL! */
  }
}

@media (max-width: 480px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .productos-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .container1 {
    padding-inline: 1rem;
  }

  .footer-disclaimer,
  .footer-bottom {
    padding: 1rem;
  }

  .footer-disclaimer p,
  .footer-bottom {
    font-size: 0.8rem;
  }

  .contenedor-producto {
    width: 280px;
    max-width: 90vw;
  }
}

/* Carrusel - AJUSTADO: espacio reducido y imagen completa */
.hero-slider {
  width: 100%;
  margin: 0.3rem 0; /* Reducido de 0.5rem a 0.3rem */
  background: var(--border);
  border-radius: 15px;
  overflow: hidden;
}

.hero-slider img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 15px;
  background: var(--bg);
}

@media (max-width: 768px) {
  .hero-slider img {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .hero-slider img {
    height: 250px;
  }
}

/* Lista de Categorías (en sección principal) */
.lista-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.lista-categorias li {
  background: var(--accent);
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.lista-categorias li:hover {
  background: var(--card);
  transform: translateY(-3px);
}

.lista-categorias a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================
   MENÚ DE ÁREAS TERAPÉUTICAS - Estilo moderno en 3 columnas
   ========================================== */
.areas-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  width: 100%;
  z-index: 1000;
  display: none;
  border-radius: 12px;
  max-height: 80vh; /* Altura máxima para scroll */
  overflow-y: auto; /* Habilitar scroll */
  -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
}

/* Indicador visual de que hay más contenido para desplazar */
.areas-menu::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.areas-menu.has-scroll::after {
  opacity: 1;
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.area-column {
  list-style: none;
  padding: 0;
  margin: 0;
}

.area-column a {
  display: block;
  color: #212121;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 0.5rem 0;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-bottom: 1px solid #eee;
  font-weight: 500;
}

.area-column a:hover {
  color: #4caf50;
  background-color: #f8fdf8;
  border-bottom-color: #4caf50;
  border-radius: 6px;
  padding: 0.5rem 0.5rem;
}

.area-column a:last-child {
  border-bottom: none;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
  .areas-grid {
    grid-template-columns: repeat(3, 1fr); /* Mantener 3 columnas en móviles */
    gap: 0.5rem; /* Reducir el espacio entre columnas */
  }
  
  .area-column {
    margin-bottom: 0.5rem; /* Reducir el margen inferior */
  }
  
  .area-column h4 {
    font-size: 0.95rem; /* Reducir tamaño del título de sección */
    margin-bottom: 0.4rem; /* Reducir espacio inferior */
  }
  
  .area-column a {
    font-size: 0.85rem; /* Reducir tamaño de fuente */
    padding: 0.4rem 0; /* Reducir padding vertical */
    line-height: 1.4; /* Ajustar altura de línea */
  }
  
  .areas-menu {
    padding: 0.8rem; /* Reducir padding */
    left: 5% !important; /* Centrar el menú en móviles */
    width: 90% !important; /* Ajustar ancho */
  }
}

/* Botón de cierre para menú en móviles */
.close-menu {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
}

@media (max-width: 768px) {
  .close-menu {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}




/* ====== HEADER ULTRA COMPACTO ====== */

/* Header más plano */
header .container,
.container {
  padding: 2px 6px !important;
}

/* NAV muy delgado */
.nav {
  padding: 2px 4px !important;
  min-height: 0 !important;
  gap: 4px !important;
}

/* LOGO pequeño */
.logo-wrapper { height: 80px !important; width: 80px !important; }
.logo-img { height: 100% !important; width: auto !important; object-fit: contain !important; }
/* Alternativa si tu logo no usa wrapper */
/* header img { max-height: 80px !important; width: auto !important; } */

/* Menú estilo “píldora” pero muy chico */
.menu {
  padding: 2px 6px !important;
  gap: 4px !important;
  border: 1px solid #dfeede !important;
  background: #edf7ed !important;
  box-shadow: none !important;
}
.menu a,
.menu button {
  padding: 3px 6px !important;
  font-size: 0.85rem !important;
  line-height: 1.1 !important;
  border-radius: 14px !important;
}

/* Buscador ultra compacto */
.buscador-container {
  margin: 2px auto 4px !important;
  max-width: 480px !important;
}
#buscador {
  padding: 6px 10px !important;
  font-size: 0.9rem !important;
}

/* Carrusel pegado al buscador */
.hero-slider {
  margin-top: 2px !important;
  margin-bottom: 4px !important;
}



/* ===== Carrusel: ver la imagen completa sin scroll ===== */

/* Ajusta este número a lo que realmente mide tu header + menú + buscador */
:root{
  --header-visible: 140px;   /* Si aún te obliga a hacer scroll, súbelo 10–20px */
}

/* Evita alturas fijas y deja que el slide se adapte al contenido */
.hero-slider,
.hero-slider .swiper,
.hero-slider .swiper-wrapper,
.hero-slider .swiper-slide{
  height: auto !important;
}

/* La imagen del banner: quepa completa y nunca exceda la altura visible */
.hero-slider img{
  display: block;
  max-width: 100%;
  height: auto;                                        /* Mantiene proporción */
  max-height: calc(100vh - var(--header-visible));     /* 👈 clave: cabe en pantalla */
  object-fit: contain;                                  /* No recorta nada */
  margin-inline: auto;                                  /* Centrada */
  background: transparent;                              /* Sin bandas */
}

/* Por si algún estilo previo metió márgenes grandes alrededor del carrusel */
.hero-slider{
  margin-top: 2px !important;
  margin-bottom: 6px !important;
  overflow: hidden;   /* evita barras si algo se pasa por 1px */
}

/* === LOGO 3X SIN CAMBIAR LA ALTURA DEL NAV === */
.nav { 
  position: relative; 
  overflow: visible;           /* deja que el logo “salga” del nav */
  z-index: 10;
}

.brand { 
  position: relative; 
  z-index: 15;                 /* por encima del carrusel */
}

.logo-wrapper{
  /* Mantén el tamaño base pequeño (80×80 ya está definido) */
  transform: scale(1.7);         /* 👈 TRIPLE tamaño visual */
  transform-origin: left center; /* crece hacia la izquierda/afuera */
  will-change: transform;
}

/* Que el carrusel nunca tape el logo ampliado */
.hero-slider { position: relative; z-index: 1; }

/* Responsivo: reduce un poco el logo en pantallas chicas */
@media (max-width: 1024px){
  .logo-wrapper{ transform: scale(2.2); }
}
@media (max-width: 768px){
  .logo-wrapper{ transform: scale(1.6); }
}
@media (max-width: 480px){
  .logo-wrapper{ transform: scale(1.3); }
}

/* ===== CARRUSEL MÁS PEQUEÑO ===== */
.hero-slider img {
  max-height: 75vh !important;  /* antes era casi 100vh, ahora solo 60% */
  object-fit: contain;
}
