/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --primary: #F08220;
  --secondary: #333333;
  --accent: #FFB03B;
  --text-body: #555555;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--text-body);
  background-color: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Archivo Black', sans-serif;
  color: var(--secondary);
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* =========================================
   2. HEADER & NAVEGACIÓN
   ========================================= */
.main-header {
  background: var(--white);
  height: 90px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  border-bottom: 3px solid var(--primary);
}

.header-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 90px;
  width: 300px;
}

.logo {
  margin-top: 10px;
  font-size: 1.5rem;
  font-weight: 800;
}

.logo-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.main-nav {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-weight: 700;
  color: var(--secondary);
  font-size: 0.95rem;
  position: relative;
}

  .nav-link:hover, .nav-link.active {
    color: var(--primary);
  }

  .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
  }

  .nav-link:hover::after, .nav-link.active::after {
    width: 100%;
  }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-section {
  height: 90vh;
  background-image: linear-gradient(rgba(30, 30, 30, 0.7), rgba(30, 30, 30, 0.7)), url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?q=80&w=2070&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
}

.hero-content {
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

  .hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    line-height: 1.1;
  }

  .hero-content h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
  }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-ctas {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   4. BOTONES Y ELEMENTOS UI
   ========================================= */
.cta-button {
  padding: 15px 35px;
  border-radius: 5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  display: inline-block;
}

.primary-cta {
  background-color: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
}

  .primary-cta:hover {
    background-color: #d66e15;
    border-color: #d66e15;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(240, 130, 32, 0.4);
  }

.secondary-cta {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

  .secondary-cta:hover {
    background-color: var(--white);
    color: var(--secondary);
    transform: translateY(-3px);
  }

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  width: 100%;
}

  .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto 0;
  }

/* =========================================
   5. LAYOUT GENERAL Y SECTORES
   ========================================= */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 20px;
}

.sectors-section {
  padding: 5rem 20px;
  background-color: var(--bg-light);
  text-align: center;
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.sector-card {
  background: var(--white);
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
}

  .sector-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-bottom: 3px solid var(--primary);
  }

.card-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

/* =========================================
   6. BARRA LATERAL (SIDEBAR)
   ========================================= */
.sidebar {
  display: none;
}

  .sidebar h3 {
    font-size: 1.2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
  }

.cat-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #666;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  transition: 0.2s;
}

  .cat-item:hover {
    color: var(--primary);
    padding-left: 5px;
    background-color: var(--bg-light);
  }

  .cat-item.active-cat {
    color: var(--white);
    background-color: var(--primary);
    font-weight: bold;
    border-left: 3px solid var(--primary);
    padding-left: 10px;
  }

/* =========================================
   7. PRODUCTOS (GRID & CARD)
   ========================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: var(--transition);
  border: 1px solid #f0f0f0;
}

  .product-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
  }

/* OJO: Esta clase solo aplica si usas imagen simple sin carrusel */
.product-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
  border-bottom: 3px solid var(--primary);
  background-color: #fff;
}

.product-info {
  padding: 20px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(240, 130, 32, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
  margin: 10px 0;
}

.btn-view {
  width: 100%;
  padding: 12px;
  background: var(--secondary);
  color: var(--white);
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 4px;
}

  .btn-view:hover {
    background: var(--primary);
  }

/* =========================================
   8. CARRUSEL DE PRODUCTOS (Product Gallery)
   ========================================= */
.product-gallery {
  position: relative;
  width: 100%;
  /* 1. Altura equilibrada: */
  /* 260px es un buen balance para ver el uniforme completo sin ser gigante */
  height: 260px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  /* 2. Fondo limpio: */
  /* Si la foto no llena el cuadro, se verá este color en los bordes */
  background-color: #ffffff;
  border-bottom: 1px solid #f0f0f0; /* Sutil separación visual */
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease-in-out;
}

/* --- ESTILO DE LA IMAGEN EN LA TARJETA --- */
/* Usamos selectores específicos para NO afectar al Modal */
.product-card .gallery-track img {
  width: 100%;
  height: 100%;
  /* 3. LA CLAVE MÁGICA: CONTAIN */
  /* Esto obliga a la imagen a mostrarse COMPLETA, sin recortar nada */
  object-fit: contain;
  /* 4. Posición y espacio */
  object-position: center;
  padding: 5px; /* Un pequeño margen interno para que la ropa no toque los bordes */
  flex-shrink: 0;
}

/* --- ESTILO DE LA IMAGEN EN EL MODAL (PROTEGIDO) --- */
/* Esto asegura que el modal siga usando 'cover' si así te gustaba, 
   o 'contain' si prefieres. Aquí no tocamos nada, se hereda o se define aparte.
   Pero por seguridad, definimos que en el modal la imagen llene bien. */
.modal-img-box .gallery-track img {
  object-fit: contain; /* En el modal también se suele preferir ver la foto entera */
  background: #f5f5f5; /* Fondo grisáceo en el modal para resaltar la foto */
}


.gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9); /* Un poco más sólido para que se vea sobre ropa oscura */
  border: 1px solid #ddd; /* Borde sutil */
  border-radius: 50%;
  width: 28px; /* Un poco más pequeños en la tarjeta para elegancia */
  height: 28px;
  cursor: pointer;
  font-weight: bold;
  color: var(--primary); /* Flecha del color de tu marca */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Sombrita para relieve */
}

  .gallery-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
  }

