/* ==========================================================================
   1. CONFIGURACIÓN GLOBAL E IMPORTACIONES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');


/* 1. VARIABLES Y BASE */
:root {
    --verde-oscuro-amazon: #ECAB0F;   
    --verde-medio-amazon: #ECAB0F;
    --verde-claro-amazon: #ECAB0F27;    
    --verde-brillante: #03A62C;       
    --blanco: #FFFFFF;
    --texto-oscuro: #0F1111;
    --naranja-amazon: #f39c12;
    --glass-bg: rgba(15, 17, 17, 0.9);
}


/* Desactiva el zoom por doble toque en toda la página */
html, body {
        touch-action: manipulation;
    -webkit-text-size-adjust: 100%; /* Evita cambios de fuente extraños */

    font-family: 'Montserrat', sans-serif;
    background-color: #f4f7f6;

    overflow-y: auto;  /* Activa el scroll vertical */
    overflow-x: hidden;
    scrollbar-width: thin; /* Barra de scroll fina para Firefox */
    scrollbar-color:var(--verde-medio-amazon) #f1f1f1;
}



/* Aplicado específicamente a elementos interactivos para máxima respuesta */
a, button, .btn, .input-qty-global {
    touch-action: manipulation;
    user-select: none; /* Evita que se seleccione el texto al cliquear rápido */
}


/* --- BURBUJA DE MONTO FLOTANTE --- */
.nav-main-item {
    position: relative;
    top: -25px; /* Elevación del botón central */
}

.monto-flotante {
    position: absolute;
    top: -65px; /* Justo sobre el botón Squircle */
    left: 50%;
    transform: translateX(-50%);
    background: var(--verde-medio-amazon);
    color: var(--blanco);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.90rem;
    font-weight: 800;
    white-space: nowrap;
    border: 2px solid #fff;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
    z-index: 10;
    animation: bouncePop 2s infinite ease-in-out;
}

/* Indicador de flecha para la burbuja */
.monto-flotante::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

/* Animación sutil de rebote */
@keyframes bouncePop {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}



.main-btn {
    width: 60px;
    height: 60px;
    background: var(--verde-medio-amazon);
    box-shadow: 0 8px 15px rgba(236, 171, 15, 0.3);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.7rem;
    border: 4px solid #f4f7f6; /* Cambia esto al color de fondo de tu web */
    transition: transform 0.2s ease;
}

.main-btn:active {
    transform: scale(0.9);
}x/* Ajuste de etiquetas */
.nav-label {
    font-size: 0.62rem; /* Tamaño optimizado para móviles */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
    opacity: 0.8;
}

