/* Estilos Base */
body {
    margin: 0;
    font-family: sans-serif;
    background-color: #f4f4f9;
    
    /* AJUSTADO: Suma de navbar (~70px) + menu-desktop (~40px) = 110px */
    padding-top: 110px; 
}

.logo-login {
    width: 100% !important;
}

/* 1. Estilos del Navbar Principal */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    /* --- PROPIEDADES PARA FIJAR --- */
    position: fixed; 
    top: 0;          
    width: 100%;     
    z-index: 1020;   
    box-sizing: border-box; 
}

/* Ícono de Hamburguesa (OCULTO POR DEFECTO EN ESCRITORIO Y TABLET) */
.hamburger-icon {
    display: none; 
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    margin-right: 15px; 
}

/* 2. Estilos del Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    width: 15vw;
    height: auto;
    max-height: 60px; 
    min-width: 50px;
}

/* 3. Estilos de la Barra de Búsqueda */
.navbar-search {
    flex-grow: 1; 
    max-width: 800px;
    margin: 0 40px; 
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%; 
}

.search-icon {
    position: absolute;
    left: 10px;
    color: #888;
    font-size: 1.1rem;
    pointer-events: none;
}

.navbar-search input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box; 
}

.navbar-search input:focus {
    border-color: #007bff;
}

/* 4. Estilos de las Acciones */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.action-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    /* Color Naranja para Perfil/Carrito */
    color: #fc5e27; 
    transition: color 0.3s;
}

.action-item:hover {
    color: #007bff;
}

.avatar-icon {
    font-size: 2rem;
    /* Color Naranja para ícono de Perfil */
    color: #fc5e27; 
    margin-right: 5px;
}

.profile-text {
    font-weight: 600;
}

.cart {
    position: relative;
}

.cart-icon {
    font-size: 1.8rem;
    /* Color Naranja para ícono de Carrito */
    color: #fc5e27; 
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #ff0000;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    line-height: 1;
    min-width: 10px;
    text-align: center;
}

/* --- ESTILOS DE LOS MENÚS DESPLEGABLES (Perfil y Carrito) --- */
.action-dropdown {
    position: relative;
    display: inline-block; 
}

.dropdown-content {
    display: none; /* Oculto por defecto */
    position: absolute;
    right: 0;
    top: 100%; 
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1050; 
    border-radius: 5px;
    padding: 10px 0;
}

/* CLASE VITAL para mostrar el desplegable con JS */
.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: #f4f4f4;
}

/* Carrito - Estilos Específicos */
.cart-summary {
    padding: 15px;
    text-align: right;
}

.cart-summary p {
    margin: 5px 0;
    color: #555;
    font-size: 0.9rem;
    width: 250px;
}

.cart-total {
    font-weight: bold;
    color: #000;
    margin: 10px 0 15px 0 !important;
    padding-top: 5px;
    border-top: 1px solid #eee;
}

