/* --- Estructura Base del Footer (MAKRO SPA - Versión White) --- */
.main-footer {
    background-color: #ffffff; /* Cambio a Blanco Puro */
    color: #475569;            /* Texto en Gris Slate oscuro para lectura clara */
    padding: 60px 0 0 0;
    font-family: 'Segoe UI', sans-serif;
    border-top: 4px solid #e63946; /* Se mantiene el Rojo Makro superior */
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05); /* Sombra sutil para separar del cuerpo */
}

/* AJUSTE DEL LOGO */
.footer-logo {
    max-width: 180px; 
    height: auto;
    margin-bottom: 25px;
    display: block;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 0 20px 40px 20px;
}

.footer-section h3 {
    color: #1e293b; /* Títulos en Azul Industrial para mayor jerarquía */
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 8px;
}

/* Línea decorativa bajo el título para estilo moderno */
.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 3px;
    background-color: #e63946; /* Acento Rojo Makro */
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #475569; /* Gris oscuro para los textos legales y direcciones */
    line-height: 1.6;
}

.footer-section ul li i {
    color: #e63946; /* Iconos resaltan en Rojo Makro */
    margin-top: 5px;
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-section ul li a {
    color: #64748b; /* Color de link estándar */
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-section ul li a:hover {
    color: #e63946; /* Rojo Makro en el hover */
    padding-left: 8px; /* Efecto de desplazamiento suave */
}

/* AJUSTE PARA LOS ICONOS DE REDES SOCIALES (Basado en tu clase .social-icons) */
.social-icons {
    display: flex;
    gap: 25px; /* Espacio entre los iconos */
    margin-top: 15px;
}

.social-icons a {
    color: #e63946 !important; /* Rojo Makro Forzado */
    font-size: 2.1rem;         /* Tamaño grande (40% extra) */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    text-decoration: none;
}

.social-icons a:hover {
    color: #1e293b !important; /* Cambio a Azul Industrial en Hover */
    transform: translateY(-5px) scale(1.1); /* Efecto de salto y agrandado */
}

/* Ajuste para que los iconos de FontAwesome hereden el color correctamente */
.social-icons a i {
    display: block;
}

/* Ajuste específico para S22 Ultra (Móvil) */
@media (max-width: 768px) {
    .social-icons a {
        font-size: 1.8rem;
    }
}
/* ================================================================
   BOTÓN FLOTANTE WHATSAPP - ANIMACIÓN Y ESTILO
   ================================================================ */

.wsp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 5000; /* Aseguramos que esté sobre todo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    
    /* ANIMACIÓN DE PULSO INICIAL */
    animation: pulseWsp 2s infinite;
}

.wsp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* Tooltip (El texto que aparece al lado) */
.wsp-tooltip {
    position: absolute;
    right: 80px;
    background-color: #1e293b;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    font-weight: 600;
}

.wsp-float:hover .wsp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* KEYFRAMES DE LA ANIMACIÓN */
@keyframes pulseWsp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* AJUSTE PARA MÓVILES (S22 Ultra) */
@media (max-width: 768px) {
    .wsp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 30px;
    }
    .wsp-tooltip {
        display: none; /* Ocultamos el texto en móvil para no tapar contenido */
    }
}

/* ================================================================
    COMPONENTE CARRITO - MAKRO SPA (REINTEGRADO & REPARADO)
   ================================================================ */

:root {
    --cart-width: 380px;
    --azul-makro: #1e293b;
    --rojo-makro: #e63946;
    --verde-wsp: #25d366;
}

/* 1. Botón Flotante del Carrito (Trigger) */
.cart-trigger {
    position: fixed;
    width: 60px;
    height: 60px;
    right: 40px;
    bottom: 120px; /* Ubicado arriba del botón de WhatsApp */
    background: var(--rojo-makro);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 2500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.cart-trigger:hover {
    transform: scale(1.1);
    background: var(--azul-makro);
}

/* Badge de cantidad sobre el carrito */
.badge-naranja {
    position: absolute;
    top: -5px; 
    right: -5px;
    background: var(--azul-makro);
    color: white;
    font-size: 11px;
    width: 24px; 
    height: 24px;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 2px solid white;
    font-weight: bold;
}

/* 2. Overlay y Sidebar del Carrito */
.cart-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 2900;
    backdrop-filter: blur(4px);
}
.cart-overlay.active { display: block; }

.cart-main {
    position: fixed;
    top: 0;
    right: calc(var(--cart-width) * -1); /* Escondido a la derecha */
    width: var(--cart-width);
    height: 100vh;
    background: white;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
.cart-main.active { right: 0; }

/* Cabecera del Carrito */
.cart-header-energy {
    background: var(--azul-makro);
    color: white;
    padding: 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-weight: 700;
    font-size: 1.2rem;
}

.close-btn { 
    background: none; 
    border: none; 
    color: white; 
    font-size: 28px; 
    cursor: pointer; 
    transition: 0.3s;
}

.close-btn:hover { transform: rotate(90deg); color: var(--rojo-makro); }

/* Cuerpo y Productos */
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty { 
    text-align: center; 
    margin-top: 60px; 
    color: #94a3b8; 
}
.cart-empty i { font-size: 3.5rem; margin-bottom: 15px; display: block; }

/* Footer y Botón de WhatsApp */
.cart-footer-energy {
    padding: 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--azul-makro);
    margin-bottom: 10px;
}

.iva-notice {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
    display: block;
}

/* BOTÓN WHATSAPP DINÁMICO */
.btn-whatsapp-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background-color: var(--verde-wsp);
    color: #ffffff !important;
    padding: 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-whatsapp-confirm:hover {
    background-color: #128c7e;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(18, 140, 126, 0.4);
}

.btn-whatsapp-confirm i {
    font-size: 1.4rem;
}

/* --- Ajustes Móviles (S22 Ultra) --- */
@media (max-width: 768px) {
    .cart-main { 
        width: 100%; /* Ocupa toda la pantalla en móvil */
        right: -100%; 
    }
    .cart-trigger { 
        width: 55px; 
        height: 55px; 
        right: 20px; 
        bottom: 95px; 
    }
    .btn-whatsapp-confirm {
        padding: 15px;
        font-size: 1rem;
    }
    .total-row { font-size: 1.2rem; }
}
