/* ==========================================================================
   ASTRASHOP - HOJA DE ESTILOS PRINCIPAL (styles.css)
   
   ÍNDICE DE SECCIONES:
   0. Variables y Reseteo Base
   1. Encabezado (Header y Navegación)
   2. Carrusel Principal (Hero Banners)
   3. Marcas Auspiciadoras (Ticker)
   4. Tarjetas de Producto (Diseño Base)
   5. Home: Sección Productos (Tabs y Flechas Flotantes)
   6. Modal de Inicio de Sesión
   7. Pie de Página (Footer)
   8. Responsividad General (Móviles)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =========================================
   0. VARIABLES GLOBALES Y RESETEO
   ========================================= */
:root {
    --primary-blue: #004aad;
    --primary-green: #00a651;
    --hover-green: #008f45;
    --dark-gray: #333333;
    --light-gray: #f4f6f8;
    --border-color: #e1e5eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
}


/* =========================================
   1. ENCABEZADO (HEADER Y NAVEGACIÓN)
   ========================================= */
.site-header {
    background-color: rgba(255, 255, 255, 0.85); /* Blanco semi-transparente */
    backdrop-filter: blur(12px); /* Magia: Desenfoque de lo que pasa por debajo */
    -webkit-backdrop-filter: blur(12px); /* Para Safari/iPhones */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Sombra más suave */
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.header-main {
    max-width: 100%;
    width: 100%;
    padding: 15px 5%;
    display: flex;
    align-items: center;
    gap: 40px;
}

.brand-logo img {
    height: 45px;
    width: auto;
}

.header-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    font-size: 1.1rem;
}

/* 1.1 Barra de Búsqueda */
.header-search {
    flex-grow: 1;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #777;
    border-radius: 30px;
    overflow: visible;
    height: 45px;
    position: relative;
    box-sizing: border-box;
}

/* REEMPLAZA ESTE BLOQUE */
.search-input {
    flex-grow: 1;
    border: none;
    padding: 0 20px;
    height: 100%;
    font-size: 1rem;
    outline: none;
    color: var(--dark-gray);
    background: transparent;
    border-radius: 8px 0 0 8px;
}

.search-btn {
    background-color: #333f48;
    color: white;
    border: none;
    height: 100%;
    width: 60px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s;
    border-radius: 0 8px 8px 0;
}

.search-btn:hover {
    background-color: #1f272d;
}

/* 1.2 Acciones de Usuario y Carrito */
.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.user-dropdown {
    position: relative;
    cursor: pointer;
    padding-right: 15px;
    border-right: 1px solid #ddd;
}

