/* =========================================
   VARIABLES & RESETS
========================================= */
:root {
  --primary: #911c1c; 
  --primary-dark: #6e1313;
  --bg-color: #fbfbf9; 
  --surface: #ffffff;
  --text-main: #2b2b2b;
  --text-muted: #6b6b6b;
  --border: #e6e6e6;
  --wa-color: #25D366;
  --wa-hover: #1EBE5C;
  --shadow-sm: 0 4px 15px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --radius: 4px;
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg-color); color: var(--text-main);
  line-height: 1.6; overflow-x: hidden;
}

h1, h2, h3, h4, h5, .subtitle { font-family: 'Playfair Display', serif; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }
.bg-light { background-color: #f4f4f2; }
.bg-dark { background-color: #1a1a1a; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-100 { width: 100%; }

/* =========================================
   HEADER & NAVIGATION
========================================= */
/* =========================================
   NUEVO MENÚ DE NAVEGACIÓN (DESKTOP & MOBILE)
========================================= */
.header-modern {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 9999;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: transparent;
  padding: 15px 0;
}
.header-modern.scrolled, body.inner-page .header-modern {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(0,0,0,0.05);
  padding: 10px 0;
  backdrop-filter: blur(10px);
}
.header-container-modern {
  max-width: 1400px; margin: 0 auto; padding: 0 40px;
  display: flex; justify-content: space-between; align-items: center;
}

/* Logo */
.logo-modern img { max-height: 48px; transition: 0.4s ease; }
.header-modern:not(.scrolled):not(.solid) .logo-modern img {
  filter: brightness(0) invert(1);
}

/* Listado de Navegación */
.nav-list {
  display: flex; align-items: center; gap: 40px; list-style: none;
}
.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-main);
  display: flex; align-items: center; gap: 6px;
  position: relative;
  padding: 10px 0; transition: color 0.3s ease;
}
.header-modern:not(.scrolled) .nav-link {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.nav-link::after {
  content: ''; position: absolute; bottom: 5px; left: 0;
  width: 0%; height: 2px; background: var(--primary);
  transition: width 0.3s ease;
}
.header-modern:not(.scrolled) .nav-link::after { background: #ffffff; }
.nav-link:hover::after { width: 100%; }

/* Icono Chevron (flecha) */
.chevron-icon { transition: transform 0.3s ease; }
.has-mega-menu:hover .chevron-icon { transform: rotate(180deg); }

/* ================== MEGA MENÚ DESKTOP ================== */
.mega-menu-panel {
  position: absolute; top: 100%; left: 0; width: 100%;
  background: #ffffff; border-top: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  opacity: 0; visibility: hidden;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  padding: 40px 0;
}/* ==========================================================
   PUENTE INVISIBLE (FIX PARA EL DESPLIEGUE EN PC)
========================================================== */
.mega-menu-panel::before {
  content: '';
  position: absolute;
  top: -35px; /* Sube 35px para cubrir el hueco transparente */
  left: 0;
  width: 100%;
  height: 35px;
  background: transparent; 
  /* background: rgba(255,0,0,0.2); <-- Descomenta esta línea si quieres ver el puente visualmente para probar */
}

.has-mega-menu .nav-link::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 35px;
  background: transparent;
}
.has-mega-menu:hover .mega-menu-panel {
  opacity: 1; visibility: visible;
  transform: translateY(0); pointer-events: auto;
}
.mega-menu-grid {
  max-width: 1300px; margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: 1fr 1fr 1fr 1.5fr; gap: 50px;
}
.mega-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.mega-title::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 30px; height: 2px; background: var(--primary);
}
.mt-top { margin-top: 40px; }
.mega-links { list-style: none; }
.mega-links li { margin-bottom: 12px; }
.mega-links a {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px; color: var(--text-muted);
  transition: all 0.3s ease; display: inline-block;
}
.mega-links a:hover {
  color: var(--primary); transform: translateX(5px);
}