.prev-btn {
  left: 8px;
}

.next-btn {
  right: 8px;
}

/* Mostrar botones al hacer hover en la tarjeta */
.product-card:hover .gallery-btn {
  opacity: 1;
}

/* =========================================
   9. MODAL & DETALLES
   ========================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--white);
  width: 90%;
  max-width: 900px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  flex-direction: column;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: #aaa;
  z-index: 10;
}

.modal-img-box {
  flex: 1;
  background: #eee;
}

  /* Ajustes Específicos para el Carrusel DENTRO del Modal */
  .modal-img-box .product-gallery {
    height: 400px;
    position: relative;
  }

  /* Forzar botones visibles en el Modal */
  .modal-img-box .gallery-btn {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 40px;
    height: 40px;
  }

    .modal-img-box .gallery-btn:hover {
      background: rgba(0, 0, 0, 0.9);
      transform: translateY(-50%) scale(1.1);
    }

.modal-details {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.btn-whatsapp, .whatsapp-btn {
  background: #25D366;
  color: white;
  border: none;
  padding: 15px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
}

  .btn-whatsapp:hover {
    background: #1ebc57;
    transform: scale(1.02);
  }

  .btn-whatsapp svg, .whatsapp-btn svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
  }

/* =========================================
   10. FOOTER & EXTRAS
   ========================================= */
footer {
  background: #1a1a1a !important;
  border-top: 4px solid var(--primary);
}

.social-impact-section {
  padding: 4rem 20px;
  background-color: var(--white);
}

.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.impact-image {
  overflow: hidden;
  border-radius: 10px;
  height: auto;
}

  .impact-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }

.impact-content .tag {
  margin-bottom: 10px;
}

.impact-stat {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 10px;
  border-left: 4px solid var(--primary);
  background: var(--bg-light);
  border-radius: 5px;
}

.stat-number {
  font-size: 2rem;
}

.stat-desc {
  font-weight: 700;
  color: var(--secondary);
}

.clients-section {
  padding: 80px 0; 
  background-color: #f8f8f8; 
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px; 
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  justify-items: center;
  padding: 0 20px;
}

.client-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  max-width: 350px;
  height: auto;
}

.client-logo img {
  max-width: 100%;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.client-logo img:hover {
  opacity: 1;
}

.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse-green 2s infinite;
}

  .whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1ebc57;
  }

.whatsapp-icon {
  width: 60px;
  height: 60px;
  fill: white;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* =========================================
   11. MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* Desktop Styles */
@media (min-width: 768px) {
  .main-container {
    display: flex;
    gap: 40px;
  }

  .sidebar {
    display: block;
    width: 250px;
    flex-shrink: 0;
  }

  .product-grid {
    flex-grow: 1;
  }

  .modal-content {
    flex-direction: row;
    height: 500px;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Ajuste altura imagen Modal en Movil */
  .modal-img-box .product-gallery {
    height: 250px;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 10px;
  }

  .main-header {
    height: auto;
    padding-top: 10px;
    padding-bottom: 0;
  }

  .logo {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

    .logo img {
      height: 90px;
      width: auto;
    }

  .main-nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid #eee;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

    .main-nav::-webkit-scrollbar {
      display: none;
    }

  .nav-link {
    flex: 0 0 auto;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    text-align: center;
    white-space: nowrap;
  }

    .nav-link.active {
      background: var(--primary);
      color: var(--white);
      border-color: var(--primary);
      font-weight: 700;
    }

    .nav-link::after {
      display: none;
    }

  /* Sidebar móvil horizontal */
  .sidebar {
    display: block !important;
    width: 100%;
    position: sticky;
    top: 80px;
    z-index: 900;
    background: var(--white);
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
  }

    .sidebar h3 {
      display: none;
    }

    .sidebar ul {
      display: flex;
      flex-wrap: nowrap;
      overflow-x: auto;
      gap: 10px;
      padding: 0 15px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

      .sidebar ul::-webkit-scrollbar {
        display: none;
      }

  .cat-item {
    flex: 0 0 auto;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid #ddd;
    transition: all 0.2s ease;
  }

    .cat-item.active-cat {
      color: var(--white);
      background: var(--primary);
      border-color: var(--primary);
      border-left: 1px solid var(--primary);
      box-shadow: 0 4px 8px rgba(240, 130, 32, 0.3);
      padding-left: 16px;
    }

    .cat-item span:last-child {
      display: none;
    }

  .impact-grid {
    grid-template-columns: 1fr;
  }

  .impact-image {
    order: 1;
  }

  .impact-content {
    order: 2;
  }
}


@media (max-width: 480px) {
  /* En móviles, cambiamos a 2 columnas para asegurar la legibilidad */
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .client-logo {
    /* Mantenemos un tamaño razonable en móviles */
    max-width: 150px;
  }
}