:root {
    /* Paleta Industrial Pro */
    --fsm-black: #121212;
    /* Base Oscura (Header/Footer) */
    --fsm-dark-gray: #212121;
    /* Fondos Secundarios */
    --fsm-gray: #333333;
    /* Elementos UI */

    --fsm-yellow: #FFD600;
    /* Acento Principal (Marca) */
    --fsm-orange: #7B1FA2;
    /* Ahora es un Morado Brillante (Solicitud Usuario) */
    /* Llamados a la acción / Ofertas */

    --fsm-purple: #4A148C;
    /* Detalle de Marca (Sutil) */

    /* Neutros */
    --text-dark: #111111;
    --text-light: #EEEEEE;
    --white: #ffffff;
    --bg-light: #F4F6F8;
    /* Fondo general limpio */

    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    /* Bordes más rectos = Más profesional */
    --radius-md: 8px;

    /* Dimensiones */
    --header-height: 100px;
    --container-width: 1400px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    /* Patrón Técnico Sutil (Dots) */
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- MODERN TOP BAR (Brand Purple Professional) --- */
.top-bar {
    background-color: var(--fsm-purple);
    /* Marca presente aquí */
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--white);
    margin-left: 20px;
    opacity: 0.9;
}

.top-bar a:hover {
    color: var(--fsm-yellow);
    opacity: 1;
}

/* --- STICKY WRAPPER (Fija Header + Nav) --- */
.sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- MAIN HEADER (White Professional + Glassmorphism) --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    /* Semi - transparente */
    backdrop-filter: blur(10px);
    /* Efecto vidrio esmerilado */
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    color: var(--text-dark);
    z-index: 1002;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Sombra más sutil */
    position: relative;
    border-bottom: none;
    transition: all 0.3s ease;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 2rem;
    font-weight: 900;
    color: var(--fsm-purple);
    text-transform: uppercase;
    text-shadow: none;
    line-height: 1;
}

/* Buscador Industrial */
.search-bar-container {
    flex-grow: 1;
    position: relative;
    max-width: 700px;
}

.search-form {
    display: flex;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: #fdfdfd;
    border-radius: 4px 0 0 4px;
    color: #333;
}

.search-btn {
    background-color: var(--fsm-orange);
    /* Naranja de Acción */
    color: var(--white);
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
}

.search-btn:hover {
    background-color: #e65100;
}

/* Iconos Header */
.header-actions {
    display: flex;
    gap: 30px;
}

/* --- SEARCH RESULTS DROPDOWN (Predictive) --- */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
    /* Oculto por defecto */
    border: 1px solid #eee;
    overflow: hidden;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f9f9f9;
}

.search-result-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 15px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #eee;
}

.search-result-info h4 {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 2px;
}

.search-result-info span {
    font-size: 0.8rem;
    color: var(--fsm-orange);
    font-weight: bold;
}

.header-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--fsm-gray);
    /* Color oscuro para iconos sobre blanco */
    transition: 0.3s;
}

.header-action-item i {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: var(--fsm-black);
}

.header-action-item:hover i {
    transform: scale(1.1);
    color: var(--fsm-purple);
    /* Hover de marca */
}

.header-action-item span {
    color: var(--text-dark);
    font-weight: 600;
}

/* --- NAVIGATION BAR (Dark Gray Industrial) --- */
.nav-bar {
    background-color: #212121;
    /* Gris Oscuro Profundo */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 900;
    border-top: 3px solid var(--fsm-yellow);
    /* Detalle Industrial */
}

.nav-menu {
    display: flex;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    justify-content: flex-start;
    gap: 15px;
}

.nav-item {
    padding: 15px 20px;
    color: #eee;
    position: relative;
    display: block;
    text-align: center;
    transition: all 0.3s;
}

/* Efecto Hover Moderno (Línea desde el centro) */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--fsm-yellow);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    /* Brillo sutil */
    color: var(--fsm-yellow);
}

.nav-item:hover::after {
    width: 100%;
    /* Expande la línea */
}

/* Mobile Menu Toggle (Hidden on Desktop) */
.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    color: var(--fsm-yellow);
    cursor: pointer;
    border: 2px solid var(--fsm-yellow);
    padding: 5px 10px;
    border-radius: 5px;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }

    .top-bar {
        display: none;
    }

    /* Ocultar top bar en tablets/móviles para limpiar */

    .main-header {
        padding: 15px 0;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .logo-area img {
        height: 50px;
    }

    /* Header Layout Mobile */
    .main-header .container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-bar-container {
        order: 3;
        /* Mover buscador al final en móvil */
        width: 100%;
        max-width: 100%;
    }

    .header-actions {
        gap: 15px;
    }

    .header-action-item span {
        display: none;
    }

    /* Solo iconos en móvil */
    .header-action-item i {
        font-size: 1.4rem;
    }

    /* Mover botón menú al header */
    .mobile-menu-btn {
        display: block;
        order: 2;
        margin-left: auto;
    }

    .header-actions {
        order: 2;
        margin-right: 15px;
    }

    /* Navegación Móvil (Slide Out) */
    .nav-bar {
        position: fixed;
        top: 0;
        left: -100%;
        /* Oculto a la izquierda */
        width: 80%;
        height: 100vh;
        background-color: var(--white);
        transition: 0.3s;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }

    .nav-bar.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        padding-top: 60px;
        /* Espacio para botón cerrar */
    }

    .nav-item {
        text-align: left;
        padding: 20px 30px;
        border-bottom: 1px solid #eee;
    }

    /* Close Button inside Nav */
    .nav-close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 1.5rem;
        color: var(--fsm-purple);
        cursor: pointer;
        display: block;
    }
}

