/* Estilos globales básicos */

/* Paleta de colores pastel - UX Profesional con jerarquía visual clara */
:root {
    /* ============================================
       COLOR PRINCIPAL: Celeste Pastel (más definido)
       Uso: Fondos, estructura, navegación, elementos base
       ============================================ */
    --primary-color: #80DEEA;        /* Celeste pastel principal - más definido */
    --primary-dark: #4DD0E1;         /* Celeste más intenso - hover states, acentos */
    --primary-light: #B2EBF2;       /* Celeste claro - fondos */
    --primary-border: rgba(128, 222, 234, 0.6);  /* Bordes más visibles */
    
    /* ============================================
       COLOR DE ACCIÓN PRINCIPAL: Amarillo Pastel (más definido)
       Uso: CTAs, precios, elementos de alta prioridad
       ============================================ */
    --cta-primary: #FFE082;          /* Amarillo pastel más definido - CTAs principales */
    --cta-primary-hover: #FFD54F;   /* Amarillo más intenso - hover */
    --price-color: #F57C00;         /* Color para precios - más visible */
    --price-bg: rgba(255, 224, 130, 0.5);  /* Fondo más visible para precios */
    
    /* ============================================
       COLOR SECUNDARIO: Rosa Pastel (más definido)
       Uso: Acciones secundarias, información complementaria, estados
       ============================================ */
    --accent-secondary: #F8BBD0;     /* Rosa pastel más definido - botones secundarios */
    --accent-secondary-hover: #F48FB1; /* Rosa más intenso - hover */
    --info-bg: rgba(248, 187, 208, 0.4);  /* Fondo más visible para información */
    
    /* ============================================
       FONDOS - Jerarquía visual (más definidos)
       ============================================ */
    --background-main: #E0F7FA;      /* Fondo principal - celeste más visible */
    --background-section: #F5F9FA;   /* Fondo de secciones - más definido */
    --background-card: #FFFFFF;      /* Fondo de tarjetas - blanco puro */
    --background-hover: rgba(128, 222, 234, 0.15);  /* Hover más visible */
    
    /* ============================================
       TEXTO - Contraste y legibilidad
       ============================================ */
    --text-primary: #2C3E50;         /* Texto principal - alto contraste */
    --text-secondary: #5D6D7E;      /* Texto secundario - contraste medio */
    --text-muted: #85929E;          /* Texto deshabilitado - bajo contraste */
    --text-on-primary: #1A1A1A;      /* Texto sobre fondos pastel */
    --white: #FFFFFF;
    
    /* ============================================
       SOMBRAS - Profundidad y jerarquía (más definidas)
       ============================================ */
    --shadow-sm: 0 2px 8px rgba(128, 222, 234, 0.2);
    --shadow-md: 0 4px 16px rgba(128, 222, 234, 0.25);
    --shadow-lg: 0 8px 24px rgba(128, 222, 234, 0.3);
    --shadow-cta: 0 4px 16px rgba(255, 224, 130, 0.4);  /* Sombra más visible para CTAs */
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.1);  /* Sombra más definida para tarjetas */
    
    /* ============================================
       GRADIENTES - Uso estratégico (más definidos)
       ============================================ */
    /* Gradiente principal: Celeste más definido */
    --gradient-primary: linear-gradient(135deg, #80DEEA 0%, #B2EBF2 100%);
    /* Gradiente suave: Fondos de secciones más visibles */
    --gradient-soft: linear-gradient(135deg, #E0F7FA 0%, #F5F9FA 100%);
    /* Gradiente hero: Combinación más visible de los 3 colores */
    --gradient-hero: linear-gradient(135deg, rgba(128, 222, 234, 0.6) 0%, rgba(248, 187, 208, 0.4) 50%, rgba(255, 224, 130, 0.5) 100%);
    /* Gradiente CTA: Amarillo más definido */
    --gradient-cta: linear-gradient(135deg, #FFE082 0%, #FFD54F 100%);
    /* Gradiente secundario: Rosa más definido */
    --gradient-secondary: linear-gradient(135deg, #F8BBD0 0%, #F48FB1 100%);
    /* Gradiente card hover: Más visible */
    --gradient-card-hover: linear-gradient(135deg, rgba(128, 222, 234, 0.2) 0%, rgba(248, 187, 208, 0.15) 100%);
    
    /* ============================================
       VARIABLES DE COMPATIBILIDAD
       ============================================ */
    --pastel-pink: var(--accent-secondary);
    --pastel-yellow: var(--cta-primary);
    --pastel-celeste: var(--primary-border);
    --background-blue: var(--primary-light);
    --accent-color: #FF6B6B;  /* Color de acento para errores */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background-main);
    font-weight: 400;
}

/* Navegación */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--pastel-celeste);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: inline-block;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 4px 16px rgba(128, 222, 234, 0.65));
    transition: all 0.3s ease;
}

