/* ==========================================================================
   CSS Variables & Typography
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-main: #2b2553;
  --bg-secondary: #1a153a;
  --bg-card: rgba(255, 255, 255, 0.05);
  
  --text-main: #ffffff;
  --text-muted: #b8b6cc;
  
  --accent-primary: #f28b22; /* Orange/Tangerine */
  --accent-hover: #d67a1e;
  --accent-gold: #f28b22; /* Mapped gold to orange */

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  
  /* Utilities */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.text-gold {
  color: var(--accent-gold);
}

.section-title-wrapper {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
}

/* ==========================================================================
   Layout & Sections
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 6rem 0;
}

/* ==========================================================================
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(128, 0, 32, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: white;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  transition: all var(--transition-fast);
}

.navbar.scrolled {
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 45px; /* Altura ideal para la barra de navegación */
  width: auto;
  object-fit: contain;
  mix-blend-mode: normal; /* Modificar si tiene fondo a 'screen' o 'multiply' dependiendo del color */
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 300;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--accent-gold);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 8rem;
  background-image: linear-gradient(to bottom, rgba(43, 37, 83, 0.85), rgba(43, 37, 83, 1)), url('../images/hero.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  color: var(--accent-gold);
  font-size: 1.25rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* Trust Section */
.trust {
  background-color: var(--bg-secondary);
  padding: 4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trust-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.metric-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/5;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

/* Call To Action */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-main));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Floating WhatsApp */
.floating-whatsapp {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  transition: transform var(--transition-fast);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* responsive queries */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* Add mobile menu later if fully needed, keep simple for prototype */
  }
  
  .hero-buttons {
    flex-direction: column;
  }
}

/* Entregas Swiper Carousel */
.entregas-swiper {
  width: 100%;
  padding: 5rem 0; /* Padding extra para que la escala y la sombra grande no se corten */
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 75%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 75%, transparent);
}

.entregas-swiper .swiper-slide {
  width: 250px;
  aspect-ratio: 1/1;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, box-shadow 0.4s ease;
  transform: scale(0.85); /* Escala menor para los lados */
  opacity: 0.5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5); /* Sombra base regular */
}

.entregas-swiper .swiper-slide-active {
  transform: scale(1.15); /* Escala mayor e impacto en slider central */
  opacity: 1;
  box-shadow: 0 10px 40px rgba(242, 139, 34, 0.7); /* Custom pop naranja en centro */
  border: 1px solid rgba(242, 139, 34, 0.5);
  z-index: 10;
}

@media (max-width: 768px) {
  .entregas-swiper .swiper-slide {
    width: 200px;
  }
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--accent-primary);
}

.clickable-image {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.clickable-image:hover img {
  transform: scale(1.05);
}

/* ==========================================================================
   Página de Marcas (marcas.html)
   ========================================================================== */

/* Hero Interior */
.inner-page-hero {
  background-color: var(--bg-secondary);
  background-image: linear-gradient(to bottom, rgba(43, 37, 83, 0.85), rgba(43, 37, 83, 1)), url('../images/hero.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Categorías y Títulos */
.category-title {
  font-size: 2rem;
  border-left: 4px solid var(--accent-primary);
  padding-left: 1rem;
  margin-bottom: 2rem;
  color: var(--text-main);
  text-transform: capitalize;
}

/* Carrusel de Marcas */
.marcas-swiper {
  width: 100%;
  padding: 1rem 0 3rem 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 95%, transparent);
}

.brand-card {
  width: 200px;
  height: 140px;
  background-color: #ffffff; /* Necesario que siga blanco para ocultar el fondo .webp/.jpg de los logos */
  border-radius: var(--radius-sm);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  /* Borde doble: primero el color naranja de la marca y luego transparente para un efecto premium enmarcado */
  box-shadow: inset 0 0 0 3px var(--accent-primary), 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.brand-card:hover {
  transform: translateY(-5px);
  box-shadow: inset 0 0 0 3px var(--accent-hover), 0 10px 25px rgba(242, 139, 34, 0.4);
}

.brand-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

@media (max-width: 768px) {
  .brand-card {
    width: 160px;
    height: 110px;
    padding: 1rem;
  }
}


/* ==========================================================================
   Distribution Section (Redesign)
   ========================================================================== */
.dist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.dist-card {
  background-color: var(--bg-main);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dist-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(242, 139, 34, 0.3); /* Subtle gold border on hover */
}

.dist-img-wrap {
  height: 180px;
  overflow: hidden;
  background-color: rgba(0,0,0,0.3);
}

.dist-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform var(--transition-smooth);
}

.dist-card:hover .dist-img-wrap img {
  transform: scale(1.05);
}

.dist-info {
  padding: 1.25rem;
  flex-grow: 1;
}

.dist-info-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.dist-info-header i {
  color: var(--accent-gold);
  font-size: 1.25rem;
}

.dist-info-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-main);
}

.dist-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.benefits-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.benefit-icon {
  font-size: 1.75rem;
  color: var(--accent-gold);
  margin-top: 0.25rem;
}

.benefit-text h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.05rem;
  color: var(--text-main);
}

.benefit-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