.nav-item-link{
    color: var(--blanco);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item-link.active .nav-label {
    opacity: 1;
    color: var(--blanco);

}

/* Etiqueta especial para el botón central */
.main-label {
    position: absolute;
    bottom: -18px;
    width: 100%;
    text-align: center;
    color: var(--blanco);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Reajustamos la altura de la barra para que quepan los textos */
.glass-nav {
    
    height: 75px; /* Un poco más alta para las etiquetas */
    background: var(--verde-medio-amazon);
    backdrop-filter: blur(15px);
    border-radius: 25px 25px 0px 0px;
}

/* Ajuste de iconos para dar espacio al texto */
.nav-item-link i {
    font-size: 1.3rem;
    color: var(--blanco);
}

/* Evitar que el nombre de usuario muy largo rompa el diseño */
.nav-label {
    display: block;
    color: var(--blanco);
    font-size: 0.7rem;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ==========================================================================
   2. NAVEGACIÓN PRINCIPAL (HEADER PROFESIONAL)
   ========================================================================== */
.navbar-principal {
    background: var(--verde-medio-amazon);
    backdrop-filter: blur(15px);
    padding: 12px 0;
    color: var(--blanco);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Logo */
.logo img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.logo:hover img {
    transform: scale(1.02);
}

/* Buscador Desktop */
.buscador-wrapper .btn {
    z-index: 5;
    font-size: 1.1rem;
    padding-right: 15px;
    color: var(--verde-oscuro-amazon) !important;
}

.buscador-wrapper{
    width: 100% !important;
    border-radius: 8px !important;
    border: none !important;
    padding: 10px 45px 10px 15px !important;
    font-size: 0.95rem !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    height: 42px;
}

.buscador-wrapper:focus {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    border-color: var(--verde-oscuro-amazon) !important;
    background-color: #fff !important;
}

.buscador-input {
    width: 100% !important;
    border-radius: 8px !important;
    border: none !important;
    padding: 10px 45px 10px 15px !important;
    font-size: 0.95rem !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    height: 42px;
}

.buscador-input:focus {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    border-color: var(--verde-oscuro-amazon) !important;
    background-color: #fff !important;
}



/* Dropdowns (Zona/Moneda/Usuario) */
.btn-outline-light {
    border: 1px solid rgba(255,255,255,0.3) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1) !important;
    color: var(--blanco) !important;
    border-color: var(--blanco) !important;
}

/* Carrito Siempre Visible */
.btn-cart {
    background: rgba(255,255,255,0.1);
    color: var(--blanco);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
}

.btn-cart:hover {
    background: rgba(255,255,255,0.2);
    color: var(--blanco);
}

.badge-carrito {
    /* Posicionamiento preciso en la esquina superior derecha */
    top: 5px !important;
    right: auto !important;
    left:23px !important;
    transform: translate(30%, -30%);
    
    /* Forzar forma circular perfecta */
    width: 25px;
    height: 25px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    /* Estética */
    font-size: 0.80rem;
    font-weight: 800;
    padding: 0 !important; /* Quitamos padding para que no se deforme */
    background-color: var(--blanco)!important; 
    color: #000000 !important; 
    /*  border: 2px solid var(--black);  Tu color verde oscuro */
    
    /* Asegurar que siempre esté encima */
    z-index: 10;
}



.badge-carrito-movil {
    /* Posicionamiento preciso en la esquina superior derecha */
    top: 0px !important;
    right: auto !important;
    left:25px !important;
    transform: translate(30%, -30%);
    
    /* Forzar forma circular perfecta */
    width: 30px;
    height: 30px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    /* Estética */
    font-size: 0.80rem;
    font-weight: 800;
    padding: 0 !important; /* Quitamos padding para que no se deforme */
    background-color: #ffffff !important; 
    color: #000000 !important; 
    border: 2px solid var(--verde-medio-amazon);/* Tu color verde oscuro */
    
    /* Asegurar que siempre esté encima */
    z-index: 10;
}





/* Login Link */
.btn-login {
    color: var(--blanco);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.2s;
    display: flex;
    align-items: center;
}

.btn-login:hover {
    background: rgba(255,255,255,0.1);
}

/* ==========================================================================
   3. SUBMENÚ Y CATEGORÍAS (BARRA INFERIOR)
   ========================================================================== */
.navbar-submenu {
    background: var(--verde-medio-amazon);
    border-top: 1px solid rgba(255,255,255,0.1) !important;
}

.submenu-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: 0.3s;
}

.submenu-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 0;
    background-color: var(--naranja-amazon);
    transition: width 0.3s ease;
}

.submenu-link:hover {
    color: var(--blanco);
}

.submenu-link:hover:after {
    width: 100%;
}

/* Scroll de categorías móvil */
.cat-container {
    background: var(--verde-medio-amazon);
    display: flex;
    padding: 5px 2%;
    gap: 5px;
    overflow-x: auto;
    white-space: nowrap;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ==========================================================================
   Ofertas del Día Destacadas
   ========================================================================== */

.ofertas {
background-color: var(--verde-claro-amazon)

}




/* ==========================================================================
   4. PRODUCTOS Y GRILLA
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    padding: 30px 2%;
}


.badge-oferta{
    top: 10px !important;
    font-size: 0.55rem !important;
    padding: 5px 10px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    background-color: var(--naranja-amazon) !important;
    color: var(--blanco) !important;
}

.badge-oferta-carrito{
    top: 0px !important;
    font-size: 0.55rem !important;
    padding: 5px 10px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    background-color: var(--naranja-amazon) !important;
    color: var(--blanco) !important;
}


.badge-carrito-global{
    top: 10px !important;
    right:  15px !important;
    font-size: 0.55rem !important;
    padding: 3px 8px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    background-color: #000000 !important;
    color: var(--blanco) !important;
}


.product-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    display: flex;
    width:100%;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-img{
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom:5px;
}

.product-title {
    color: var(--texto-oscuro);
    font-size: 0.75rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.price {
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--verde-medio-amazon);
    margin-bottom: -10px;


}

.price-ofert {
    font-weight: 500;
    font-size: 0.50rem;
    color: var(--texto-oscuro);
    margin-bottom: -7.5px;


}



/* ==========================================================================
   5. CHECKOUT Y FORMULARIOS
   ========================================================================== */
.admin-form {
    background: var(--blanco);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.payment-info-box {
    background: #00000021;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid var(--verde-brillante);
}

/* ==========================================================================
   6. RESPONSIVE Y AJUSTES MÓVIL
   ========================================================================== */
@media (max-width: 768px) {
    .navbar-principal {
        padding: 10px 0;
    }
    
    .logo img {
        width: 150px;
    }

    .buscador-input {
        height: 38px;
        font-size: 0.85rem !important;
    }

    .nav-icons {
        gap: 8px;
    }

    /* Ocultamos textos para ahorrar espacio en móvil */
    .btn-login span, .btn-outline-light {
        display: none !important;
    }
}

/* Estilo para Escritorio (Tu código original) */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #000000;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    line-height: 60px;
    z-index: 100;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease; /* Suaviza cambios */
}

/* --- ESTILO PARA VISTA MÓVIL --- */
@media (max-width: 767px) {
    .whatsapp-float {
        bottom: 100px;   /* Un poco más cerca del borde */
        right: 10px;    /* Un poco más cerca del borde */
        width: 50px;    /* Más pequeño para no tapar contenido */
        height: 50px;
        font-size: 25px; 
        line-height: 50px;
        box-shadow: 1px 1px 5px rgba(0,0,0,0.3);
    }
}


    .order-card {
        transition: transform 0.2s ease;
        border: none !important;
        background: #ffffff;
    }
    .order-card:active { transform: scale(0.98); }
    .status-indicator { width: 4px; border-radius: 4px 0 0 4px; }
    .btn-detail { font-size: 0.85rem; font-weight: 600; }
    .order-icon {
        width: 40px;
        height: 40px;
        background: #f8f9fa;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }


    .animate-pulse {
        animation: pulse-red 2s infinite;
    }
    @keyframes pulse-red {
        0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
        70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
        100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
    }


    .navbar-submenu .dropdown-item {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.navbar-submenu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #ECAB0F;
}

/* Quitar la flechita de Bootstrap si prefieres un look más limpio */
.navbar-submenu .dropdown-toggle::after {
    display: none;
}


.input-group {
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
}

.input-group:focus-within {
    border-color: #ECAB0F !important;
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
}

.form-control:focus {
    background-color: transparent;
}

.btn-light:hover {
    background-color: #e9ecef;
}

.address-card {
    transition: transform 0.2s ease, border 0.2s ease;
    border: 1px solid transparent !important;
    cursor: pointer;
}

.address-card:hover {
    transform: scale(1.01);
    border-color: #e0e0e0 !important;
}

.active-address {
    border-left: 4px solid #ECAB0F !important;
    background-color: #f0fdf4 !important; /* Un verde muy suave para la principal */
}

.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Scroll para el listado de categorías */
.custom-dropdown {
    max-height: 400px; /* Altura máxima antes de activar el scroll */
    overflow-y: auto;  /* Activa el scroll vertical */
    overflow-x: hidden;
    scrollbar-width: thin; /* Barra de scroll fina para Firefox */
    scrollbar-color:var(--verde-medio-amazon) #f1f1f1;
}

/* Estilo de la barra de scroll para Chrome, Safari y Edge */
.custom-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-dropdown::-webkit-scrollbar-thumb {
    background: #ECAB0F;
    border-radius: 10px;
}

.custom-dropdown::-webkit-scrollbar-thumb:hover {
    background: #ECAB0F;
}

/* Ajuste para móviles: asegurar que el dropup no quede pegado al dock */
.menu-movil-premium .dropdown-menu {
    bottom: 90% !important; /* Lo eleva un poco más sobre el dock */
    margin-bottom: 0px !important;
}




.text-welcome {
    color: var(--blanco);
    font-size: 0.6rem;
    font-weight: 500;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--blanco);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}


.text-welcome2{
    color: var(--blanco);
    font-size: 0.60rem;
    font-weight: 500;
}

.user-name2{
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--blanco);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0px;
}

/* Círculo para el icono de la derecha */
.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--blanco);
}