.logo-img:hover {
    filter: drop-shadow(0 6px 20px rgba(128, 222, 234, 0.75));
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin: 0 auto;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--pastel-celeste);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.cart-icon {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
    margin-left: auto;
}

.cart-icon:hover {
    color: var(--primary-color);
    background: var(--pastel-yellow);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 250, 205, 0.4);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 40%, rgba(248, 187, 208, 0.5) 70%, rgba(255, 224, 130, 0.4) 100%);
    color: var(--text-primary);
    padding: 4rem 0 1.5rem;
    margin-top: 0;
    position: relative;
}

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

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.footer-text {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Instagram - Gradiente característico */
.social-link[href*="instagram.com"]:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-md);
}

.social-link[href*="instagram.com"]:hover .social-icon {
    filter: brightness(0) invert(1); /* Make SVG white */
}

/* WhatsApp - Verde característico */
.social-link[href*="wa.me"],
.social-link[href*="whatsapp"] {
    background: var(--white);
}

.social-link[href*="wa.me"]:hover,
.social-link[href*="whatsapp"]:hover {
    background: #25D366; /* WhatsApp green */
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-md);
}

.social-link[href*="wa.me"]:hover .social-icon,
.social-link[href*="whatsapp"]:hover .social-icon {
    filter: brightness(0) invert(1); /* Make SVG white on hover */
}

.social-icon {
    width: 20px;
    height: 20px;
    color: white;
    transition: filter 0.3s ease;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #666;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, 0.6);
    }
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.6);
    animation: none;
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-container {
        justify-content: space-between;
        position: relative;
    }

    .logo {
        margin-left: 0;
        order: 1;
    }
    
    .mobile-menu-toggle {
        order: 2;
    }
    
    .cart-icon {
        order: 3;
        margin-left: 0;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s;
        flex: 0;
        margin: 0;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .cart-icon {
        margin-left: 0;
        position: absolute;
        right: 1.5rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-left: 4px solid var(--primary-color);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-icon {
    font-size: 1.25rem;
    font-weight: bold;
}

.toast-message {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.toast-success {
    border-left-color: #4CAF50;
}

.toast-success .toast-icon {
    color: #4CAF50;
}

.toast-error {
    border-left-color: var(--accent-color);
}

.toast-error .toast-icon {
    color: var(--accent-color);
}

.toast-warning {
    border-left-color: #FF9800;
}

.toast-warning .toast-icon {
    color: #FF9800;
}

.toast-info {
    border-left-color: var(--primary-color);
}

.toast-info .toast-icon {
    color: var(--primary-color);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* ============================================
   CONFIRM DIALOG
   ============================================ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.show {
    opacity: 1;
}

.confirm-dialog {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.confirm-overlay.show .confirm-dialog {
    transform: scale(1);
}

.confirm-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--background-blue);
    background: var(--background-blue);
}

.confirm-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.confirm-body {
    padding: 2rem;
}

.confirm-body p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.confirm-footer {
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.confirm-footer .btn {
    min-width: 100px;
}

/* ============================================
   LOADING INDICATOR
   ============================================ */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-indicator.show {
    opacity: 1;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--background-blue);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-message {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}