/* Mega Menú - Banner de Imagen */
.mega-banner { position: relative; border-radius: 8px; overflow: hidden; height: 100%; min-height: 250px;}
.mega-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.mega-banner:hover img { transform: scale(1.05); }
.mega-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 30px; color: #fff;
}
.mega-banner-overlay span {
  font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 600;
}
.mega-banner-overlay p {
  font-family: 'Montserrat', sans-serif; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-top: 5px; color: #ddd;
}

/* ================== MENÚ MOBILE (OFF-CANVAS) ================== */
.hamburger-modern { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 10001; }
.hamburger-modern .line { width: 30px; height: 2px; background: var(--text-main); transition: 0.4s ease; display: block; }
.header-modern:not(.scrolled) .hamburger-modern .line { background: #fff; }
.mobile-nav-header { display: none; }
.mobile-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: 0.4s ease; z-index: 9999;
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

@media (max-width: 992px) {
  .header-container-modern { padding: 0 20px; }
  .hamburger-modern { display: flex; }
  
  /* Panel lateral con efecto elegante */
  .nav-wrapper {
    position: fixed; top: 0; right: -100%; width: 320px; max-width: 85vw; height: 100vh;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 10000; overflow-y: auto; transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
  }
  .nav-wrapper.open { right: 0; }
  
  .mobile-nav-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 25px 30px; border-bottom: 1px solid var(--border);
  }
  .mobile-logo-img { max-height: 35px; filter: none !important; }
  .close-menu-btn { font-size: 35px; background: none; border: none; color: var(--text-main); cursor: pointer; line-height: 1; transition: 0.3s; }
  .close-menu-btn:hover { color: var(--primary); transform: rotate(90deg); }
  
  .main-nav { padding: 20px 0; }
  .nav-list { flex-direction: column; gap: 0; align-items: flex-start; }
  .nav-item { width: 100%; border-bottom: 1px solid #f0f0f0; }
  .nav-link {
    width: 100%; padding: 20px 30px; font-size: 15px; color: var(--text-main) !important; text-shadow: none !important; justify-content: space-between;
  }
  .nav-link::after { display: none; }
  
  /* --- CAMBIOS CLAVE PARA EL ACORDEÓN --- */
  .mega-menu-panel {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; 
    pointer-events: auto; padding: 0; border: none;
    /* Ocultamos inicialmente con max-height 0 para que JS lo anime */
    max-height: 0; overflow: hidden; 
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .mega-menu-grid { padding: 0; display: block; background: rgba(0,0,0,0.02); }
  .mega-col { padding: 0 30px; }
  .mega-col:first-child { padding-top: 15px; }
  .mega-col:last-child { padding-bottom: 20px; }
  
  /* Títulos con flechas geométricas en vez de +/- */
  .mega-title {
    font-size: 14px; font-family: 'Montserrat', sans-serif; text-transform: uppercase; 
    color: var(--primary); margin: 0; padding: 15px 0; border-bottom: none; 
    display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  }
  .mega-title::after { 
    content: ''; width: 8px; height: 8px; 
    border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); 
    transform: rotate(45deg); transition: transform 0.4s ease; 
  }
  .mega-title.expanded::after { transform: rotate(-135deg); }
  .mt-top { margin-top: 0; }
  
  /* Submenús preparados para la animación JS */
  .mega-links.accordion-content {
    display: block; /* Se debe mantener en block para que JS pueda calcular su altura */
    max-height: 0; overflow: hidden;
    transition: max-height 0.5s ease;
    padding-left: 15px; margin: 0;
  }
  .mega-links li { margin-bottom: 15px; }
  .mega-links li:first-child { margin-top: 10px; }
  
  /* Restauramos el banner para darle el toque de diseño */
  .mega-banner { display: block; height: 150px; margin-top: 20px; border-radius: 8px; }
  .mega-banner-overlay { padding: 20px; }
  .mega-banner-overlay span { font-size: 1.2rem; }
}
/* =========================================
   HERO SECTION
========================================= */
.hero { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-bg, .hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); animation: slowZoom 20s infinite alternate; }
.hero-overlay { background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)); z-index: 1; }
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 800px; padding: 0 20px; }
.hero h1 { font-size: 4.5rem; font-weight: 600; margin-bottom: 20px; line-height: 1.1; letter-spacing: -1px; }
.hero p { font-size: 1.2rem; font-weight: 300; margin-bottom: 40px; color: #f0f0f0; }
.hero-actions { display: flex; gap: 20px; justify-content: center; }

/* =========================================
   BOTONES
========================================= */
.btn {
  display: inline-block; padding: 15px 35px;
  font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; border-radius: var(--radius);
  transition: var(--transition); cursor: pointer; text-align: center; border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(145,28,28,0.4); }
.btn-outline { border: 1px solid #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--text-main); }
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px; background: #fff; border: 1px solid var(--border);
  color: var(--text-main); font-weight: 600; font-family: 'Montserrat', sans-serif;
  font-size: 13px; border-radius: var(--radius); transition: var(--transition);
}
.btn-whatsapp img { width: 20px; }
.btn-whatsapp:hover { border-color: var(--wa-color); background: var(--wa-color); color: #fff; }
.btn-whatsapp:hover img { filter: brightness(0) invert(1); }

/* =========================================
   SECTIONS & CATEGORIES
========================================= */
.section-header { text-align: center; margin-bottom: 60px; }
.subtitle { display: block; font-size: 14px; color: var(--primary); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.section-header h2 { font-size: 2.5rem; color: var(--text-main); margin-bottom: 20px; }
.divider { width: 60px; height: 3px; background: var(--primary); margin: 0 auto; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.max-w-800 { max-width: 800px; margin: 0 auto; }

.category-card {
  position: relative; border-radius: var(--radius); overflow: hidden; height: 450px;
  display: block; box-shadow: var(--shadow-sm);
}
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.card-overlay {
  position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
}
.card-overlay h3 { font-size: 1.8rem; margin-bottom: 10px; transform: translateY(15px); transition: var(--transition); }
.explore-text { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); opacity: 0; transform: translateY(15px); transition: var(--transition); }
.category-card:hover img { transform: scale(1.08); }
.category-card:hover h3, .category-card:hover .explore-text { transform: translateY(0); opacity: 1; }
.grid-5 .category-card { height: 300px; }

/* =========================================
   PRODUCTS (CATALOG)
========================================= */
.page-title { background: #111; color: #fff; padding: 140px 20px 80px; text-align: center; }
.page-title h1 { font-size: 3rem; margin-bottom: 10px; }
.catalog-intro { text-align: center; max-width: 700px; margin: 0 auto 50px auto; }
.catalog-intro h2 { font-size: 2.2rem; margin-bottom: 15px; }
.catalog-intro p { margin-top: 20px; color: var(--text-muted); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.product-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); }
.product-gallery { height: 320px; }
.product-gallery img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.product-info { padding: 30px 25px; text-align: center; border-top: 1px solid var(--border); }
.product-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; }
.swiper-button-next, .swiper-button-prev { color: #fff !important; text-shadow: 0 2px 4px rgba(0,0,0,0.5); transform: scale(0.7); }

/* =========================================
   CONTACT FORM
========================================= */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.contact-info h2 { font-size: 2.5rem; margin-bottom: 20px; }
.contact-info p { margin-bottom: 30px; font-size: 1.1rem; color: #ccc; }
.contact-details p { margin-bottom: 15px; font-size: 1rem; color: #fff; }
.contact-details strong { color: var(--primary); }

.contact-form-container { background: #222; padding: 40px; border-radius: var(--radius); }
.form-group-row { display: flex; gap: 20px; }
.form-group { position: relative; margin-bottom: 25px; width: 100%; }
.form-group input, .form-group textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid #555;
  color: #fff; font-family: inherit; font-size: 1rem; padding: 10px 0; outline: none; transition: border-color 0.3s;
}
.form-group label {
  position: absolute; top: 12px; left: 0; color: #888; font-size: 1rem; pointer-events: none; transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-bottom-color: var(--primary); }
.form-group input:focus ~ label, .form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label, .form-group textarea:not(:placeholder-shown) ~ label {
  top: -15px; font-size: 0.8rem; color: var(--primary);
}
.hidden-honeypot { display: none !important; }
.form-status { margin-top: 15px; font-size: 0.9rem; text-align: center; }
.status-success { color: var(--wa-color); }
.status-error { color: #ff4444; }

/* =========================================
   MAP, FOOTER & EXTRAS
========================================= */
.mapa iframe { width: 100%; height: 400px; border: none; border-radius: var(--radius); filter: grayscale(50%); transition: var(--transition); }
.mapa iframe:hover { filter: grayscale(0%); }

.footer { background: #111; color: #999; padding: 80px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 60px; }
.footer-brand h3 { color: #fff; font-size: 1.8rem; margin-bottom: 15px; }
.footer-contact h4, .footer-action h4 { color: #fff; font-family: 'Montserrat', sans-serif; font-size: 1rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-contact ul li { margin-bottom: 12px; font-size: 0.9rem; }
.footer-contact a { color: var(--primary); transition: 0.3s; }
.footer-contact a:hover { color: #fff; }
.btn-footer-wa { display: inline-flex; align-items: center; gap: 15px; background: rgba(255,255,255,0.05); padding: 15px 25px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1); transition: var(--transition); color: #fff; }
.btn-footer-wa img { width: 30px; }
.btn-footer-wa:hover { background: var(--wa-color); border-color: var(--wa-color); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.8rem; }

.floating-socials { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 999; }
.social-icon { width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.social-icon img { width: 30px; }
.social-icon.whatsapp { background: var(--wa-color); }
.social-icon.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-icon:hover { transform: scale(1.15) translateY(-5px); }

/* Visor Lightbox */
.visor { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(5px); justify-content: center; align-items: center; opacity: 0; animation: fadeIn 0.3s forwards; }
.visor img { max-width: 90%; max-height: 90vh; box-shadow: var(--shadow-md); border-radius: 4px; }
.visor .cerrar { position: absolute; top: 30px; right: 40px; font-size: 45px; color: #fff; cursor: pointer; transition: 0.3s; font-family: sans-serif; }
.visor .cerrar:hover { color: var(--primary); transform: rotate(90deg); }

/* Animaciones Scroll */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }

@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes fadeIn { to { opacity: 1; } }

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 992px) {
  .hero h1 { font-size: 3.5rem; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .contact-info { text-align: center; }
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(26, 26, 26, 0.98); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition); z-index: 1000;
  }
  .nav-menu.active { opacity: 1; visibility: visible; }
  .nav-menu ul { flex-direction: column; text-align: center; gap: 20px; width: 100%; }
  .nav-menu a { color: #fff !important; font-size: 1.2rem; text-shadow: none; display: inline-block; padding: 10px; }
  
  .submenu, .submenu-categorias {
    position: static; background: transparent; box-shadow: none; border: none;
    display: none; min-width: 100%; padding: 0; transform: none; visibility: visible; opacity: 1;
  }
  .submenu a { font-size: 1rem; color: #ccc !important; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .has-dropdown:hover > .submenu, .submenu .has-dropdown:hover > .submenu-categorias { display: none; }
  .active-mobile > .submenu, .active-mobile > .submenu-categorias { display: block; }
  .active-mobile > a .arrow { transform: rotate(180deg); }

  .menu-toggle.is-active .hamburger { background: transparent !important; }
  .menu-toggle.is-active .hamburger::before { transform: rotate(45deg); top: 0; background: #fff; }
  .menu-toggle.is-active .hamburger::after { transform: rotate(-45deg); top: 0; background: #fff; }
  
  .hero h1 { font-size: 2.5rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .form-group-row { flex-direction: column; gap: 0; }
  .grid-2, .grid-5 { grid-template-columns: 1fr; }
  .section-padding { padding: 60px 0; }
}