.icon-circle2{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--blanco);
}




/* Animación opcional para la mano */
.wave-emoji {
    display: inline-block;
    animation: wave 2.5s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% { transform: rotate( 0.0deg) }
   10% { transform: rotate(14.0deg) }
   20% { transform: rotate(-8.0deg) }
   30% { transform: rotate(14.0deg) }
   40% { transform: rotate(-4.0deg) }
   50% { transform: rotate(10.0deg) }
   60% { transform: rotate( 0.0deg) }
  100% { transform: rotate( 0.0deg) }
}



/* Estilo para Escritorio (Tu código original) */
#btn-subir{
    display: none; /* Oculto por defecto */
    position: fixed;
    height: 58px;
    width: 58px;
    z-index: 9999;
    border: none;
    outline: none;
    color: white;
    cursor: pointer;
    border-radius: 50%; /* Circular */
    font-size: 22px;
    transition: transform 0.3s, background-color 0.3s;
    bottom:100px;
    right: 30px;
    background-color: var(--verde-medio-amazon);
}

/* --- ESTILO PARA VISTA MÓVIL --- */
@media (max-width: 767px) {
    #btn-subir{
        bottom: 160px;   /* Un poco más cerca del borde */
        right: 10px;    /* Un poco más cerca del borde */
        width: 50px;    /* Más pequeño para no tapar contenido */
        height: 50px;
        font-size: 25px; 
        line-height: 50px;
        box-shadow: 1px 1px 5px rgba(0,0,0,0.3);
    }
}