@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Saira:ital,wght@0,100..900;1,100..900&display=swap");
/*
+-----------------------------------------------
+*********** VARIABLES Y DISEÑO BASE ***********
+-----------------------------------------------
+*/

:root {
  /* Paleta Cromática Premium - TEMA CLARO */
  --primary: #0056b3;
  --primary-light: #0088ff;
  --primary-hover: #004494;
  --secondary: #0095ff;
  --accent: #16a34a;
  --bg-main: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-700: #334155;
  --shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --radius-md: 12px;
  --radius-lg: 24px;

  /* Efectos & Glasmorfismo (Versión Clara) */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.05);
  --blur: blur(12px);

  /* Tipografía & Layout */
  --font-main: "Outfit", sans-serif;
  --font-marquee: "Saira", sans-serif;
  --header-h: 150px;
  --nav-h: 60px;
  --total-header-h: 230px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08); /* Sombra suave para fondos claros */
}

/* Reset Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.site-header-wrapper {
  position: relative; /* Contenedor para anclar el menú móvil absoluto */
}

.header-container {
  width: 100%;
  min-height: var(--header-h);
  background-image: url("../img/background-instelser.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  backdrop-filter: var(--blur);
  position: relative; /* Cambiado de fixed a relative para modo estático */
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.header-content {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 15px 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 40px;
  transform: translateY(-5px);
  transition: var(--transition);
}

.contact-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--bg-main);
}

.contact-phone i {
  color: var(--bg-main);
}

.contact-social {
  display: flex;
  gap: 12px;
}

.contact-social a {
  color: var(--gray-200);
  font-size: 1.5rem;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin: 0 5px 0 5px;
  border: 1px solid var(--bg-main);
  border-radius: 25%;
}

.contact-social a:hover {
  transform: translateY(-5px);
}

.facebook:hover {
  background-color: #0a1efc;
  color: var(--gray-200);
}
.instagram:hover {
  background: linear-gradient(
    45deg,
    #f09433 5%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: var(--gray-200);
}
.telegram:hover {
  background-color: #0088cc;
  color: var(--gray-200);
}
.whatsapp:hover {
  color: white;
  background: #16a34a;
}

/* ============================================
   ESTILOS DEL MARQUEE (DESPLAZAMIENTO)
   ============================================ */

.header-marque {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding: 0 40px;
  margin-top: calc(0.5rem + 10px);
  pointer-events: none;
}

.marquee-text {
  padding: 10px 0;
  max-width: 50%;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-marquee);
  text-align: right;
  line-height: 1.4;
  border-radius: 4px 0 0 4px;
}

@keyframes marquee-animation {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ============================================
   NAVEGACIÓN PRINCIPAL (TEMA CLARO)
   ============================================ */

.main-nav {
  position: relative; /* Cambiado de fixed a relative */
  width: 100%;
  height: var(--nav-h);
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  border-bottom: 2px solid var(--primary);
  backdrop-filter: var(--blur);
  z-index: 99;
}

.nav-menu {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  list-style: none;
  display: flex;
  justify-content: space-evenly;
  padding: 0 20px;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 18px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-menu > li > a i {
  font-size: 1.1rem;
  color: var(--primary);
}

.nav-menu > li > a .submenu-icon {
  display: none !important;
  transition: var(--transition);
}

.nav-menu > li:hover > a {
  color: var(--primary);
  background: rgba(0, 86, 179, 0.05);
}

/* SUBMENÚS (TEMA CLARO) */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 260px;
  padding: 15px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  border-radius: 0 0 12px 12px;
  list-style: none;
}

.submenu li a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 12px 25px;
  display: block;
  font-size: 0.9rem;
  transition: var(--transition);
  text-transform: uppercase;
}

.submenu li a:hover {
  background: var(--bg-soft);
  color: var(--primary);
  padding-left: 30px;
}

.nav-menu > li:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================================
   TOGGLE MENU MÓVIL
   ============================================ */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2000;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--text-main);
  border-radius: 10px;
  transition: var(--transition);
  background-color: var(--bg-main);
}

/* Animación Hamburguesa -> X */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
  background-color: #0f172a;
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
  background-color: #0f172a;
}

/* ============================================
   ESTILOS GENERALES Y COMPONENTES
   ============================================ */

.section-badge {
  display: inline-block;
  padding: 8px 24px;
  background: rgba(0, 86, 179, 0.08);
  border: 1px solid rgba(0, 86, 179, 0.1);
  border-radius: 50px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ============================================
   FOOTER (TEMA CLARO)
   ============================================ */

.footer {
  width: 100%;
  background: var(--bg-soft);
  border-top: 1px solid var(--gray-200);
  padding: 15px 0 40px;
  margin-top: 0;
}

.footer-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 35px;
  padding: 0 40px;
}

