/* --- CONFIGURACIÓN BASE --- */
:root {
    --bg: #f8f9fa;
    --text: #1f2933;
    --muted: #6b7280;
    --card: #ffffff;
    --accent: #16a34a; 
    --accent-hover: #15803d;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --radius: 16px;
}

body.dark {
    --bg: #0f172a;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --card: #1e293b;
    --accent: #22c55e;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
}

* { margin:0; padding:0; box-sizing:border-box; font-family: 'Segoe UI', system-ui, sans-serif; }

body { background: var(--bg); color: var(--text); transition: .3s; padding-bottom: 80px; }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* --- NAV --- */
.nav {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 15px 5%; display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.05);
}
body.dark .nav { background: rgba(15, 23, 42, 0.95); border-bottom: 1px solid rgba(255,255,255,0.05); }
.logo { font-weight: 800; letter-spacing: 1px; font-size: 1.3rem; text-transform: uppercase; display: flex; align-items: center; gap: 10px;}
.logo span { color: var(--accent); }
.menu-btn { font-size: 1.5rem; background: none; border: none; color: var(--text); cursor: pointer; }

/* --- HERO --- */
header {
    margin-top: 60px; padding: 60px 20px; text-align: center;
    background: linear-gradient(135deg, var(--card) 0%, var(--bg) 100%);
    border-bottom-left-radius: 40px; border-bottom-right-radius: 40px;
    box-shadow: var(--shadow);
}
header h1 { font-size: 2.5rem; line-height: 1.1; margin-bottom: 10px; text-transform: uppercase; }
.promo-badge { background: var(--accent); color: white; padding: 5px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; margin-bottom: 15px; display: inline-block;}

/* --- FILTROS --- */
.filters { display: flex; justify-content: center; gap: 10px; padding: 30px 20px 10px; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; border-radius: 30px; border: 1px solid var(--muted); background: transparent; color: var(--muted); cursor: pointer; transition: .3s; font-weight: 600; }
.filter-btn.active, .filter-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

/* --- CATALOGO --- */
.catalogo { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; padding: 30px 5%; max-width: 1200px; margin: auto; }

.card { 
    background: var(--card); border-radius: var(--radius); 
    box-shadow: var(--shadow); overflow: hidden; position: relative; 
    border: 1px solid rgba(0,0,0,0.03); transition: transform 0.3s; 
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); }

/* CARD PRÓXIMAMENTE */
.card.coming-soon { opacity: 0.6; pointer-events: none; border: 2px dashed var(--muted); box-shadow: none; }
.coming-soon .slider-wrapper { background: transparent; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: bold; letter-spacing: 2px;}

/* --- SLIDER Y CONTROL DE COLORES --- */
.slider-wrapper { 
    position: relative; 
    aspect-ratio: 4/5; 
    overflow: hidden; 
    background: #ffffff; 
}
.slider { display: flex; width: 100%; height: 100%; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }

.slider img { 
    min-width: 100%; 
    height: 100%; 
    object-fit: contain; 
    padding: 5px; 
}

/* Ocultar imágenes que no coinciden con el color seleccionado */
.slider img.hidden-slide { display: none; } 

.slide-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: white; border: none;
    width: 35px; height: 35px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; z-index: 10;
}
.slide-btn:hover { background: var(--accent); }
.prev { left: 10px; }
.next { right: 10px; }

/* Botones de colores */
.color-options { display: flex; gap: 10px; margin-bottom: 10px; justify-content: center; }
.color-btn { width: 25px; height: 25px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.color-btn:hover { transform: scale(1.1); }
.color-btn.selected { border-color: var(--text); transform: scale(1.15); }

.card-body { padding: 18px; display: flex; flex-direction: column; flex-grow: 1; }
.category-tag { font-size: 0.75rem; color: var(--accent); font-weight: bold; text-transform: uppercase; }
.price { font-size: 1.2rem; font-weight: 800; }
.buy-btn { background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 12px; font-size: 0.9rem; font-weight: 600; cursor: pointer; text-align: center;}

.stock-info { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }

/* --- MENU LATERAL --- */
.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 80%; max-width: 300px; height: 100vh;
    background: var(--card); padding: 30px; transition: .4s; z-index: 2000;
    display: flex; flex-direction: column; gap: 20px; box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.mobile-menu.active { right: 0; }
.mobile-link { font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--muted); opacity: 0.8; cursor: pointer; }

/* --- MODAL DE CONTACTO --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 3000;
    display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s;
}
.modal-overlay.open { display: flex; opacity: 1; }

.contact-box {
    background: var(--card); padding: 30px; border-radius: 20px;
    width: 90%; max-width: 350px; text-align: center;
    transform: scale(0.8); transition: transform 0.3s; position: relative;
}
.modal-overlay.open .contact-box { transform: scale(1); }

.wsp-option {
    display: flex; align-items: center; gap: 15px;
    background: #25D366; color: white; padding: 12px 20px;
    border-radius: 12px; margin-bottom: 10px; text-align: left;
    transition: .2s;
}
.wsp-option:hover { filter: brightness(1.1); }
.wsp-option strong { display: block; font-size: 0.9rem; }
.wsp-option small { font-size: 0.8rem; opacity: 0.9; }

.close-modal-btn { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; cursor: pointer; color: var(--muted); }

/* --- BOTONES FLOTANTES --- */
.float-btns { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 15px; z-index: 900; }
.btn-float {
    width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; box-shadow: 0 4px 15px rgba(0,0,0,0.3); cursor: pointer; color: white; transition: transform .2s;
}
.btn-float:hover { transform: scale(1.1); }
.btn-wsp { background: #25D366; }
.btn-theme { background: var(--text); color: var(--bg); }

footer { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.9rem; }