/* =====================================================================
   FUENTES PERSONALIZADAS - LOCAL
   ===================================================================== */

@font-face {
    font-family: 'Amazon Ember';
    font-style: normal;
    font-weight: 400;
    src: url('../css/font/Ember_Condensed/AmazonEmber_Rg.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Amazon Ember';
    font-style: normal;
    font-weight: 500;
    src: url('../css/font/Ember_Condensed/Amazon-Ember-Medium.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Amazon Ember';
    font-style: normal;
    font-weight: 700;
    src: url('../css/font/Ember_Condensed/AmazonEmber_Bd.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Amazon Ember Condensed';
    font-style: normal;
    font-weight: 400;
    src: url('../css/font/Ember_Condensed/AmazonEmber_Condensed_Rg.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Amazon Ember Condensed';
    font-style: normal;
    font-weight: 700;
    src: url('../css/font/Ember_Condensed/AmazonEmber_Condensed_Bd.ttf') format('truetype');
    font-display: swap;
}

/* =====================================================================
   APLICAR FUENTES A TODO EL SITIO
   ===================================================================== */

body, 
html,
h1, h2, h3, h4, h5, h6,
p, span, div,
a, button, input, textarea,
.navbar, .nav-link,
.o_header_standard,
.o_footer,
.s_text_block,
.oe_search_box,
.btn,
.modal-content,
.offcanvas-body {
    font-family: 'Amazon Ember', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
}

/* Fuente más condensada para encabezados y elementos específicos */
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.btn-primary,
.o_footer_copyright,
.modal-title,
.offcanvas-header {
    font-family: 'Amazon Ember Condensed', 'Amazon Ember', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
}

/* =====================================================================
   ESTILOS PARA EL CONTENEDOR PRINCIPAL DE BÚSQUEDA
   ===================================================================== */

.search-main-container {
    padding: 40px 0;
}

/* Buscadores integrados */
.mobile-search-form {
    display: none;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.desktop-search-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .desktop-search-form {
        display: none;
    }
    
    .mobile-search-form {
        display: block;
    }
}

/* Control manual del menú móvil */
#top_menu_collapse_mobile, 
.offcanvas-backdrop {
    display: none;
}

/* Mostrar cuando está activo */
#top_menu_collapse_mobile.show,
.offcanvas-backdrop.show {
    display: none;
}

/* =====================================================================
   ESTILOS PARA MEJORAS DE JAVASCRIPT
   ===================================================================== */

/* Transiciones suaves para elementos controlados por JS */
.js-loaded * {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Estilos para dispositivos táctiles */
.touch-device button,
.touch-device a {
    min-height: 44px;
    min-width: 44px;
}

.touch-device input,
.touch-device textarea {
    font-size: 16px; /* Previene zoom en iOS */
}

/* Estilos para menú móvil cuando está abierto */
body.menu-open {
    overflow: hidden;
}

/* Mejoras visuales para el modal de búsqueda */
#o_search_modal.show .modal-content {
    animation: modalSlideDown 0.3s ease-out;
}

@keyframes modalSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================================
   ESTILOS PARA EL BOTÓN DE WHATSAPP
   ===================================================================== */

.whatsapp-share {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.whatsapp-share a:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* =====================================================================
   MEJORAS DE ACCESIBILIDAD
   ===================================================================== */

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #4d90fe;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(77, 144, 254, 0.3);
}

/* Remover outline para elementos que no son interactivos */
:focus:not(:focus-visible) {
    outline: none;
}

/* =====================================================================
   OPTIMIZACIÓN DE IMÁGENES
   ===================================================================== */

/* Placeholder para imágenes con lazy loading */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background-color: #f8f9fa;
}

img[data-src].loaded {
    opacity: 1;
}

/* Prevenir layout shift */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =====================================================================
   CLASES UTILITARIAS PARA JAVASCRIPT
   ===================================================================== */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 768px) {
    /* Botón de WhatsApp más pequeño en móviles */
    .whatsapp-share {
        bottom: 70px;
        right: 15px;
    }
    
    .whatsapp-share a {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    /* Ajustes para el modal de búsqueda en móviles */
    #o_search_modal .modal-dialog {
        margin: 0;
        max-width: 100%;
    }
    
    #o_search_modal .modal-content {
        border-radius: 0;
        margin-top: 0;
    }
    
    /* Mejoras para el menú móvil */
    .offcanvas-end {
        width: 100%;
    }
    
    /* Asegurar que los botones sean tocables */
    .navbar-nav .nav-link,
    .btn,
    .oe_search_button {
        padding: 12px 16px;
    }
}

@media (max-width: 576px) {
    /* Ajustes extra para pantallas muy pequeñas */
    .search-main-container {
        padding: 20px 0;
    }
    
    .desktop-search-form,
    .mobile-search-form {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    /* Mejorar legibilidad en móviles */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* =====================================================================
   ESTILOS ESPECÍFICOS PARA FORMULARIOS DE BÚSQUEDA
   ===================================================================== */

.oe_search_box {
    font-family: 'Amazon Ember', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px 0 0 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.oe_search_box:focus {
    border-color: #4d90fe;
    box-shadow: 0 0 0 3px rgba(77, 144, 254, 0.2);
    outline: none;
}

.oe_search_button {
    font-family: 'Amazon Ember Condensed', sans-serif;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 0 4px 4px 0;
    background-color: #007bff;
    color: rgb(0, 0, 0);
    border: none;
    transition: background-color 0.3s ease;
}

.oe_search_button:hover {
    background-color: #0056b3;
}

/* =====================================================================
   ESTILOS PARA EL FOOTER CON FUENTES LOCALES
   ===================================================================== */

.o_footer {
    font-family: 'Amazon Ember', sans-serif;
}

.o_footer_copyright {
    font-family: 'Amazon Ember Condensed', sans-serif;
    font-weight: 400;
}

.o_footer_logo {
    font-family: 'Amazon Ember Condensed', sans-serif;
    font-weight: 700;
}

/* =====================================================================
   ANIMACIONES Y TRANSICIONES
   ===================================================================== */

/* Transición suave para todos los elementos interactivos */
a, 
button,
.nav-link,
.btn,
.oe_search_box,
.oe_search_button {
    transition: all 0.2s ease-in-out;
}

/* Efecto hover para enlaces de navegación */
.nav-link:hover {
    transform: translateY(-1px);
}

/* Efecto hover para botones */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* =====================================================================
   LOADING STATES
   ===================================================================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.oe_search_button,.oe_search_button:hover{ 

    background-color:#ffefe6;
 
}