/* --- HERO SECTION --- */
.hero-wrapper {
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-bg) 100%);
    padding-top: 30px;
    padding-bottom: 50px;
}

.hero-card {
    background: var(--fsm-purple);
    background: radial-gradient(circle at top right, var(--fsm-purple-light), var(--fsm-purple-dark));
    border-radius: 20px;
    color: var(--white);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(74, 20, 140, 0.4);
    /* Glow morado */
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-text h2 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-text span {
    color: var(--fsm-yellow);
}

.btn-cta {
    background-color: var(--fsm-yellow);
    color: var(--fsm-purple-dark);
    padding: 18px 40px;
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(255, 214, 0, 0.4);
    /* Glow amarillo */
    display: inline-block;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 214, 0, 0.6);
}

/* --- CARDS & GRID --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--fsm-purple-dark);
    text-transform: uppercase;
}

.title-line {
    height: 6px;
    flex-grow: 1;
    background: linear-gradient(90deg, var(--fsm-purple), transparent);
    border-radius: 3px;
}

/* --- PRO CARDS --- */
.cat-card {
    background: var(--white);
    border-radius: 4px;
    /* Recto */
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: all 0.3s;
}

.cat-card i {
    font-size: 3rem;
    color: var(--fsm-gray);
    /* Iconos oscuros */
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.cat-card:hover {
    border-color: var(--fsm-orange);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cat-card:hover i {
    color: var(--fsm-orange);
    transform: none;
}

.cat-card h3 {
    font-weight: 700;
    color: var(--fsm-black);
    font-size: 1.1rem;
}

/* --- PRODUCT SLIDER CARD (Nuevo) --- */
.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    transition: 0.3s;
}

.product-card:hover {
    border-color: var(--fsm-yellow);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--fsm-orange);
    display: block;
    margin-bottom: 10px;
}

.btn-sm {
    background-color: var(--fsm-black);
    color: white;
    padding: 8px 15px;
    border-radius: 3px;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-sm:hover {
    background-color: var(--fsm-orange);
}


/* --- FOOTER PRO (Carbone Competitor) --- */
.main-footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding-top: 60px;
    border-top: 5px solid var(--fsm-orange);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--fsm-yellow);
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #999;
    font-size: 0.9rem;
    transition: 0.3s;
    display: inline-block;
}

.footer-menu a:hover {
    color: var(--fsm-orange);
    transform: translateX(5px);
}

.contact-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

/* Redes Sociales Footer */
.social-links a {
    width: 40px;
    height: 40px;
    background-color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s;
    color: white;
}

.social-links a:hover {
    background-color: var(--fsm-yellow);
    color: black;
    transform: translateY(-3px);
}


/* --- FLOATING WHATSAPP (Ferrito) --- */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    cursor: pointer;
    transition: transform 0.3s;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.floating-wa img {
    height: 120px;
    /* Tamaño grande para la mascota */
    width: auto;
}

/* Animación suave de "saludo" */
.floating-wa:hover {
    transform: scale(1.1) rotate(5deg);
}

/* --- MAIN SLIDER (Simulado) --- */
.main-slider {
    position: relative;
    width: 100%;
    /* Altura automática basada en proporción 2000x600 */
    height: auto;
    aspect-ratio: 2000 / 600;
    overflow: hidden;
    background-color: #eee;
    border-radius: 15px;
    /* Carbone Round Style */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: 100% 100%;
    /* Forzar ajuste completo */
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    background: transparent;
    /* Sin caja */
    padding: 40px;
    max-width: 700px;
    margin-left: 5%;
    color: white;
    transform: translateY(20px);
    transition: transform 1s 0.3s;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    /* Sombra para legibilidad */
}

.slide.active .slide-content {
    transform: translateY(0);
}

.slide-content h2 {
    font-size: 4rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.slide-content p {
    font-weight: 700;
    background: transparent;
    /* Sin fondo */
    display: block;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Flechas Slider */
.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    transform: translateY(-50%);
    pointer-events: none;
    /* Para que clicks pasen */
}

.nav-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    transition: 0.3s;
}

.nav-btn:hover {
    background: var(--fsm-yellow);
    color: black;
}

/* --- MEGA MENU (Carbone Style) --- */
.has-mega-menu {
    position: static;
    /* Vital para que el menu ocupe el ancho del container */
}

.mega-menu {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    background: white;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    padding: 30px 0;
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border-top: 5px solid var(--fsm-orange);
}

.nav-item:hover+.mega-menu,
.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-col {
    flex: 1;
    padding: 0 20px;
    border-right: 1px solid #eee;
}

