@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ========================================= */
/* VARIABLES GLOBALES Y BASE                 */
/* ========================================= */
:root {
    --primary-color: #224c63;
    --background-color: #7ccede;
    --dark-color: #151515;
}

html {
    font-size: 62.5%;
    font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative; 
}

/* ========================================= */
/* FONDO FIJO MULTIPLATAFORMA */
/* ========================================= */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(#00000080, #00000080), url('../IMG/BG/bg3.png'); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -100; /* Lo manda detrás de todos los demás elementos de tu página */
}

.container {
    max-width: 120rem;
    margin: 0 auto;	
    padding: 0 2rem;
}

/* ========================================= */
/* HEADER Y NAVEGACIÓN                       */
/* ========================================= */
.container-hero {
    background-color: var(--background-color);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 0;
}

.container-logo {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 0.5rem;
    padding: 0; 
    width: 100%;
}

.container-logo img {
    width: 230px;
    height: 90px;
    object-fit: contain;
    display: block;
    margin: 0 auto; 
}

.container-logo a {
    cursor: pointer;
    display: flex;
    justify-content: center;
}

.container-navbar {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.menu {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.menu a {
    text-decoration: none;
    font-size: 1.7rem; 
    color: #fff; 
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.menu a::after {
    content: '';
    width: 0; 
    height: 2px; 
    background-color: #fff;
    position: absolute;
    bottom: -5px;   
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.menu a:hover {
    color: var(--background-color);
    transform: translateY(-3px);
}

.menu a:hover::after {
    width: 100%;
    opacity: 1;
}

/* ========================================= */
/* SECCIÓN CATÁLOGO PRINCIPAL                */
/* ========================================= */
.main-products-layout {
    display: grid;
    grid-template-columns: 28rem 1fr; 
    gap: 4rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
    align-items: start; 
    position: relative;
}

/* --- SIDEBAR (FILTRO IZQUIERDO WHATSAPP) --- */
.sidebar {
    background-color: #fff;
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: sticky;
    top: 2rem; 
    border-top: 5px solid #25D366; /* Borde superior verde WhatsApp */
}

.sidebar-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-subtitle {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.5;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sidebar-menu li a {
    text-decoration: none;
    font-size: 1.5rem;
    color: #444;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 0.8rem;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-menu li a i {
    font-size: 1.8rem;
    color: #25D366; /* Ícono verde por defecto */
    transition: all 0.3s ease;
}

.sidebar-menu li a:hover {
    background-color: #eafbee; /* Fondo verdecito claro */
    color: #128C7E;
    border-color: #25D366;
    transform: translateX(5px); 
}

.sidebar-menu li a:hover i {
    transform: scale(1.2);
}

/* --- CATEGORÍAS Y TARJETAS --- */
.category-section {
    background-color: #fff;
    padding: 4rem;
    border-radius: 1.5rem;
    margin-bottom: 4rem; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.category-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.category-subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 4rem;
    line-height: 1.6;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
    gap: 3.5rem;
}

.card-promo {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-promo:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.container-img {
    height: 22rem;
    padding: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fbfc; 
    border-bottom: 1px solid #eee;
    overflow: hidden; 
}

.container-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.4s ease;
}

.card-promo:hover .container-img img {
    transform: scale(1.08);
}

.content-card-promo {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-grow: 1;
    text-align: center; 
}

.content-card-promo h3 {
    font-size: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
}

.description {
    font-size: 1.4rem;
    color: #555;
    flex-grow: 1; 
    line-height: 1.6;
}

.btn-consultar {
    text-decoration: none;
    background-color: #25D366; 
    color: #fff;
    padding: 1.4rem;
    border-radius: 0.8rem;
    font-weight: 600;
    font-size: 1.5rem;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-consultar:hover {
    background-color: #128C7E;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

/* ========================================= */
/* FOOTER                                    */
/* ========================================= */
.footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 7rem 0 3rem 0; 
    margin-top: 6rem;
}

.container-footer {
    display: flex;
    flex-direction: column;
    gap: 5rem; 
    padding: 0 2rem;
}

.menu-footer {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.information {
    justify-self: center;
}

.my-account {
    justify-self: end;
}

.title-footer {
    font-weight: 600;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: var(--background-color); 
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

.contact-info, .information, .my-account {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.information ul, .my-account ul, .contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1.6;
    color: #ddd;
}

.contact-list i {
    color: var(--background-color);
    font-size: 1.8rem;
    margin-top: 0.2rem;
}

.information ul li a, .my-account ul li a {
    text-decoration: none;
    color: #ddd;
    font-size: 1.5rem;
    font-weight: 300;
    transition: all 0.3s ease;
    display: inline-block;
}

.information ul li a:hover, .my-account ul li a:hover {
    color: #fff;
    transform: translateX(6px); 
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: rgba(255, 255, 255, 0.08); 
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-btn img {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.social-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.social-btn:hover img {
    transform: scale(1.1);
}

.copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap; 
    gap: 2rem;
}

.copyright p {
    font-weight: 300;
    font-size: 1.4rem;
    color: #bbb;
    margin: 0;
}

.copyright img {
    max-height: 2.5rem;
    width: auto;
    opacity: 0.9;
}

/* ========================================= */
/* TÍTULO DE SECCIÓN (SOLO MÓVIL)            */
/* ========================================= */

.mobile-page-title {
    display: none;
}

/* ========================================= */
/* MEDIA QUERIES (SISTEMA RESPONSIVE GLOBAL) */
/* ========================================= */

/* 1. Laptops pequeñas (hasta 1024px) */
@media (max-width: 1024px) {
    html {
        font-size: 58%; 
    }
    .hero {
        padding: 1rem 2rem;
    }

    .main-products-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative; /* Ya no flota al bajar */
        top: 0;
    }
    .menu-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-list li {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .information, 
    .my-account {
        justify-self: center;
    }
}

/* 2. Tablets en vertical y Celulares (hasta 768px) */
@media (max-width: 768px) {
    html { font-size: 55%; }
    .container-logo {
        padding-left: 0;
        margin: 0 auto; 
    }
    .navbar {
        justify-content: space-between;
        padding: 1.5rem 2rem;
    }
    
    /* --- CONFIGURACIÓN DEL MENÚ MÓVIL --- */
    .menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        text-align: center;
        z-index: 100;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        padding: 0;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        padding: 2rem 0;
    }

    .menu li { margin-bottom: 1.5rem; }

    /* --- ESTILOS DEL BOTÓN HAMBURGUESA ANIMADO (LA "X") --- */
    .navbar .fa-bars { display: none; } 

    .menu-btn {
        display: block; 
        width: 30px;
        height: 25px;
        position: relative;
        cursor: pointer;
        z-index: 101; 
    }

    .menu-btn span {
        display: block;
        position: absolute;
        height: 3px; 
        width: 100%;
        background: #fff;
        border-radius: 9px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out; 
    }

    .menu-btn span:nth-child(1) { top: 0px; }
    .menu-btn span:nth-child(2) { top: 10px; }
    .menu-btn span:nth-child(3) { top: 20px; }

    .menu-btn.open span:nth-child(1) {
        top: 10px;
        transform: rotate(135deg);
    }
    .menu-btn.open span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }
    .menu-btn.open span:nth-child(3) {
        top: 10px;
        transform: rotate(-135deg);
    }

    /* --- ADAPTACIONES DEL CATÁLOGO PARA MÓVIL --- */
    .category-section {
        padding: 2.5rem;
    }

    .category-title {
        font-size: 2.4rem;
        text-align: center;
    }
    
    .category-subtitle {
        text-align: center;
    }

    .menu-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-list li, .social-icons {
        justify-content: center;
    }
    .information, .my-account {
        justify-self: center;
    }

    .mobile-page-title {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        color: #ffffff;
        font-size: 1.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
}

/* 3. Teléfonos Anchos y Horizontales (hasta 576px) */
@media (max-width: 576px) {
    html { font-size: 50%; }
    .container-logo img {
        width: 180px; 
        height: auto;
    }
    .copyright {
        flex-direction: column-reverse; 
        text-align: center;
        justify-content: center;
    }
}

/* 4. Teléfonos Delgados (hasta 400px) */
@media (max-width: 400px) {
    .container-logo img { width: 150px; }
    .category-section { padding: 1.5rem; }
    .card-promo { border-radius: 1rem; }
}