/* ============================================
   CSS CRÍTICO - PREVENIR FLASH DE CABECERA
   Este bloque DEBE estar primero para cargar antes que todo
   ============================================ */

@media (max-width: 921px) {

    /* Máxima prioridad - Ocultar cabecera de Astra INMEDIATAMENTE */
    html .site-header,
    html body .site-header,
    html #ast-mobile-header,
    html body #ast-mobile-header,
    html .ast-mobile-header-wrap,
    html body .ast-mobile-header-wrap,
    html .ast-mobile-popup-drawer,
    html body .ast-mobile-popup-drawer,
    html .ast-mobile-header-content,
    html body .ast-mobile-header-content,
    html header.site-header,
    html body header.site-header,
    html header#masthead,
    html body header#masthead,
    html .ast-header-break-point .site-header,
    html .ast-header-break-point #ast-mobile-header {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }

    .woocommerce-js ul.cart_list li>a,
    .woocommerce-js ul.product_list_widget li>a {
        margin-left: 5px;
    }

    .woocommerce-js ul.cart_list li dl,
    .woocommerce-js ul.product_list_widget li dl {
        padding-left: 6px;
    }
}

/* Mobile Navigation Bar Styles */

.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    background: rgb(56 10 71 / 90%);
    padding: 0px 0;
    z-index: 99999999;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    padding: 0px 5px;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: none !important;
    border: none;
    font-family: inherit;
    outline: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transform: scale(1);
    transition: none;
    /* Sin transición al cargar */
    justify-content: flex-end;
    /* Alinea items al fondo */
    padding-bottom: 0px;
    /* Espacio inferior fijo */
}