.mega-col:last-child {
    border-right: none;
}

.mega-col h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--fsm-purple);
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--fsm-yellow);
    display: inline-block;
}

.mega-col ul li {
    margin-bottom: 8px;
}

.mega-col ul li a {
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
    text-transform: none;
    /* Reset del nav principal */
}

.mega-col ul li a:hover {
    color: var(--fsm-orange);
    padding-left: 5px;
}

/* --- FLOATING WHATSAPP --- */
.floating-wa {
    position: fixed;
    bottom: 10px;
    /* Un poco más abajo para compensar tamaño */
    right: 10px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none !important;
}

.wa-icon {
    width: 150px;
    /* DOBLE DE GRANDE (Era 80px) */
    height: 150px;
    background-color: transparent;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.wa-icon img {
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.4));
}

.floating-wa:hover .wa-icon {
    transform: scale(1.1) rotate(-5deg);
    /* Efecto divertido */
}

/* Etiqueta animada PRO */
.wa-label {
    background: white;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    position: relative;

    /* Estado inicial: Invisible y desplazado */
    opacity: 0;
    transform: translateX(20px);

    /* ANIMACIÓN DOBLE: 
       1. 'reveal': Aparece suavemente a los 2.5s
       2. 'pester': Se mueve para llamar la atención cada 4s (inicia a los 3s)
    */
    animation:
        reveal 0.6s cubic-bezier(0.25, 1, 0.5, 1) 2.5s forwards,
        pester 5s ease-in-out 3.5s infinite;
}

/* Triangulito del label */
.wa-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid white;
}

/* 1. Aparecer deslizando */
@keyframes reveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 2. Llamada de atención periódica (Vibra sutilmente) */
@keyframes pester {

    0%,
    85%,
    100% {
        transform: translateX(0) scale(1);
    }

    87% {
        transform: translateX(0) scale(1.05);
        /* Pequeño latido */
    }

    89% {
        transform: translateX(-4px);
    }

    91% {
        transform: translateX(4px);
    }

    93% {
        transform: translateX(-4px);
    }
}

/* --- MOBILE ADJUSTMENTS (FINAL FIX) --- */

/* --- MOBILE ADJUSTMENTS (FINAL FIX v3: No Distortion) --- */
@media (max-width: 992px) {

    /* 1. Header relativo en móvil para ahorrar espacio */
    .sticky-wrapper {
        position: relative !important;
    }

    /* 2. Botón Menú Visible (Contraste Morado) */
    .mobile-menu-btn {
        color: var(--fsm-purple) !important;
        border: 2px solid var(--fsm-purple) !important;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 5px;
    }

    .mobile-menu-btn i {
        color: var(--fsm-purple) !important;
    }

    /* CORRECCIÓN MENÚ QUE NO SE VEÍA */
    .nav-item {
        color: #333 !important;
        font-weight: 700;
        border-bottom: 1px solid #eee;
    }

    .nav-item:hover {
        background-color: #f9f9f9;
        color: var(--fsm-purple) !important;
    }

    .nav-item i {
        color: var(--fsm-orange) !important;
    }

    /* 3. Slider Móvil: NO APACHURRADO + BORDES REDONDEADOS */
    .main-slider {
        /* Usar proporción exacta de la imagen para que NO se deforme ni recorte */
        aspect-ratio: 2000 / 600 !important;
        height: auto !important;
        /* Altura automática basada en el ancho */
        border-radius: 15px !important;
        /* Restaurar bordes redondeados */
        margin-bottom: 20px !important;
    }

    .slide {
        /* Al coincidir el ratio del contenedor con la imagen, cover = contain = perfecto */
        background-size: cover !important;
        background-position: center center !important;
        border-radius: 15px !important;
    }

    /* Ajuste de Texto para slider pequeño en móvil */
    .slide-content {
        padding: 5px !important;
        margin-left: 0 !important;
        width: 100% !important;
        text-align: center !important;
        background: rgba(0, 0, 0, 0.5) !important;
        position: absolute;
        bottom: 0;
        left: 0;
        transform: none !important;
        border-radius: 0 0 15px 15px !important;
        /* Redondear solo abajo */
    }

    .slide-content h2 {
        font-size: 1rem !important;
        /* Título mini */
        margin-bottom: 2px !important;
        color: #FFF !important;
        line-height: 1 !important;
    }

    .slide-content p {
        font-size: 0.7rem !important;
        /* Texto mini */
        margin-bottom: 5px !important;
        line-height: 1 !important;
        color: #FFD600 !important;
        text-shadow: 1px 1px 2px #000 !important;
        display: block !important;
    }

    .btn-cta {
        padding: 4px 10px !important;
        font-size: 0.7rem !important;
        margin-top: 2px !important;
        border-radius: 4px !important;
    }

    /* Grid de Productos */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .cat-card {
        padding: 15px !important;
    }

    .cat-card i {
        font-size: 2rem !important;
        margin-bottom: 10px !important;
    }

    .cat-card h3 {
        font-size: 0.9rem !important;
    }

    /* Ocultar flechas */
    .slider-nav {
        display: none !important;
    }
}