/* Fila Superior: Localidades */
.footer-locations {
  width: 100%;
}

/* Fila Inferior: 2 Columnas */
.footer-secondary-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.footer-section h3 {
  color: var(--text-main);
  margin-bottom: 30px;
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  position: relative;
  font-weight: 800;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-section ul li:hover {
  color: var(--primary);
  padding-left: 5px;
  cursor: default;
}

.locations-text {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
  text-align: justify;
}

.locations-text span {
  transition: var(--transition);
}

.locations-text span:hover {
  color: var(--primary);
  cursor: default;
}

.locations-texto {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.6rem;
  text-align: justify;
}

.locations-texto span {
  transition: var(--transition);
}

.locations-texto span:hover {
  color: var(--primary);
  cursor: default;
}

.footer-bottom {
  max-width: 1400px;
  margin: 40px auto 0;
  padding: 30px 40px 0;
  border-top: 1px solid var(--gray-200);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   CATÁLOGO DE PRODUCTOS (GRID 5x5)
   ============================================ */

.products {
  padding: 50px 20px;
  background-color: var(--white);
}

.products-header {
  max-width: 1400px;
  margin: 0 auto 20px;
  text-align: center;
}

.products-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 15px;
}

.products-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.products-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.product-card {
  background: var(--white);
  padding: 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: default;
  position: relative;
  overflow: hidden;
}

/* .product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
} */

.product-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--bg-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px dashed var(--gray-700);
  position: relative;
  transition: var(--transition);
}

.product-image-placeholder::after {
  content: "Insertar Imagen";
  position: absolute;
  z-index: 1;
}

.product-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ajusta la imagen sin deformarla */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2; /* Se coloca por encima del texto de 'Insertar Imagen' */
  border-radius: 10px;
  background-color: var(
    --white
  ); /* Para ocultar el texto si la imagen tiene transparencia */
}

.product-card:hover .product-image-placeholder {
  background-color: rgba(0, 86, 179, 0.05);
  border-color: var(--primary-light);
  color: var(--primary);
}

.product-brand {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   BOTONES FLOTANTES
   ============================================ */

#btnScrollTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  outline: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  text-align: center;
  line-height: 50px;
  box-shadow: 0 10px 15px -3px rgba(0, 86, 179, 0.2);
  transition: var(--transition);
}

#btnScrollTop:hover {
  background-color: var(--primary-light);
  transform: translateY(-5px);
  box-shadow: 0 15px 25px -5px rgba(0, 86, 179, 0.4);
}

.whatsapp-float {
  display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .whatsapp-float {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background-color: #25d366;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2.2rem;
    box-shadow: 0 10px 15px -3px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    transition: var(--transition);
  }

  .whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -5px rgba(37, 211, 102, 0.5);
    color: var(--white);
  }

  :root {
    --header-h: auto;
  }

  .header-container {
    z-index: 2500;
  }

  .header-container.active {
    position: fixed; /* Fix header only when menu is open */
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: none;
    border-bottom: 1px solid var(--gray-200);
    z-index: 3000; /* Asegurar que esté por encima del menú (2400) */
  }

  .header-content {
    justify-content: flex-end; /* Alineación a la derecha */
  }

  .mobile-menu-toggle {
    display: flex;
    margin-left: auto; /* Forzar posición a la derecha */
  }

  .header-contact {
    transform: translateY(0);
    gap: 20px;
  }

  /* Navegación Móvil (Tema Claro) */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 110px);
    background: var(--white);
    z-index: 1500;
    overflow-y: auto;
    border-bottom: 2px solid var(--primary);
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.active {
    display: block;
    position: fixed; /* Se vuelve fijo para cubrir toda la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    padding-top: 100px; /* Espacio para el header fijo */
    animation: fadeIn 0.3s ease;
    z-index: 2400; /* Debajo del header activo (2500) */
  }

  .nav-menu {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .nav-menu > li {
    width: 100%;
    text-align: center;
  }

  .nav-menu > li > a {
    padding: 25px;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-main);
  }

  .submenu {
    position: relative;
    opacity: 1;
    visibility: visible;
    display: none;
    transform: none;
    background: var(--bg-soft);
    box-shadow: none;
    border: none;
    width: 100%;
  }

  .nav-menu > li.active .submenu {
    display: block;
  }

  .nav-menu > li > a .submenu-icon {
    display: block !important;
    margin-left: auto;
  }

  .has-submenu.active .submenu-icon {
    transform: rotate(180deg);
  }

  .hero {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .stat-item strong {
    font-size: 1.8rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .header-contact {
    display: none;
  }

  .header-marque {
    display: none;
  }

  .hero-stats {
    flex-direction: column;
    gap: 30px;
  }

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

  .footer-secondary-rows {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