/* Habilitar transiciones después de cargar */
.mobile-nav-bar.nav-ready .mobile-nav-item {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Eliminar estilos de enlace predeterminados - PREVIENE FLASH CELESTE */
.mobile-nav-item:link,
.mobile-nav-item:visited,
a.mobile-nav-item,
a.mobile-nav-item:link,
a.mobile-nav-item:visited,
a.mobile-nav-item:hover {
    color: #ffffff !important;
    text-decoration: none !important;
    background: none !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Efecto de presionar - tap/click */
.mobile-nav-item:active {
    transform: scale(0.92);
    background: none !important;
    outline: none !important;
}

.mobile-nav-item:active .nav-icon {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.mobile-nav-item:focus,
.mobile-nav-item:focus-visible,
.mobile-nav-item:focus-within {
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Force no background on buttons specifically */
button.mobile-nav-item,
button.mobile-nav-item:hover,
button.mobile-nav-item:focus,
button.mobile-nav-item:focus-visible {
    background: none !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

button.mobile-nav-item:active {
    background: none !important;
    transform: scale(0.92);
}

.nav-icon {
    position: relative;
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
    transition: none;
    height: 35px;
    /* Altura fija para alineación */
    /* Sin transición al cargar */
}

/* Habilitar transiciones después de cargar */
.mobile-nav-bar.nav-ready .nav-icon {
    transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animación para botones cuando su drawer está activo */
.mobile-nav-item.drawer-active .nav-icon {
    animation: activeDrawerPulse 2s ease-in-out infinite;
}

@keyframes activeDrawerPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    transition: none;
    /* Sin transición al cargar */
}

/* Habilitar transiciones después de cargar */
.mobile-nav-bar.nav-ready .nav-icon svg {
    transition: fill 0.3s ease;
}

.custom-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mobile-nav-item span {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 1px;
}

/* Cart Count Badge */
.cart-count {
    position: absolute;
    top: -4px;
    right: -13px;
    background: #9402ff;
    color: #fff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 2px;
    box-shadow: 2px 3px 4px 0px rgb(0 0 0 / 45%);
    animation: cartPulse 0.3s ease;
}

@keyframes cartPulse {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.cart-count:empty {
    display: none;
}

/* Hide on desktop */
@media (min-width: 922px) {

    .mobile-nav-bar,
    .scroll-up-bar,
    .mobile-drawer {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}

/* Ensure proper spacing on mobile */
@media (max-width: 921px) {
    body:not(.woocommerce-checkout) {
        padding-bottom: 70px !important;
    }

    /* Hide Astra headers */
    .site-header,
    #ast-mobile-header,
    .ast-mobile-header-wrap,
    .ast-mobile-popup-drawer {
        display: none !important;
    }

    /*letras blancas en carrito*/
    .woocommerce-js ul.cart_list li a,
    .woocommerce-js ul.product_list_widget li a {
        color: #ffffff !important;
    }

    .woocommerce-js .widget_shopping_cart .total strong,
    .woocommerce-js.widget_shopping_cart .total strong {
        color: #ffffff !important;
    }

    .woocommerce-js ul.cart_list li dl,
    .woocommerce-js ul.product_list_widget li dl {
        border-left: #473760 !important;
        ;
    }
}

/* Animation for items */
.mobile-nav-item {
    animation: slideUp 0.5s ease backwards;
}

.mobile-nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-nav-item:nth-child(2) {
    animation-delay: 0.15s;
}

.mobile-nav-item:nth-child(3) {
    animation-delay: 0.2s;
}

.mobile-nav-item:nth-child(4) {
    animation-delay: 0.25s;
}

.mobile-nav-item:nth-child(5) {
    animation-delay: 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.mobile-nav-bar.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile Drawers */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 55px;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    /* IMPORTANTE: Evita interacción cuando está oculto */
    transition: none;
    /* Sin transición al cargar */
}

/* Habilitar transiciones después de cargar */
.mobile-drawer.transitions-ready {
    transition: visibility 0s linear 0.3s, opacity 0.3s ease;
}

.mobile-drawer.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

/* Backdrop */
.drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 1;
}

.mobile-drawer.active .drawer-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

/* Drawer Content - Efecto de abajo hacia arriba con margen izquierdo */
.drawer-content {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15%;
    right: 0;
    width: 85%;
    max-width: none;
    height: 100%;
    transform: translateY(100%);
    transition: none;
    /* Sin transición al cargar */
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    z-index: 10;
    border-top-left-radius: 20px;
}

.mobile-drawer.transitions-ready .drawer-content {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.active .drawer-content {
    transform: translateY(0);
}

/* Search Drawer - También con margen izquierdo y desde abajo */
.search-drawer .drawer-content {
    top: 0;
    bottom: 0;
    left: 15%;
    right: 0;
    width: 85%;
    max-width: none;
    height: 100%;
    border-top-left-radius: 20px;
    transform: translateY(100%);
}

.search-drawer.active .drawer-content {
    transform: translateY(0);
}

/* Drawer Header */
.drawer-header {
    background: rgb(34 10 71 / 70%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #380a47;
    flex-shrink: 0;
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Close Button */
.close-drawer {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    color: #ffffff;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    font-weight: 300;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.close-drawer:hover,
.close-drawer:focus {
    background: rgb(150 85 219 / 70%);
    color: #ffffff;
    transform: rotate(90deg);
    outline: none !important;
}

/* Drawer Body */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    background: rgb(119 130 155 / 70%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative;
    z-index: 1;
}

.drawer-body::-webkit-scrollbar {
    width: 6px;
}

.drawer-body::-webkit-scrollbar-track {
    background: #f9f9f9;
}

.drawer-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Menu Styles */
.mobile-menu {
    padding: 0;
    margin: 0;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    border-bottom: 1px solid #380a47;
    position: relative;
}

.mobile-menu li:last-child {
    border-bottom: none;
}

.mobile-menu a {
    display: block;
    padding: 16px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
    font-weight: 400;
}

.mobile-menu a:hover,
.mobile-menu a:focus,
.mobile-menu li.current-menu-item>a {
    background: rgb(135 0 255 / 70%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding-left: 30px;
}

/* Submenu */
.mobile-menu .sub-menu {
    display: none;
}

.mobile-menu .sub-menu a {
    padding: 12px 20px 12px 40px;
    font-size: 14px;
    color: #ffffff;
    background: rgb(136 122 159 / 40%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.mobile-menu .sub-menu a:hover {
    background: rgb(150 85 219 / 70%);
    color: #ffffff;
    padding-left: 50px;
}

/* Submenu Toggle */
.mobile-menu .menu-item-has-children {
    position: relative;
}

.mobile-menu .menu-item-has-children>a {
    position: relative;
}

.submenu-toggle {
    position: absolute;
    right: 10px;
    top: 6px;
    color: #ffffff;
    background: transparent !important;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    z-index: 10;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.submenu-toggle svg {
    width: 12px;
    height: 12px;
    stroke: #666;
    transition: transform 0.3s ease;
}

.submenu-toggle.open svg {
    transform: rotate(180deg);
}

.submenu-toggle:hover,
.submenu-toggle:focus {
    color: #ffffff;
    outline: none !important;
}

/* ============================================
   FIBOSEARCH / DGWT - ESTILOS FORZADOS
   ============================================ */

/* Contenedor principal del drawer de búsqueda */
.search-drawer .drawer-body {
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    max-height: 100% !important;
}

/* Ocultar elementos innecesarios de Fibosearch */
.search-drawer .dgwt-wcas-enable-mobile-form,
.search-drawer .dgwt-wcas-search-icon.js-dgwt-wcas-search-icon-handler,
.search-drawer .dgwt-wcas-search-icon-arrow {
    display: none !important;
}

/* Wrapper principal de Fibosearch */
.search-drawer .dgwt-wcas-search-wrapp {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Formulario de búsqueda */
.search-drawer .dgwt-wcas-search-form {
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Contenedor del input y botón */
.search-drawer .dgwt-wcas-sf-wrapp {
    width: 65% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    position: relative !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    align-items: center !important;
}

/* Input de búsqueda */
.search-drawer .dgwt-wcas-search-input {
    flex: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    border: 2px solid #ddd !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    background: #fff !important;
    color: #333 !important;
    outline: none !important;
    height: 52px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

.search-drawer .dgwt-wcas-search-input:focus {
    border-color: #0073aa !important;
    box-shadow: 0 2px 12px rgba(0, 115, 170, 0.2) !important;
    outline: none !important;
}

/* Preloader */
.search-drawer .dgwt-wcas-preloader {
    display: none !important;
}

.search-drawer .dgwt-wcas-voice-search {
    display: none !important;
}

/* Botón de búsqueda */
.search-drawer .dgwt-wcas-search-submit,
.search-drawer button[type="submit"] {
    flex-shrink: 0 !important;
    padding: 0 !important;
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3) !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

.search-drawer .dgwt-wcas-search-submit:hover,
.search-drawer .dgwt-wcas-search-submit:focus,
.search-drawer button[type="submit"]:hover,
.search-drawer button[type="submit"]:focus {
    background: #005a87 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4) !important;
    outline: none !important;
}

.search-drawer .dgwt-wcas-search-submit svg,
.search-drawer button[type="submit"] svg {
    width: 20px !important;
    height: 20px !important;
    fill: #fff !important;
    display: block !important;
}

/* Asegurar que el botón de submit de Fibosearch sea visible */
.search-drawer .js-dgwt-wcas-search-submit {
    display: flex !important;
    visibility: visible !important;
}

/* Contenedor de sugerencias - FIX PARA QUE NO SE SALGA */
.search-drawer .dgwt-wcas-suggestions-wrapp,
.search-drawer .dgwt-wcas-suggestions-wrapp.dgwt-wcas-open,
.search-drawer .dgwt-wcas-suggestions-wrapp.dgwt-wcas-full-width,
.search-drawer .dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp-visible {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    height: auto !important;
    overflow: hidden !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    flex: 1 !important;
    min-height: 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    box-sizing: border-box !important;
}

/* Contenedor interno de sugerencias */
.search-drawer .dgwt-wcas-suggestions-wrapp>div {
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Lista de sugerencias */
.search-drawer .dgwt-wcas-suggestions {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Items de sugerencia */
.search-drawer .dgwt-wcas-suggestion {
    padding: 12px 15px !important;
    border-bottom: 1px solid #380a47 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.search-drawer .dgwt-wcas-suggestion:last-child {
    border-bottom: none !important;
}

.search-drawer .dgwt-wcas-suggestion:hover,
.search-drawer .dgwt-wcas-suggestion.dgwt-wcas-suggestion-selected {
    background: #f9f9f9 !important;
}

/* Imagen del producto */
.search-drawer .dgwt-wcas-suggestion-product-image {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
}

.search-drawer .dgwt-wcas-suggestion-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

/* Detalles del producto */
.search-drawer .dgwt-wcas-suggestion-product-details {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.search-drawer .dgwt-wcas-suggestion-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 5px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.search-drawer .dgwt-wcas-suggestion-price {
    font-size: 14px !important;
    color: #0073aa !important;
    font-weight: 600 !important;
}

/* Sin resultados */
.search-drawer .dgwt-wcas-suggestion-no-results {
    padding: 40px 20px !important;
    text-align: center !important;
    color: #666 !important;
    font-size: 15px !important;
}

/* Ocultar el wrapper de sugerencias cuando está vacío o sin buscar */
.search-drawer .dgwt-wcas-suggestions-wrapp:empty,
.search-drawer .dgwt-wcas-suggestions-wrapp:not(.dgwt-wcas-open):not(:has(.dgwt-wcas-suggestion)) {
    display: none !important;
}

/* Mostrar solo cuando hay contenido */
.search-drawer .dgwt-wcas-suggestions-wrapp.dgwt-wcas-open,
.search-drawer .dgwt-wcas-suggestions-wrapp:has(.dgwt-wcas-suggestion) {
    display: block !important;
}

/* Estado inicial - ocultar área de resultados */
.search-drawer .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestions:empty {
    display: none !important;
}

/* Footer de sugerencias */
.search-drawer .dgwt-wcas-suggestions-footer {
    padding: 15px !important;
    text-align: center !important;
    border-top: 1px solid #eee !important;
    background: #f9f9f9 !important;
}

.search-drawer .dgwt-wcas-suggestions-footer a {
    color: #0073aa !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.search-drawer .dgwt-wcas-suggestions-footer a:hover {
    text-decoration: underline !important;
}

/* Ocultar overlay mobile de Fibosearch completamente */
.dgwt-wcas-overlay-mobile,
.dgwt-wcas-overlay-mobile-on,
body.dgwt-wcas-mobile-overlay-enabled {
    display: none !important;
    visibility: hidden !important;
}

/* Prevenir que Fibosearch oculte las sugerencias en móvil */
@media (max-width: 921px) {
    .search-drawer .dgwt-wcas-suggestions-wrapp {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
    }
}

/* Standard WooCommerce Search (fallback) */
.search-drawer .woocommerce-product-search {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.search-drawer input[type="search"],
.search-drawer .search-field {
    flex: 1;
    min-width: 0;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.search-drawer input[type="search"]:focus,
.search-drawer .search-field:focus {
    border-color: #0073aa;
    outline: none;
}

.search-drawer button[type="submit"] {
    flex-shrink: 0;
    padding: 15px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.search-drawer button[type="submit"]:hover,
.search-drawer button[type="submit"]:focus {
    background: #005a87;
    outline: none;
}

/* Cart Drawer */
.cart-drawer .drawer-body {
    padding: 0;
}

.cart-drawer .widget_shopping_cart_content {
    padding: 10px;
}

.cart-drawer .woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.cart-drawer .woocommerce-mini-cart-item {
    display: flex;
    gap: 0px;
    padding: 18px 14px 0px 45px !important;
    border-bottom: 1px solid #380a47;
    position: relative;
}

.cart-drawer .woocommerce-mini-cart-item {
    border-bottom: none;
    color: white;
    font-size: 12px;
}

.cart-drawer .woocommerce-mini-cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-drawer .woocommerce-mini-cart-item .remove {
    position: absolute;
    top: 10px;
    right: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc3232;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
    transition: all 0.2s ease;
}

.cart-drawer .woocommerce-mini-cart-item .remove:hover {
    background: #a00;
    transform: scale(1.1);
}

.cart-drawer .woocommerce-mini-cart__total {
    padding: 20px 0;
    font-size: 18px;
    color: white;
    font-weight: 600;
    border-top: 2px solid #333;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

.cart-drawer .woocommerce-mini-cart__buttons {
    display: flex;
    margin-top: 20px;
}

.cart-drawer .button {
    width: 100%;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.cart-drawer .button.wc-forward {
    background: #fff;
    color: #333;
    border: 2px solid #333;
}

.cart-drawer .button.wc-forward:hover {
    background: #333;
    color: #fff;
}

.cart-drawer .button.checkout {
    background: #0073aa;
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.cart-drawer .button.checkout:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.4);
}

.cart-drawer .woocommerce-mini-cart__empty-message {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

/* Body lock */
body.drawer-open {
    overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .drawer-content {
        left: 10%;
        width: 90%;
    }

    .search-drawer .drawer-content {
        left: 10%;
        width: 90%;
    }

    /* Forzar ancho completo de Fibosearch dentro del drawer */
    .search-drawer .dgwt-wcas-search-wrapp {
        width: 100% !important;
        min-width: 100% !important;
        max-width: none !important;
        /* Override user's 300px setting */
    }



    .drawer-header {
        padding: 12px 15px;
        min-height: 50px;
    }

    .drawer-header h3 {
        font-size: 16px;
    }

    .mobile-menu a {
        font-size: 15px;
        padding: 14px 16px;
    }

    .search-drawer .dgwt-wcas-search-input {
        font-size: 14px !important;
        padding: 12px 16px !important;
    }

    .search-drawer .dgwt-wcas-search-submit {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 921px) {

    .woocommerce-js ul.cart_list li a,
    .woocommerce-js ul.product_list_widget li a {
        color: #ffffff !important;
    }
}

@media (max-width: 921px) {

    /* ============================================
    BARRA SECUNDARIA FLOTANTE (Scroll Up)
    ============================================ */
    .scroll-up-bar {
        position: fixed;
        bottom: 55px;
        /* Un poco más arriba de la barra principal (70px) */
        left: 0;
        right: 0;
        width: 70%;
        margin: 0 auto;
        height: 36px;
        background: rgb(185 198 227 / 60%);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        z-index: 99999990;
        /* Debajo de la nav bar principal si se solapan, pero alto */
        transform: translateY(150%);
        /* Oculto por defecto (hacia abajo) */
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
        opacity: 0;
        pointer-events: none;
        border: 1px solid rgba(255, 255, 255, 0.5);
        box-sizing: border-box;
    }

    .scroll-up-bar.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .scroll-up-bar .sec-nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 29px;
        height: 29px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        border: none;
        color: #333;
        padding: 0;
        cursor: pointer;
        transition: background 0.2s;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .scroll-up-bar .sec-nav-item:active {
        background: rgba(0, 0, 0, 0.05);
    }

    .scroll-up-bar .sec-nav-item svg {
        fill: #333;
        width: 22px;
        height: 22px;
    }

    .scroll-up-bar .sec-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        text-decoration: none;
        color: #333;
        font-weight: 600;
    }

    .scroll-up-bar .sec-logo img {
        height: 32px;
        width: auto;
        object-fit: contain;
        max-width: 120px;
    }
}

/* Account Drawer Styles */
.account-drawer .drawer-body {
    padding: 20px;
    color: white;
}

.account-drawer-content {
    max-width: 500px;
    margin: 0 auto;
}

.account-drawer .woocommerce-form-login,
.account-drawer .woocommerce-form-register {
    background: rgb(0 31 255 / 8%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.account-drawer .woocommerce-form-login h2,
.account-drawer .woocommerce-form-register h2 {
    color: #ffffff!important;
    font-size: 20px;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.account-drawer .woocommerce-form__label {
    color: #333 !important;
    font-weight: 500;
}

.account-drawer .woocommerce-Input {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: border-color 0.3s ease !important;
}

.account-drawer .woocommerce-Input:focus {
    border-color: #0073aa !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1) !important;
}

.account-drawer .woocommerce-Button {
    width: 100% !important;
    padding: 15px !important;
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3) !important;
    margin-top: 10px !important;
}

.account-drawer .woocommerce-Button:hover {
    background: #005a87 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.4) !important;
}

.account-drawer .woocommerce-form-row {
    margin-bottom: 15px;
}

.account-drawer .woocommerce-privacy-policy-text,
.account-drawer .woocommerce-LostPassword {
    font-size: 13px !important;
    color: #666 !important;
    margin-top: 10px;
}

.account-drawer .woocommerce-LostPassword a {
    color: #49c3ff !important;
    text-decoration: none !important;
}

.account-drawer .woocommerce-LostPassword a:hover {
    text-decoration: underline !important;
}

.account-drawer .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.account-drawer .woocommerce-form__input-checkbox {
    width: auto !important;
    margin: 0 !important;
}