/* --- Variables de Diseño --- */
:root {
    --primary: #FF4A4A;
    --dark: #121214;
    --light: #F8F9FA;
    --gray: #E2E8F0;
    --whatsapp: #25D366;
    --radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; scroll-behavior: smooth; }

body { background-color: var(--light); color: var(--dark); overflow-x: hidden; }

/* --- Header & Navegación --- */
header { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background: rgba(255, 255, 255, 0.95); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.05); backdrop-filter: blur(5px); }
.logo { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.logo i { color: #FF4A4A; }
nav { display: flex; align-items: center; }
nav a { margin-left: 25px; text-decoration: none; color: var(--dark); font-weight: 600; transition: var(--transition); font-size: 0.95rem; }
nav a:hover { color: var(--primary); }
.nav-highlight { color: var(--primary); position: relative; }
.nav-highlight::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px; background: var(--primary); }
.btn-nav { background: var(--dark); color: white !important; padding: 10px 20px; border-radius: 30px; }
.btn-nav:hover { background: #333 !important; }

/* --- Hero Section Profesional --- */
.hero { 
    display: flex; 
    align-items: center; 
    min-height: 80vh; 
    padding: 40px 5%; 
    gap: 40px; 
    position: relative; 
    overflow: hidden; /* Esto evita que la animación se salga del banner */
    background: #121214; 
}

/* El fondo animado (Mesh Gradient) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, #FF4A4A, #FFD700, #4EA8DE, #A06CD5);
    background-size: 300% 300%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

/* El contenido (Texto y botones) */
.hero-content { 
    flex: 1; 
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.85); 
    padding: 50px; 
    border-radius: 25px;
    backdrop-filter: blur(10px); /* Efecto vidrio esmerilado */
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-content h1 { font-size: 3.8rem; margin-bottom: 20px; line-height: 1.1; font-weight: 900; }
.text-gradient { background: linear-gradient(45deg, #FF4A4A, #ED8936); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { font-size: 1.2rem; color: #4A5568; margin-bottom: 35px; line-height: 1.6; }

.btn-primary {
    background: var(--dark);
    color: white;
    border: 2px solid white;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background: white;
    color: var(--dark);
    border-color: var(--dark);
}

.hero-visual { flex: 1; display: flex; justify-content: center; position: relative; z-index: 1; }

.splash-circle { 
    width: 320px; 
    height: 320px; 
    background: rgba(255, 255, 255, 0.2); 
    border-radius: 50%; 
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.4);
    animation: pulseCircle 6s infinite ease-in-out; 
}

/* Animación del fondo */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Secciones Generales --- */
.interactive-section, .calculator-section, .cart-section, .services-section, .products-section, .brands-section { padding: 80px 5%; border-bottom: 1px solid rgba(0,0,0,0.03); }
.section-header { text-align: center; margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: 2.4rem; margin-bottom: 15px; font-weight: 800; color: var(--dark); }
.section-header p { color: #64748b; font-size: 1.1rem; line-height: 1.5; }

/* --- NUEVA SECCIÓN: Servicios --- */
.services-section { background: white; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.service-card { background: var(--light); padding: 40px 30px; border-radius: var(--radius); transition: var(--transition); border: 1px solid var(--gray); }
.service-card:hover { transform: translateY(-5px); background: white; box-shadow: 0 15px 30px rgba(0,0,0,0.05); border-color: transparent; }
.service-icon { font-size: 2.5rem; color: #FF4A4A; margin-bottom: 20px; }
.service-card h3 { font-size: 1.4rem; margin-bottom: 12px; font-weight: 700; }
.service-card p { color: #4a5568; line-height: 1.6; font-size: 0.95rem; }

/* --- NUEVA SECCIÓN: Productos --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.product-card { background: white; padding: 40px 30px; border-radius: var(--radius); position: relative; border: 1px solid var(--gray); box-shadow: 0 4px 10px rgba(0,0,0,0.02); transition: var(--transition); overflow: hidden; }
.product-card:hover { transform: scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.06); }
.product-badge { position: absolute; top: 15px; right: 15px; background: #e0f2fe; color: #0369a1; padding: 4px 12px; font-size: 0.75rem; font-weight: 700; border-radius: 20px; }
.product-badge.technical { background: #fee2e2; color: #991b1b; }
.product-badge.industrial { background: #fef3c7; color: #92400e; }
.product-icon-box { width: 60px; height: 60px; background: #fff5f5; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #FF4A4A; margin-bottom: 25px; }
.product-card h3 { font-size: 1.35rem; margin-bottom: 12px; font-weight: 700; }
.product-card p { color: #64748b; line-height: 1.6; font-size: 0.95rem; }

/* --- NUEVA SECCIÓN: Marcas --- */
.brands-section { background: white; }
.brands-slider-container { display: flex; justify-content: center; align-items: center; gap: 50px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto; padding: 20px 0; }
.brand-logo-item { font-size: 1.8rem; font-weight: 900; color: #cbd5e1; letter-spacing: 3px; transition: var(--transition); user-select: none; }
.brand-logo-item:hover { color: var(--dark); transform: scale(1.1); }

/* --- Simulador (Independiente) --- */
.interactive-section { background: var(--light); }
.simulator-container { display: flex; gap: 40px; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }

.room-img { width: 100%; display: block; }

.color-picker-panel { flex: 0.8; background: white; padding: 30px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.05); min-width: 280px; border: 1px solid var(--gray); }
.color-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 20px 0; }
.color-dot { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 4px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); cursor: pointer; background: var(--color-hex); }
.color-dot.active { border-color: var(--dark); transform: scale(1.1); }

.rgb-picker-container { display: flex; align-items: center; gap: 15px; margin-top: 10px; margin-bottom: 20px; }
input[type="color"] { -webkit-appearance: none; border: none; width: 60px; height: 60px; border-radius: 50%; cursor: pointer; padding: 0; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }

.color-details { margin-bottom: 20px; font-size: 1.1rem; background: var(--light); padding: 15px; border-radius: 8px; text-align: center; border: 1px solid var(--gray); }
.btn-secondary { width: 100%; padding: 15px; border: none; background: var(--dark); color: white; border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-secondary:hover { background: #333; }

/* --- Calculadora --- */
.calculator-section { background: white; }
.calc-card { max-width: 600px; margin: 0 auto; background: var(--light); padding: 40px; border-radius: var(--radius); text-align: center; border: 1px solid var(--gray); }
.range-container { margin: 30px 0; }
.slider { width: 100%; height: 8px; border-radius: 5px; background: #cbd5e1; outline: none; -webkit-appearance: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 25px; height: 25px; border-radius: 50%; background: #FF4A4A; cursor: pointer; }
.slider-value { font-size: 1.8rem; font-weight: 700; margin-top: 15px; color: #FF4A4A; }
.results-grid { display: flex; gap: 20px; margin: 20px 0; }
.result-box { flex: 1; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid var(--gray); }
.result-num { display: block; font-size: 2rem; font-weight: 800; }
.add-cart-btn { width: 100%; font-size: 1.1rem; }

/* --- Carrito --- */
.cart-section { background: var(--light); }
.cart-container { max-width: 800px; margin: 0 auto; background: white; padding: 30px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.04); border: 1px solid var(--gray); }
.cart-empty { text-align: center; padding: 40px 0; color: #64748b; }
.cart-items-container { display: flex; flex-direction: column; gap: 15px; }

.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: var(--light); border-radius: 8px; border-left: 5px solid var(--item-color); position: relative; }
.cart-item-color-preview { width: 40px; height: 40px; border-radius: 50%; background-color: var(--item-color); box-shadow: 0 2px 5px rgba(0,0,0,0.15); }
.cart-item-info { flex: 1; margin-left: 15px; }
.cart-item-info strong { display: block; font-size: 1.1rem; }
.cart-item-info span { color: #64748b; font-size: 0.9rem; }
.cart-item-stats { text-align: right; margin-right: 20px; }
.cart-item-stats strong { font-size: 1.2rem; color: var(--dark); }

.btn-delete-item { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 1.2rem; transition: var(--transition); padding: 5px; display: flex; align-items: center; justify-content: center; }
.btn-delete-item:hover { color: #b91c1c; transform: scale(1.2); }

.cart-actions { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.btn-whatsapp { background: var(--whatsapp); color: white; border: none; padding: 15px 30px; font-size: 1.2rem; font-weight: bold; border-radius: 50px; cursor: pointer; transition: var(--transition); width: 100%; max-width: 400px; box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2); }
.btn-whatsapp:hover:not(:disabled) { background: #1ebe57; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3); }
.btn-whatsapp:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; }

.btn-clear { background: transparent; border: 2px solid #ef4444; color: #ef4444; padding: 12px 25px; font-size: 1rem; font-weight: bold; border-radius: 50px; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-clear:hover { background: #ef4444; color: white; }

/* --- Footer --- */
footer { background: var(--dark); color: white; padding: 40px 5%; text-align: center; font-size: 0.95rem; }
footer p { color: #94a3b8; }

/* --- Animaciones --- */
@keyframes pulseCircle {
    0% { transform: scale(1) rotate(0deg); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { transform: scale(1.05) rotate(180deg); border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; }
    100% { transform: scale(1) rotate(360deg); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* Responsive */
@media (max-width: 992px) {
    header { flex-direction: column; gap: 15px; text-align: center; padding: 15px 5%; }
    nav { flex-wrap: wrap; justify-content: center; gap: 10px; }
    nav a { margin-left: 10px; margin-right: 10px; font-size: 0.9rem; }
    .hero { flex-direction: column; text-align: center; padding-top: 40px; }
    .hero-content h1 { font-size: 2.8rem; }
    .simulator-container { flex-direction: column; }
    .cart-item { flex-wrap: wrap; gap: 10px; }
    .cart-item-stats { text-align: left; width: 100%; margin-left: 55px; margin-right: 0; }
    .btn-delete-item { position: absolute; top: 15px; right: 15px; }
}


/* --- NUEVO: Estilos del Botón Flotante de WhatsApp --- */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999; /* Se asegura de flotar por encima de todo el contenido */
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    animation: pulseFloating 2s infinite;
}

.whatsapp-floating-btn:hover {
    background-color: #1ebe57;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
}

/* Animación de pulso sutil para atraer la atención del cliente */
@keyframes pulseFloating {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Ajuste adaptativo para pantallas móviles pequeñas */
@media (max-width: 480px) {
    .whatsapp-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}


/* --- Sistema de Capas del Simulador --- */
.main-simulator-wrapper {
    display: flex;
    flex-wrap: wrap; /* Mueve los controles abajo en celulares */
    gap: 30px; 
    align-items: flex-start;
    padding: 20px;
    max-width: 1200px; /* Evita que crezca demasiado en pantallas gigantes */
    margin: 0 auto;    /* Centra todo el simulador en la pantalla */
}

.room-container {
    flex: 1;           /* Ocupa el espacio restante */
    min-width: 400px;  /* No deja que se encoja menos de esto */
    max-width: 700px;  /* Limita el tamaño de la imagen */
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.layer-base, .layer-furniture {
    width: 100%;
    height: auto;      /* Mantiene la proporción de la sala */
    display: block;
}

/* La capa de pintura */
.layer-color {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background-color: var(--primary);
    mix-blend-mode: multiply; /* ¡Esto es lo que hace que parezca pintura! */
}

/* La capa de muebles */
.layer-furniture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    pointer-events: none; /* Crucial para que no bloquee clics */
}

.controls-container {
    flex: 0 0 350px;   /* Tamaño fijo para los controles */
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}