.btn-checkout {
    background-color: #fc5e27;
    color: white !important;
    text-align: center;
    padding: 8px 15px !important;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-checkout:hover {
    background-color: #dd751a;
}

.btn-success {
    background-color: #fc5e27 !important;
    color: white !important;
    text-align: center !important;
    padding: 8px 15px !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    transition: background-color 0.3s !important;
}

.btn-success:hover {
    background-color: #dd751a;
}

/* 5. MENÚ HORIZONTAL DE ESCRITORIO */
.main-menu-desktop {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background-color: #fc5e27; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    padding: 10px 20px; 
    width: 100%;
    
    /* --- PROPIEDADES PARA FIJAR --- */
    position: fixed;
    top: 61px; /* AJUSTADO: Posiciona debajo del navbar principal (~70px) */
    z-index: 1010; 
    
    box-sizing: border-box; 
}

/* --- NUEVOS ESTILOS PARA EL ÍCONO DE MENÚ EN DESKTOP --- */
.hamburger-desktop-link {
    display: flex; 
    align-items: center;
    text-decoration: none;
    color: #ffffff; /* Color Blanco */
    padding: 5px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 20px;
    transition: background-color 0.3s;
}

.hamburger-desktop-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.hamburger-desktop-link i {
    font-size: 1.1rem;
    margin-right: 8px;
}
/* --- FIN ESTILOS MENÚ DESKTOP --- */


.menu-options-wrapper {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    gap: 15px;
    margin: 0 auto; 
    padding-right: 40px; 
}

.main-menu-desktop a {
    text-decoration: none;
    color: #ffffff; 
    padding: 5px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s;
    white-space: nowrap; 
}

.main-menu-desktop a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* 6. ESTILOS DEL BOTÓN DESPLEGABLE DE MONEDA (RECTANGULAR BLANCO) */
.currency-dropdown {
    position: absolute; 
    right: 20px; 
    top: 50%;
    transform: translateY(-50%); 
    display: inline-block;
    z-index: 1100;
}

.dropdown-button {
    background-color: transparent; 
    color: #ffffff; 
    padding: 8px 12px;
    font-size: 0.95rem; 
    font-weight: bold;
    border: none;
    cursor: pointer;
    
    border-radius: 4px; 
    height: auto;
    width: auto; 
    line-height: normal; 
    text-align: left;
    margin-right: 5px; 
}

.dropdown-content { 
    display: none; 
    position: absolute;
    background-color: #f9f9f9;
    min-width: 80px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
}

.dropdown-content a {
    color: #333;
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.desktop-currency-right .dropdown-content {
    right: 0;
}

/* 7. MENÚ VERTICAL MÓVIL Y NUEVA ESTRUCTURA */
.mobile-menu-vertical {
    display: none;
    position: fixed; 
    top: 110px; 
    left: 0;
    width: 70%;
    background-color: #ffffff; /* Fondo Blanco */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 1000; 
    flex-direction: column;
    height: calc(100vh - 75px); 
    padding-top: 10px;
    overflow-y: auto; 
}

.mobile-menu-vertical.open {
    display: flex; 
}

.mobile-currency-top {
    position: absolute;
    top: 30px;
    right: 15px; 
    color: #fc5e27 !important; /* Botón de moneda naranja sobre fondo blanco */
}

.mobile-currency-top .dropdown-content {
    right: 0; 
}

/* --- ESTILOS PARA LA NUEVA ESTRUCTURA DEL MENÚ MÓVIL --- */
.mobile-menu-section {
    padding: 15px 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.menu-title {
    font-size: 1.1rem;
    font-weight: bold;
    /* --- CORREGIDO: Todos los títulos son #dd751a --- */
    color: #dd751a; 
    margin-bottom: 5px;
    margin-top: 0;
}

.menu-divider {
    border: 0;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.3); /* Línea divisoria oscura para fondo blanco */
    margin: 5px 0 15px 0;
}

.mobile-menu-section .menu-item {
    /* --- CORREGIDO: Todos los subtítulos/enlaces son #893e08 --- */
    color: #893e08; 
    padding: 10px 0; 
    text-decoration: none;
    display: block; 
    border-bottom: none; 
    font-size: 1rem;
    font-weight: 500; /* Añadido para hacerlos un poco más visibles */
}

/* Sobrescribe cualquier estilo de subtítulo anterior para asegurar que todos son #893e08 */
.mobile-menu-section .sub-title {
    color: #893e08; 
    font-weight: 500;
}

.mobile-menu-section .menu-item:hover {
    background-color: #f4f4f4; /* Hover suave */
}
/* --- FIN ESTILOS NUEVA ESTRUCTURA --- */


/* 8. RESPONSIVE DESIGN */

/* 8.1. Escritorio y Tablet (min-width: 481px) */
@media (min-width: 481px) {
    .hamburger-icon {
        display: none !important; 
    }
    
    .main-menu-desktop {
        display: flex;
    }
    
    .navbar-search {
        display: flex;
    }
    
    .profile-text {
        display: inline;
    }
    
    .logo-img {
        width: 15vw;
    }
    
    .currency-dropdown:hover .dropdown-content {
        display: block;
    }

    /* Asegura que el botón de divisa móvil sea naranja si el fondo del menú es blanco */
    .mobile-currency-top .dropdown-button {
        color: #fc5e27;
    }
}


/* 8.2. Tablet y Móvil (max-width: 768px) */
@media (max-width: 768px) {
    
    /* AJUSTADO: Espacio para una sola barra fija (~70px) */
    body {
        padding-top: 70px; 
    }
    
    .navbar-search,
    .main-menu-desktop {
        display: none;
    }
    
    .hamburger-desktop-link {
        display: none;
    }
    
    .profile-text {
        display: none;
    }
    
    .logo-img {
        width: 20vw; 
        min-width: 70px; 
    }

    .mobile-currency-top .dropdown-button {
        color: #fc5e27;
    }

    /* --- Mobile-menu  ---*/
    .mobile-menu-vertical {
        top: 56px;         
    }
    
    /* --- Footer en Móvil --- */
    
    /* AJUSTE CRÍTICO 1: Asegura que la fila 1 ocupe el 100% y se centre */
    .footer-row-1 {
        flex-direction: column;
        align-items: center;
        
        /* ¡VITAL! Eliminamos cualquier forzado de ancho y usamos 100% */
        min-width: 100% !important; 
        width: 100% !important; 
        padding: 30px 0; 
        box-sizing: border-box;
    }
    
    /* AJUSTE CRÍTICO 2: Aplicar box-sizing a las columnas y usar padding interno */
    .footer-col, 
    .footer-col-logo {
        width: 100% !important; /* Forzamos 100% */
        max-width: 300px; 
        text-align: center;
        margin-bottom: 25px;
        box-sizing: border-box; 
        padding: 0 5%; /* El padding ahora está DENTRO de la columna */
    }

    /* Sobrescribimos el padding de .footer-col-logo si es necesario, pero el anterior ya lo cubre */
    .footer-row-1 .footer-col-logo {
        padding: 0 5%;
    }

    .social-links {
        justify-content: center;
    }
    
    /* Copyright apilado (Fila 2) */
    .footer-row-2 {
        flex-direction: column;
        padding: 10px 5%;
        width: 100% !important; /* Asegurar que la fila 2 también respete el ancho */
        box-sizing: border-box;
    }

    .footer-col-secondary {
        width: 100%;
        margin: 5px 0;
        box-sizing: border-box;
    }
    
    .footer-col-copyright {
        order: 1; 
        max-width: 90%;
    }
    .footer-col-ddr {
        order: 2;
    }
    .footer-col-bank {
        order: 3;
    }
}

/* 8.3. Teléfono Móvil (max-width: 480px) */
@media (max-width: 480px) {
    .hamburger-icon {
        display: block !important; 
    }

    /* AJUSTADO: Espacio para una sola barra fija (~70px) */
    body {
        padding-top: 55px;
    }
    
    /* Asegura que el color del enlace en la divisa móvil sea oscuro si el botón es oscuro */
    .mobile-currency-top a {
        color: #333333; /* Color oscuro para los enlaces del desplegable de moneda */
    }

    .logo-img {
        width: 35vw;
    }
}

/* ------------------------------------------- */
/* 9. FOOTER (PIE DE PÁGINA) */
/* ------------------------------------------- */

.main-footer {
    width: 100%;
    box-sizing: border-box;
}

/* --- FILA 1: Principal (5 Columnas) --- */
.footer-row-1 {
    background-color: #873e07; 
    color: white; 
    display: flex;
    justify-content: space-between;
    padding: 40px 5%;
    flex-wrap: wrap; 
    /* ELIMINADA: min-width: 900px; */ 
}

.footer-col {
    width: 170px; /* AJUSTE: Ancho reducido para las columnas de enlace */
    margin: 15px 0;
}

.footer-col-logo {
    width: 200px; 
}

.footer-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid #fc5e27; 
    padding-bottom: 5px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #fc5e27; 
}

.footer-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%; 
    
    /* ESTILOS INICIALES */
    background-color: white; 
    color: #dd751a !important; /* Usamos !important para sobrescribir el color de Font Awesome */
    
    font-size: 1.2rem !important;
    transition: all 0.3s;
}

