/*
Theme Name: BULBIE - Premium E-commerce Theme
Description: Tema de e-commerce moderno con diseño premium para hogar inteligente
Author: BULBIE Team
Version: 1.0.0
*/

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ===== VARIABLES CSS - PALETA BASADA EN #FEB2E6 ===== */
:root {
    /* Colores principales basados en #FEB2E6 */
    --primary: #FEB2E6;              /* Rosa principal */
    --primary-light: #FFD4F1;        /* Rosa claro */
    --primary-dark: #E588C1;         /* Rosa oscuro */
    --primary-darker: #CC5A9C;       /* Rosa más oscuro */
    
    /* Colores secundarios en la misma familia */
    --secondary: #F8A5D8;            /* Rosa suave */
    --accent: #FF91D1;               /* Rosa vibrante */
    --accent-light: #FFE5F5;         /* Rosa muy claro */
    
    /* Colores neutros complementarios */
    --white: #FFFFFF;
    --bg-light: #FEFBFC;             /* Fondo con toque rosa */
    --bg-soft: #FAF7F9;              /* Fondo suave */
    --text-dark: #2D1B26;            /* Texto oscuro con toque rosa */
    --text-medium: #6B5A65;          /* Texto medio */
    --text-light: #9D8B95;           /* Texto claro */
    --border: #F0E6ED;               /* Borde suave */
    --shadow: rgba(254, 178, 230, 0.2); /* Sombra rosa */
    
    /* Efectos y estados */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-soft: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    
    /* Espaciado y medidas */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Bordes suaves */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-round: 50px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(254, 178, 230, 0.1);
    --shadow-md: 0 4px 20px rgba(254, 178, 230, 0.15);
    --shadow-lg: 0 8px 30px rgba(254, 178, 230, 0.2);
    --shadow-hover: 0 12px 40px rgba(254, 178, 230, 0.25);
}

/* ===== TIPOGRAFÍA ===== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

p, span, a {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
}

/* ===== UTILIDADES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xxl) 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-round);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* ===== HEADER GLOBAL ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-image {
    height: 45px;
    width: auto;
    max-width: 180px;
    transition: all 0.3s ease;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cart-icon {
    position: relative;
    background: var(--accent-light);
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-icon:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: calc(80px + var(--spacing-xxl)) 0 var(--spacing-xxl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--spacing-md);
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SECCIONES DE CONTENIDO ===== */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-subtitle {
    color: var(--text-medium);
    margin-top: var(--spacing-xs);
    font-size: 1.1rem;
}

/* ===== GALERÍA DE PRODUCTOS ===== */
.products-gallery {
    padding: var(--spacing-xxl) 0;
}

.products-scroll {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    padding: var(--spacing-md) 0;
    scroll-behavior: smooth;
}

.products-scroll::-webkit-scrollbar {
    height: 8px;
}

.products-scroll::-webkit-scrollbar-track {
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
}

.products-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-sm);
}

.product-card {
    min-width: 300px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--bg-soft);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image::before {
    content: var(--fallback-icon, '📱');
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    z-index: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
    background: var(--bg-soft);
}

.product-image img:not([src]),
.product-image img[src=""],
.product-image img[src*="placeholder"] {
    opacity: 0;
}

.product-image img[loading="lazy"] {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%), 
                linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { background-position: 0 0, 10px 10px; }
    100% { background-position: 20px 20px, 30px 30px; }
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: var(--spacing-md);
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.product-description {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.product-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-add-cart {
    flex: 1;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== CATEGORÍAS ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-image {
    width: 100%;
    height: 150px;
    background: var(--gradient-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.category-card:hover .category-image {
    background: var(--gradient-primary);
}

.category-card:hover .category-image .category-icon {
    color: var(--white);
}

.category-info {
    padding: var(--spacing-md);
    text-align: center;
}

.category-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.category-count {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* ===== FOOTER GLOBAL ===== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .logo-image {
        height: 35px;
        max-width: 140px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .products-scroll {
        gap: var(--spacing-md);
    }
    
    .product-card {
        min-width: 250px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ===== ESTADOS DE CARGA ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* ===== EFECTOS ADICIONALES ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-glow:hover {
    box-shadow: 0 0 20px var(--shadow);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== ICONOS SVG ===== */
.category-icon {
    width: 56px;
    height: 56px;
    color: var(--primary);
    fill: currentColor;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.15) rotate(5deg);
}

/* ===== IMÁGENES DE CATEGORÍAS ===== */
.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.category-card:hover .category-img {
    transform: scale(1.05);
}

.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--radius-lg);
    background: var(--accent-light);
    transition: all 0.3s ease;
}

.benefit-icon-svg {
    width: 56px;
    height: 56px;
    color: var(--primary);
    fill: currentColor;
    transition: all 0.3s ease;
}

.benefit-card:hover .benefit-icon {
    background: var(--primary);
    transform: translateY(-5px);
}

.benefit-card:hover .benefit-icon-svg {
    color: var(--white);
    transform: scale(1.1);
} 