.user-trigger {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-greeting {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.user-action {
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chevron-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1001;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    border-left: 1px solid #eee;
    border-top: 1px solid #eee;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.user-dropdown:hover .chevron-icon {
    transform: rotate(180deg);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-blue);
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 5px 0;
}

.action-icon {
    font-size: 1.5rem;
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.action-icon:hover {
    color: var(--primary-blue);
}

.cart-icon-box {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ff3b30;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-icon-box:hover .cart-badge {
    transform: scale(1.3) translateY(-2px); /* Crece y sube un poquito */
    box-shadow: 0 4px 8px rgba(255, 59, 48, 0.4); /* Sombra roja brillante */
}

/* 1.3 Barra de Navegación Inferior */
.header-nav {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.header-nav .nav-links {
    max-width: 100%;
    margin: 0;
    padding: 10px 5%;
    display: flex;
    gap: 30px;
    list-style: none;
}

.header-nav .nav-links a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.header-nav .nav-links a:hover,
.header-nav .nav-links a.active {
    color: var(--primary-blue);
}


/* =========================================
   2. CARRUSEL PRINCIPAL (HERO BANNERS)
   ========================================= */
.hero-carousel {
    position: relative;
    background-color: #000;
    color: white;
    height: 450px;
    overflow: hidden;
}

.carousel-track-container {
    height: 100%;
    position: relative;
}

.carousel-track {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.carousel-slide.current-slide {
    opacity: 1;
    z-index: 2;
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-indicators {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: white;
    width: 24px;
    border-radius: 10px;
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(255, 255, 255, 0.35);
}


/* =========================================
   3. MARCAS AUSPICIADORAS (TICKER)
   ========================================= */
.marcas-auspiciadoras {
    background-color: #ffffff;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
    width: 100%;
    position: relative;
}

.marcas-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: scrollMarcas 35s linear infinite;
}

.marcas-auspiciadoras:hover .marcas-track {
    animation-play-state: paused;
}

/* CAJAS GIGANTES Y ELEGANTES */
.marca-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 380px;
    /* Ancho gigante */
    height: 130px;
    /* Alto reducido */
    border-right: 1px solid #e1e5eb;
    transition: all 0.3s ease;
    background-color: #ffffff;
    padding: 0;
}

.marca-item:hover {
    background-color: #f4f6f8;
}

/* IMAGEN ENORME PERO CON EL "AIRE" EXACTO */
.marca-item img {
    width: 100%;
    height: 100%;
    padding: 10px 25px;
    /* MAGIA: Solo 10px de aire arriba/abajo y 25px a los lados. ¡Casi no la achica! */
    object-fit: contain;
    /* Mantiene la proporción sin deformar ni cortar */
    filter: grayscale(100%) opacity(50%);
    transition: all 0.3s ease;
    cursor: pointer;
}

.marca-item:hover img {
    filter: grayscale(0%) opacity(100%);
    transform: scale(1.05);
}

@keyframes scrollMarcas {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   4. TARJETAS DE PRODUCTO (DISEÑO BASE)
   ========================================= */
.tarjeta-producto {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Borde estándar */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tarjeta-producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05); 
}

.imagen-placeholder {
    height: 200px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagen-placeholder i {
    color: #ccc;
    font-size: 3.5rem;
}

.imagen-placeholder a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    padding: 10px;
}

.img-producto-catalogo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    mix-blend-mode: multiply;
}

.imagen-placeholder a:hover .img-producto-catalogo {
    transform: scale(1.08);
}

.info-producto {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.marca-producto {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    margin-bottom: 5px;
}

.nombre-producto {
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nombre-producto a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.nombre-producto a:hover {
    color: var(--primary-blue);
}

.bloque-precios {
    margin-top: auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.precio-oferta-fila {
    display: flex;
    align-items: center;
    gap: 10px;
}

.precio-oferta {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e50029;
}

.etiqueta-descuento {
    background-color: #e50029;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.precio-normal.tachado {
    font-size: 0.85rem;
    color: #888;
    text-decoration: line-through;
    margin-top: 2px;
}

.accion-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.stock-texto {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 600;
}

.btn-comprar {
    background-color: white;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-comprar:hover {
    background-color: var(--primary-blue);
    color: white;
}


/* =========================================
   5. HOME: SECCIÓN PRODUCTOS (TABS Y CARRUSEL)
   ========================================= */
.seccion-mas-vendidos {
    margin: 60px 0;
    width: 100%;
}

/* 5.1 Sistema de Pestañas Alineadas */
.tabs-full-width {
    width: 100%;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.wrapper-tabs {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.wrapper-tabs .carrusel-ventana {
    overflow: visible;
}

.tabs-productos-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    /* Fuerza la izquierda siempre */
    margin: 0;
    padding: 0;
}

.tab-btn {
    background-color: #f4f6f8;
    color: #999;
    border: none;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border-top: 3px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    margin-bottom: -2px;
    /* Tapa la línea gris inferior */
}

.tab-btn.active {
    background-color: #ffffff;
    color: var(--dark-gray);
    border-top: 3px solid var(--primary-green);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 2px solid #ffffff;
}

.tab-btn:hover:not(.active) {
    background-color: #e1e5eb;
    color: #666;
}

/* 5.2 Contenedor del Carrusel de Tarjetas */
.productos-wrapper {
    position: relative;
    width: 100%;
    display: block !important;
    /* 1. MAGIA: MATA EL CENTRADO DEL FLEXBOX PARA SIEMPRE */
    padding: 10px 5%;
    /* 2. MAGIA: 5% es el margen exacto de tu Logo "AstraShop" superior */
}

/* 3. CARRUSEL: Sin límites de tamaño (Adiós al espacio blanco) */
.carrusel-ventana {
    overflow: hidden;
    width: 100%;
    max-width: 100% !important;
    /* SOBREESCRIBE CUALQUIER REGLA VIEJA */
    margin: 0;
}

.carrusel-ventana .grid-productos {
    display: flex;
    gap: 30px;
    width: max-content;
    padding-bottom: 20px;
}

.carrusel-ventana .tarjeta-producto {
    width: 260px !important;
    flex: 0 0 260px !important;
}

/* 5.3 Flechas Flotantes (Solo aparecen al pasar el mouse) */
.btn-slider-prod {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background-color: white;
    color: var(--primary-blue);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    /* Ocultas por defecto */
}

.productos-wrapper:hover .btn-slider-prod {
    opacity: 1;
    visibility: visible;
}

.btn-slider-prod:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Posición matemática de las flechas (Montadas sobre la línea invisible del 5%) */
.btn-prev-prod {
    left: calc(5% - 22px);
}

.btn-next-prod {
    right: calc(5% - 22px);
}


/* =========================================
   6. MODAL DE INICIO DE SESIÓN
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.activo {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 40px 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.activo .modal-content {
    transform: translateY(0);
}

.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.cerrar-modal:hover {
    color: #333;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-grupo {
    display: flex;
    flex-direction: column;
}

.input-grupo label {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 5px;
}

.input-grupo input {
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-grupo input:focus {
    border-bottom-color: var(--primary-blue);
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 35px;
}

.toggle-password {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.1rem;
}

.btn-ingresar-modal {
    background-color: #333f48;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-ingresar-modal:hover {
    background-color: #1f272d;
}

.texto-ayuda,
.texto-registro {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.texto-ayuda a,
.texto-registro a {
    color: #555;
    text-decoration: underline;
}


/* =========================================
   7. PIE DE PÁGINA (FOOTER)
   ========================================= */
.site-footer {
    background-color: #001f4d;
    color: #e0e6ed;
    font-size: 0.95rem;
    margin-top: 60px;
}

.footer-newsletter {
    background-color: var(--primary-blue);
    padding: 40px 5%;
}

.newsletter-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.newsletter-texto h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.newsletter-form {
    display: flex;
    width: 100%;
    max-width: 450px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
    font-size: 1rem;
    border-radius: 8px 0 0 8px;
}

.newsletter-form button {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    border-radius: 0 8px 8px 0;
}

.newsletter-form button:hover {
    background-color: var(--hover-green);
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 5%;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-green);
}

.footer-logo {
    height: 50px;
    background-color: white;
    padding: 5px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul a {
    color: #e0e6ed;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-col ul a:hover {
    color: var(--primary-green);
    padding-left: 5px;
}

.contact-list li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-list i {
    color: var(--primary-green);
    margin-top: 4px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-green);
    transform: translateY(-3px);
}

.payment-methods {
    display: flex;
    gap: 15px;
    font-size: 2rem;
    color: #b3d4ff;
    margin-top: 15px;
}

.footer-bottom {
    background-color: #001433;
    text-align: center;
    padding: 20px 5%;
    color: #88a4c4;
    font-size: 0.9rem;
}
/* =========================================
   NUEVO: Diseño Personalizado Alerta Carrito
   (Réplica de imagen de referencia)
   ========================================= */

/* Contenedor principal de la alerta SweetAlert */
.swal2-popup.custom-cart-swal {
    border-radius: 0px !important; /* Rectangular si así es la referencia */
    padding: 2.5em 1.5em !important;
    font-family: 'Segoe UI', Roboto, sans-serif !important;
}

/* Ocultar el ícono por defecto de SweetAlert */
.custom-cart-swal .swal2-icon {
    display: none !important;
}

/* Estilos para el contenido HTML inyectado */
.custom-cart-modal-content {
    text-align: center;
}

.custom-cart-modal-content h2 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    margin-top: 0;
    text-transform: uppercase; /* Opcional, según referencia */
}

.custom-cart-modal-content p {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

/* Contenedor de botones apilados verticalmente (común en este diseño) */
.custom-cart-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Estilo base para ambos botones */
.btn-modal-custom {
    display: block;
    width: 100%;
    padding: 15px 20px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 0px; /* Rectangular */
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

/* Botón PRIMARIO: Ir al Carrito / Pasar por caja (Fondo Sólido) */
.btn-modal-primary {
    background-color: #333; /* O el color primario de tu tienda */
    color: #fff !important;
}

.btn-modal-primary:hover {
    background-color: #555;
}

/* Botón SECUNDARIO: Seguir Comprando (Fondo Blanco, Borde) */
.btn-modal-secondary {
    background-color: #fff;
    color: #333 !important;
    border: 1px solid #ccc;
}

.btn-modal-secondary:hover {
    background-color: #f8f8f8;
    border-color: #bbb;
}

/* ==============================================================
   8. RESPONSIVIDAD TOTAL AVANZADA - ASTRASHOP (Móviles y Tablets)
   ============================================================== */

/* TABLETS Y MÓVILES GRANDES (Hasta 991px) */
@media (max-width: 991px) {
    /* HEADER: Uso de Grid para forzar el buscador a una segunda fila */
    .header-main {
        display: grid !important;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 15px;
        align-items: center;
        padding: 15px 5%;
    }

    .brand-logo {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .header-actions {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        display: flex;
        justify-content: flex-end;
        gap: 15px;
    }

    .header-search {
        grid-column: 1 / 4; /* Ocupa todo el ancho abajo */
        grid-row: 2 / 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 8px;
    }

    /* NAVEGACIÓN: Scroll horizontal táctil (Estilo App) */
    .header-nav .nav-links {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 12px 5%;
        gap: 20px;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid #eee;
    }
    
    .header-nav .nav-links::-webkit-scrollbar {
        height: 4px; /* Scrollbar sutil */
    }
    .header-nav .nav-links::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

    /* FOOTER */
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }
    .newsletter-form {
        max-width: 100%;
    }
}

/* MÓVILES PEQUEÑOS (Teléfonos, Hasta 600px) */
@media (max-width: 600px) {
    /* Ajustes de Header para evitar desbordes */
    .brand-logo img {
        height: 35px; /* Logo más pequeño */
    }

    .user-greeting {
        display: none; /* Oculta la palabra "Hola," */
    }
    
    .user-action {
        font-size: 0.85rem;
    }

    /* Banner Principal */
    .hero-carousel {
        height: 220px !important; 
    }

    .carousel-control-prev, 
    .carousel-control-next {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    /* Carrusel de Marcas */
    .marca-item {
        width: 140px;
        height: 70px;
    }
    .marca-item img {
        padding: 5px 15px;
    }

    /* TABS (Más Vendidos / Nuevos) */
    .tabs-productos-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tab-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* TARJETAS DE PRODUCTO (CARRUSEL HOME) */
    .productos-wrapper {
        padding: 10px 5%;
    }
    
    .btn-slider-prod {
        display: none !important; /* Oculta flechas, usuario desliza con dedo */
    }

    .carrusel-ventana {
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
    }

    /* Reduce el tamaño de la tarjeta para móviles */
    .carrusel-ventana .tarjeta-producto {
        width: 170px !important;
        flex: 0 0 170px !important;
    }

    .carrusel-ventana .grid-productos {
        gap: 15px;
    }

    .imagen-placeholder {
        height: 140px;
    }

    .nombre-producto {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .precio-oferta {
        font-size: 1.2rem;
    }

    .btn-comprar {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    /* FOOTER COLUMNA ÚNICA */
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 5%;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .contact-list li {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* =========================================
   SCROLLBAR PERSONALIZADO (Webkit)
   ========================================= */
::-webkit-scrollbar {
    width: 10px; /* Más delgada que la normal */
    height: 10px; /* Para el scroll horizontal en móviles */
}

::-webkit-scrollbar-track {
    background: var(--light-gray); 
}

::-webkit-scrollbar-thumb {
    background: #b0b8c1; 
    border-radius: 8px; /* Bordes redondeados para combinar con tu diseño */
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue); /* Se vuelve azul AstraShop al usarla */
}

/* Efecto de hundimiento al hacer clic en botones */
.btn-comprar:active, 
.search-btn:active, 
.newsletter-form button:active,
.tab-btn:active {
    transform: scale(0.94);
    transition: transform 0.1s ease; /* Debe ser rápido para sentirse real */
}

/* =========================================
   MENÚ LATERAL (OFF-CANVAS)
   ========================================= */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.activo {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -320px; /* Escondido a la izquierda */
    width: 300px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 2001;
    box-shadow: 5px 0 25px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.side-menu.activo {
    transform: translateX(320px); /* Se desliza hacia adentro */
}

/* Cabecera del menú */
.side-menu-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001f4d 100%);
    color: white;
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.side-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.side-user-info i {
    font-size: 2.5rem;
    color: var(--primary-green);
}

.greeting {
    display: block;
    font-size: 0.9rem;
    color: #e0e6ed;
}

.login-link {
    color: white;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.05rem;
}

.close-menu-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Cuerpo del menú */
.side-menu-body {
    padding: 20px;
}

.menu-section {
    margin-bottom: 25px;
}

.menu-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.side-nav-links {
    list-style: none;
}

.side-nav-links li {
    margin-bottom: 5px;
}

.side-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.side-nav-links a i {
    color: #888;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: color 0.2s;
}

.side-nav-links a:hover {
    background-color: var(--light-gray);
    color: var(--primary-blue);
}

.side-nav-links a:hover i {
    color: var(--primary-blue);
}
/* =========================================
   MODAL DE OFERTAS (MINI BANNERS ROTATIVOS)
   ========================================= */
.ofertas-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000; /* Mayor al modal de login (2000) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ofertas-modal-overlay.activo {
    opacity: 1;
    visibility: visible;
}

.ofertas-modal-content {
    position: relative;
    max-width: 500px; /* Tamaño máximo del mini banner */
    width: 90%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.ofertas-modal-overlay.activo .ofertas-modal-content {
    transform: scale(1);
}

/* Botón transparente para cerrar */
.btn-cerrar-oferta {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8); /* Sombra para que se note en banners claros */
    transition: transform 0.2s, color 0.2s;
}

.btn-cerrar-oferta:hover {
    transform: scale(1.15);
    color: #ffffff;
}

#enlaceOfertaModal {
    display: block;
    width: 100%;
    height: 100%;
}

#imgOfertaModal {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease-in-out; /* Suavidad al cambiar de banner */
}
/* =========================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================= */
.btn-flotante-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; /* Verde oficial de WhatsApp */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.btn-flotante-whatsapp svg {
    margin-top: 1px;
    margin-left: 1px;
}

.btn-flotante-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.35);
    color: white;
}

/* Efecto de ondas (Pulso) para llamar la atención */
.btn-flotante-whatsapp::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #25D366;
    border-radius: 50%;
    z-index: -1;
    animation: pulsar-whatsapp 2s infinite;
}

@keyframes pulsar-whatsapp {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Ajuste para celulares (un poco más pequeño y pegado al borde) */
@media (max-width: 768px) {
    .btn-flotante-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .btn-flotante-whatsapp svg {
        width: 26px;
        height: 26px;
    }
}
/* =========================================
   WHATSAPP FLOTANTE CON POPUP DE AYUDA
   ========================================= */
.whatsapp-flotante-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

/* Popup de ayuda estilo imagen de referencia */
.ayuda-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 340px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #eee;
}

.ayuda-popup.activo {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ayuda-popup-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ayuda-popup-close:hover {
    background: #f0f0f0;
}

/* Banner de ofertas */
.ayuda-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 25px 20px 20px;
    color: white;
    position: relative;
}

.ayuda-banner-tag {
    display: inline-block;
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.ayuda-banner-titulo {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 15px 0;
    color: white;
    text-transform: uppercase;
}

.ayuda-banner-financia {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 5px;
}

.financia-destacado {
    color: white;
    font-weight: 700;
}

.ayuda-banner-credito {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.credito-icono {
    background: #ff4757;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.credito-texto {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.ayuda-banner-slogan {
    font-size: 0.75rem;
    color: #888;
    margin: 10px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ayuda-banner-imagen {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 3.5rem;
    opacity: 0.8;
}

/* Mensaje de bienvenida */
.ayuda-mensaje {
    padding: 20px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.ayuda-mensaje p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    text-align: center;
}

/* Lista de vendedores */
.ayuda-vendedores {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.ayuda-vendedor-card {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ayuda-vendedor-card:hover {
    border-color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.1);
    transform: translateY(-2px);
}

.vendedor-card-header {
    margin-bottom: 8px;
}

.vendedor-card-nombre {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f272d;
}

.vendedor-card-body {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vendedor-card-rol {
    font-size: 0.8rem;
    color: #888;
    font-weight: 500;
}

.vendedor-card-estado {
    font-size: 0.75rem;
    color: #25D366;
    font-weight: 600;
}

.vendedor-card-estado::before {
    content: '●';
    margin-right: 5px;
    font-size: 0.6rem;
}

/* Footer del popup */
.ayuda-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.ayuda-footer-icono {
    width: 40px;
    height: 40px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.ayuda-footer-texto {
    font-size: 1rem;
    font-weight: 600;
    color: #1f272d;
}

/* Responsividad */
@media (max-width: 480px) {
    .whatsapp-flotante-container {
        bottom: 20px;
        right: 20px;
    }
    
    .ayuda-popup {
        width: 320px;
        bottom: 70px;
        right: -10px;
    }
    
    .btn-flotante-whatsapp {
        width: 50px;
        height: 50px;
    }
    
    .btn-flotante-whatsapp svg {
        width: 26px;
        height: 26px;
    }
    
    .ayuda-banner-titulo {
        font-size: 1.8rem;
    }
    
    .credito-texto {
        font-size: 1.2rem;
    }
}/* =========================================
   WHATSAPP FLOTANTE - POPUP ESTILO CONTACTO
   ========================================= */
.whatsapp-flotante-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

/* Popup estilo contacto */
.vendedores-contacto-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.vendedores-contacto-popup.activo {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.vendedores-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.vendedores-popup-close:hover {
    color: #333;
}

.vendedores-popup-header {
    padding: 18px 18px 10px;
}

.vendedores-popup-header p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    text-align: left;
}

.vendedores-popup-lista {
    padding: 5px 0;
    max-height: 350px;
    overflow-y: auto;
}

/* Item de vendedor estilo contacto */
.vendedor-contacto-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.vendedor-contacto-item:hover {
    background-color: #f8f9fa;
}

/* BORDE VERDE ALREDEDOR DEL AVATAR - ESTILO DE REFERENCIA */
.vendedor-avatar-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #25D366;
    padding: 2px;
    background: white;
}

.vendedor-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.vendedor-contacto-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.vendedor-contacto-nombre {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.vendedor-contacto-rol {
    font-size: 0.8rem;
    color: #777;
    font-weight: 500;
}

.vendedor-contacto-estado {
    font-size: 0.75rem;
    color: #25D366;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.estado-punto {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #25D366;
    border-radius: 50%;
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.vendedores-popup-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

/* Responsividad */
@media (max-width: 480px) {
    .whatsapp-flotante-container {
        bottom: 20px;
        right: 20px;
    }
    
    .vendedores-contacto-popup {
        width: 280px;
        bottom: 70px;
        right: -10px;
    }
    
    .btn-flotante-whatsapp {
        width: 50px;
        height: 50px;
    }
    
    .btn-flotante-whatsapp svg {
        width: 26px;
        height: 26px;
    }
    
    .vendedor-avatar-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .vendedor-contacto-nombre {
        font-size: 1rem;
    }
}