﻿/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Poppins:wght@300;400;600&display=swap');

:root {
    --color-mavi: #a58eaa;
    --color-mavi-hover: #8e7792;
    --color-fondo: #fcfafc;
    --color-texto: #4a4a4a;
    --blanco: #ffffff;
    --shadow-suave: 0 4px 15px rgba(165, 142, 170, 0.1);
    --shadow-card: 0 5px 15px rgba(0,0,0,0.05);
    --color-error: #ff6b6b;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-image: url('fondo-mavi.jpg'); 
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    margin: 0;
    color: var(--color-texto);
    overflow-x: hidden;
    
    /* CAMBIO: Estructura para fijar footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   2. HEADER (Logo Centrado y Navegación)
   ========================================= */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background: var(--color-mavi);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 90px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0; 
}

.header-left, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
    z-index: 1010;
}

.header-right {
    justify-content: flex-end;
    gap: 20px; 
}

.header-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.logo-mavi {
    font-family: 'Great Vibes', cursive;
    font-size: 3.8rem;
    color: var(--blanco);
    margin: 0;
    font-weight: 400;
}

.menu-hamburguesa {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
    transition: transform 0.3s ease;
}

.menu-hamburguesa span {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: var(--blanco);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.menu-hamburguesa span:nth-child(2) { width: 70%; }
.menu-hamburguesa:hover span:nth-child(2) { width: 100%; }

#cart-icon-header {
    cursor: pointer;
    font-size: 1.6rem;
    position: relative;
    color: var(--blanco);
    text-decoration: none;
    transition: transform 0.3s ease;
}

#cart-icon-header:hover { transform: scale(1.1); }

#cart-count {
    background: var(--blanco);
    color: var(--color-mavi);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: -10px;
}

.btn-fav-header {
    background: none;
    border: none;
    color: var(--blanco);
    font-size: 1.4rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-fav-header:hover { transform: scale(1.1); }

#fav-count {
    background: var(--blanco);
    color: var(--color-mavi);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: -10px;
}

/* =========================================
   3. HERO Y CONTENIDO PRINCIPAL
   ========================================= */
main {
    padding: 2rem;
    max-width: 1100px;
    margin: 20px auto;
    background-color: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(4px); 
    border-radius: 20px;
    flex: 1 0 auto; 
    width: 100%;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 { 
    font-size: 2.5rem; 
    margin-bottom: 0.5rem; 
    text-shadow: 0 2px 4px rgba(255,255,255,0.8); 
}

.hero p { 
    font-size: 1.1rem; 
    color: var(--color-texto); 
    font-weight: 400;
}

/* =========================================
   4. TIENDA Y PRODUCTOS
   ========================================= */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.card-producto {
    background: var(--blanco); 
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); 
    transition: transform 0.3s ease;
    text-align: center;
}

.card-producto:hover { transform: translateY(-10px); }

.card-producto img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.info-card { padding: 1.5rem; }

.precio {
    color: var(--color-mavi);
    font-weight: 600;
    font-size: 1.2rem;
    display: block;
    margin: 10px 0;
}

button {
    background-color: var(--color-mavi);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.3s;
}

button:hover { background-color: var(--color-mavi-hover); }

/* =========================================
   5. MENÚ LATERAL
   ========================================= */
#menu-lateral {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--blanco);
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    transition: 0.4s ease-in-out;
    z-index: 1100;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

#menu-lateral.menu-visible { left: 0; }

.menu-content h3 {
    color: var(--color-mavi);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 1.4rem;
}

.menu-content ul { list-style: none; padding: 0; }
.menu-content li {
    padding: 12px 0;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
    border-bottom: 1px solid #f9f9f9;
}

.menu-content li:hover {
    color: var(--color-mavi);
    padding-left: 10px;
    background-color: rgba(165, 142, 170, 0.05);
}

.link-admin {
    margin-top: auto;
    text-align: center;
    padding: 1.2rem 0;
    text-decoration: none;
    color: #bbb;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
}

/* =========================================
   6. SECCIÓN LOGIN Y FORMULARIOS (CORREGIDO)
   ========================================= */