.social-icon:hover {
    /* ESTILOS HOVER INVERTIDOS */
    background-color: #dd751a; 
    color: white !important; 
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* --- FILA 2: Copyright (3 Columnas) --- */

.footer-row-2 {
    background-color: #fc5e27; 
    color: black; 
    display: flex;
    justify-content: space-between; /* AJUSTE: Para pegar los logos a los extremos */
    align-items: center;
    padding: 15px 5%;
    font-size: 0.85rem;
    flex-wrap: wrap; 
}

.footer-col-secondary {
    display: flex;
    align-items: center;
    flex-grow: 1; 
    padding: 5px 10px;
}

/* AJUSTE PARA EL LOGO DDR: Alineación a la izquierda */
.footer-col-ddr {
    justify-content: flex-start;
    flex-grow: 0; 
    width: 20%; 
    text-align: left;
}

.footer-col-copyright {
    justify-content: center;
    max-width: 65%; /* Espacio para centrar el texto */
    color: #fff;
}

/* AJUSTE PARA EL LOGO BANCO: Alineación a la derecha */
.footer-col-bank {
    justify-content: flex-end;
    flex-grow: 0; 
    width: 20%;
    text-align: right;
}

.footer-logo1-small {
    height: auto; 
    width: 100px;
    max-width: 100%; /* VITAL: Para evitar el desbordamiento en filas */
}

.footer-logo2-small {
    height: auto; 
    width: 200px;
    max-width: 100%; /* VITAL: Para evitar el desbordamiento en filas */
}

/* Estilos para el botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed; /* Mantiene el botón en su posición al hacer scroll */
    width: 60px; /* Ancho del botón */
    height: 60px; /* Alto del botón */
    bottom: 40px; /* Distancia desde la parte inferior */
    right: 40px; /* Distancia desde la parte derecha */
    background-color: #dd751a; /* Color de fondo especificado */
    color: #FFF; /* Color del icono blanco */
    border-radius: 50%; /* Lo hace completamente redondo/ovalado */
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100; /* Asegura que esté por encima de otros elementos */
    display: flex; /* Para centrar el icono */
    justify-content: center; /* Centrar horizontalmente */
    align-items: center; /* Centrar verticalmente */
    transition: background-color 0.3s; /* Transición para el efecto hover */
}

/* Efecto al pasar el ratón (opcional) */
.whatsapp-float:hover {
    background-color: #b35e16; /* Un color ligeramente más oscuro al pasar el ratón */
}

/* Ajuste del icono dentro del botón */
.whatsapp-icon {
    margin-top: 0; /* Elimina cualquier margen superior por defecto de Font Awesome */
}

/* Media Query para dispositivos móviles: reducir el tamaño y la distancia */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}

section[id] {
    scroll-margin-top: 125px; 
}