.body-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: var(--blanco);
    padding: 3rem;
    border-radius: 0; /* Tarjeta Cuadrada */
    box-shadow: var(--shadow-suave);
    text-align: center;
    
    /* Configuración para centrar contenido interno y ser cuadrado */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1; /* Mantiene la proporción cuadrada */
    
    border: 1px solid rgba(165, 142, 170, 0.1);
}

#login-form-cliente, #registro-form, .input-group {
    width: 100%;
}

#login-form-cliente input, #registro-form input, .input-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    transition: 0.3s;
}

/* =========================================
   7. ESTILO LOGIN ADMINISTRADOR
   ========================================= */
.logo-mavi-login {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: var(--color-mavi);
    margin: 0 0 1rem 0;
}

.btn-login {
    width: 100%;
}

.error-text {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* =========================================
   8. AUTH HEADER Y NOTIFICACIONES
   ========================================= */
#auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px; 
}

.user-welcome {
    font-size: 0.85rem;
    color: white;
    font-weight: 400;
}

.btn-auth-nav {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid white;
    color: white;
    padding: 6px 16px;
    border-radius: 50px; 
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-auth-nav:hover {
    background-color: white;
    color: var(--color-mavi);
}

.user-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px; 
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 30px;
}

.btn-logout-small {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
    text-transform: uppercase;
}

.btn-logout-small:hover {
    background-color: var(--color-error);
    border-color: var(--color-error);
    color: white;
}

.notification-bell-container {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-notif {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    background-color: var(--color-error);
    color: white;
    border-radius: 50%;
    border: 2px solid var(--color-mavi);
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 280px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 12px;
    z-index: 5000;
    padding: 15px;
    margin-top: 10px;
}

.dropdown-content.show { display: block; }

.dropdown-content h4 {
    margin: 0 0 10px 0;
    color: var(--color-mavi);
    font-size: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

#lista-ofertas {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

#lista-ofertas li {
    padding: 12px 0;
    border-bottom: 1px solid #f2f2f2;
}

#lista-ofertas li:last-child { border-bottom: none; }

.btn-borrar-notif {
    background: none !important;
    color: #ccc !important;
    padding: 0 5px !important;
    font-size: 1.2rem !important;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.btn-borrar-notif:hover { color: var(--color-error) !important; }

/* =========================================
   9. LÓGICA DE CANTIDADES (CARRITO)
   ========================================= */
.item-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f8f8;
    padding: 5px 10px;
    border-radius: 50px;
}

.btn-qty {
    background: white !important;
    color: var(--color-mavi) !important;
    border: 1px solid #eee !important;
    width: 24px;
    height: 24px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    transition: 0.2s;
}

.btn-qty:hover {
    background: var(--color-mavi) !important;
    color: white !important;
}

.btn-remove {
    background: none !important;
    color: var(--color-error) !important;
    font-size: 1.6rem !important;
    padding: 0 10px !important;
    transition: transform 0.2s;
}

.btn-remove:hover {
    transform: scale(1.2);
}

/* =========================================
   10. NOTIFICACIONES POPUP (TOAST)
   ========================================= */
.notification-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast-mavi {
    background-color: var(--color-mavi);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    animation: slideInMavi 0.5s ease forwards;
}

@keyframes slideInMavi {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-fadeOut {
    animation: fadeOutMavi 0.5s ease forwards;
}

@keyframes fadeOutMavi {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(120%); }
}

/* =========================================
   11. CARRUSEL DE FOTOS (Slider)
   ========================================= */

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: #eee; 
    aspect-ratio: 16 / 9; 
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease;
    display: none; 
    transform: scale(1.05);
}

.slide-item.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    display: flex; 
    align-items: center;
    justify-content: center;
}

.slide-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    display: block;
}

.prev-slide, .next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: var(--color-mavi);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 100;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-slide:hover, .next-slide:hover {
    background: var(--color-mavi);
    color: white;
}

.prev-slide { left: 20px; }
.next-slide { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* =========================================
   12. GESTIÓN ADMIN (Stock, Edición y Categorías)
   ========================================= */

.admin-prod-card {
    background: var(--blanco);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    border: 1px solid #f0f0f0;
}

.admin-prod-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.admin-prod-info {
    padding: 1.2rem;
}

.badge-cat {
    background: rgba(165, 142, 170, 0.1);
    color: var(--color-mavi);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stock-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 10px;
    font-size: 0.9rem;
}

.stock-btns {
    display: flex;
    gap: 5px;
}

.stock-btns button {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--color-mavi);
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.1rem;
}

.stock-btns button:hover {
    background: var(--color-mavi);
    color: white;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    flex: 1;
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
    font-size: 0.8rem !important;
    padding: 8px !important;
}

.btn-delete {
    flex: 1;
    background-color: #ffebee !important;
    color: #d32f2f !important;
    font-size: 0.8rem !important;
    padding: 8px !important;
}

.btn-edit:hover { background-color: #bbdefb !important; }
.btn-delete:hover { background-color: #ffcdd2 !important; }

.tag-categoria {
    display: inline-flex;
    align-items: center;
    background: var(--color-mavi);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.85rem;
}

.tag-categoria button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    margin-left: 8px;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.container-foto {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.overlay-descripcion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(165, 142, 170, 0.95); 
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: all 0.4s ease-in-out;
    pointer-events: none;
    font-size: 0.9rem;
    z-index: 5;
    line-height: 1.4;
}

.overlay-descripcion.active {
    opacity: 1;
    pointer-events: auto;
}

.btn-info-prod {
    position: absolute;
    top: 15px;
    right: 15px; 
    background: white;
    color: var(--color-mavi);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- ESTILOS FOOTER FINAL --- */
.main-footer {
    background-color: #fcfafc;
    border-top: 1px solid #eee;
    padding: 2rem 0 1rem 0;
    color: #666;
    margin-top: auto; 
    flex-shrink: 0;
    width: 100%;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 1.5rem;
}

.footer-column h4 {
    color: var(--color-mavi);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    transition: 0.3s;
}

.footer-link:hover {
    color: var(--color-mavi);
}

.footer-icon {
    width: 18px;
    filter: grayscale(1);
    opacity: 0.7;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pay-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pay-item img {
    height: 18px;
    filter: grayscale(0.8);
    opacity: 0.7;
}

.pay-item span {
    font-size: 0.8rem;
    color: #777;
}

.ubicacion-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ubicacion-horizontal p {
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    color: #777;
}

.map-mini-container {
    flex-grow: 1;
    border-radius: 8px;
    overflow: hidden;
    height: 70px;
    border: 1px solid #eee;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.7rem;
    color: #bbb;
}

#menu-lateral {
    display: flex;
    flex-direction: column;
}

.menu-content {
    flex-grow: 1; 
}

.menu-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px; 
}

.btn-terminos-menu {
    background: none;
    border: 1px solid var(--color-mavi);
    color: var(--color-mavi);
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-terminos-menu:hover {
    background: var(--color-mavi);
    color: white;
}

/* --- MODAL TÉRMINOS ACTUALIZADO --- */
.modal-mavi-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-mavi-overlay.active {
    display: flex;
}

.modal-mavi-content {
    background: white;
    width: 90%;
    max-width: 500px; 
    max-height: 90vh; 
    padding: 20px;
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

#popup-terminos .slider-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfdfd;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    min-height: 350px;
}

#popup-terminos .slide-item {
    width: 100%;
    height: 100%;
    display: none;
}

#popup-terminos .slide-item.active {
    display: flex;
}

#popup-terminos .slide-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.card-fav-zoom {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.card-fav-zoom:hover {
    transform: scale(1.03);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-mavi);
    z-index: 1001;
}

/* =========================================
   13. CORRECCIÓN CAJÓN FAVORITOS 
   ========================================= */

#modal-favoritos .modal-mavi-content {
    max-width: 700px; 
    padding-top: 60px; 
}

.grid-favoritos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 15px;
    margin-top: 10px;
    overflow-y: auto; 
    max-height: 65vh;  
    padding: 10px;
}

.grid-favoritos .card-producto {
    height: auto;
    padding: 10px;
}

.grid-favoritos .card-producto img {
    height: 130px; 
    border-radius: 8px;
    object-fit: cover;
}

.grid-favoritos .info-card {
    padding: 10px 5px;
}

.grid-favoritos .info-card h4 {
    font-size: 0.85rem;
    margin: 5px 0;
}

.grid-favoritos .precio {
    font-size: 1rem;
}

.grid-favoritos button {
    padding: 8px;
    font-size: 0.7rem;
}

.btn-fav {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #ccc;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 1.2rem;
}

.btn-fav.active {
    color: #ff6b6b;
    transform: scale(1.1);
}

.nav-car-prev, .nav-car-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    border: none;
    padding: 10px 5px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-mavi);
    z-index: 10;
    transition: 0.3s;
}

.nav-car-prev:hover, .nav-car-next:hover { background: white; }
.nav-car-prev { left: 0; border-radius: 0 5px 5px 0; }
.nav-car-next { right: 0; border-radius: 5px 0 0 5px; }

.img-principal {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

/* WhatsApp Float */
.whatsapp-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 15px;
}

.whatsapp-badge {
    background-color: white;
    color: var(--color-texto);
    padding: 12px 18px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    max-width: 220px;
    text-align: center;
    position: relative;
    border: 1px solid #eee;
    animation: floatingBadge 3s ease-in-out infinite;
}

.whatsapp-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid white;
}

.whatsapp-float {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes floatingBadge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

.close-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--color-mavi);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.close-badge:hover {
    background: var(--color-error);
}

@media screen and (max-width: 768px) {
    .whatsapp-container { bottom: 20px; right: 15px; gap: 8px; }
    .whatsapp-badge { 
        font-size: 0.75rem; 
        max-width: 140px; 
        padding: 8px;
    }
}

/* Forzar visibilidad del slide activo en el popup */
#popup-terminos .slide-item {
    display: none !important; 
    width: 100%;
    height: 100%;
}

#popup-terminos .slide-item.active {
    display: flex !important; 
    align-items: center;
    justify-content: center;
}

#popup-terminos .slide-item img {
    display: block !important;
    max-width: 100%;
    max-height: 100%;
    height: auto; 
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: sans-serif;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f8f8;
    color: #333;
}

.btn-eliminar-admin {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-eliminar-admin:hover {
    background: #cc0000;
}

/* Estilos para el nuevo Carrusel Superior */
.main-carousel-container {
    position: relative;
    width: 100%;
    height: 325px; 
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-suave);
}

.main-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-slide-item {
    min-width: 100%;
    height: 100%;
}

.main-slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* Controles y Puntos */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    color: var(--color-mavi);
    border: none;
    width: 45px;
    height: 45px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    font-size: 1.2rem;
    transition: 0.3s;
}

.carousel-control:hover { background: var(--color-mavi); color: white; }
.prev { left: 20px; }
.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active { 
    background: white; 
    width: 25px; 
    border-radius: 10px; 
}

@media (max-width: 768px) {
    .main-carousel-container { height: 250px; }
}

/* Estilo base para los nuevos iconos SVG */
.icon-mavi {
    width: 20px;
    height: 20px;
    stroke: #ffffff; 
    transition: all 0.3s ease;
}

/* Ajuste para los botones circulares de la imagen */
.wishlist-btn, .notify-btn {
    background: rgba(165, 142, 170, 0.5); 
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.wishlist-btn:hover, .notify-btn:hover {
    transform: scale(1.1);
    background: var(--color-mavi);
}

/* Cuando el corazón está activo (Favorito) */
.wishlist-btn.active .icon-mavi {
    fill: #ffffff; 
}

.filtros-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap; /* Para móviles */
}

.search-wrapper {
    position: relative;
    flex: 0 1 300px; /* No tan grande, máximo 300px */
}

.search-wrapper input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1.5px solid var(--color-mavi);
    border-radius: 20px; /* Estética redondeada Mavi */
    outline: none;
    font-family: 'Poppins', sans-serif;
    background: var(--blanco);
    color: var(--color-texto);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-mavi);
    pointer-events: none;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-texto);
}

.sort-wrapper select {
    padding: 8px 12px;
    border: 1.5px solid var(--color-mavi);
    border-radius: 15px;
    outline: none;
    cursor: pointer;
    background: var(--blanco);
    color: var(--color-texto);
}