:root {
    /* Perfumería Premium - Negro/Dorado */
    --p-dark: #0d0d0d;
    --p-dark-alt: #1a1a1a;
    --p-primary: #D4AF37;
    --p-primary-dark: #B8860B;
    
    /* La Casa Del Outfit - Azul Oscuro/Coral */
    --o-dark: #1a1a2e;
    --o-primary: #e94560;
    --o-primary-dark: #c12c46;
    
    /* Globales */
    --white: #ffffff;
    --gray: #cccccc;
    --light-gray: #f0f0f0;
    --whatsapp: #25D366;
    --error: #e74c3c;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

/* Base */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; font-size: 16px; }
body { 
    font-family: var(--font-body); 
    line-height: 1.6; 
    color: var(--white); 
    background-color: var(--p-dark); 
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

body.outfit-mode { background-color: var(--o-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

/* Typography */
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; }
.text-gold { color: var(--p-primary); }
.text-coral { color: var(--o-primary); }

/* Layout SPA */
.page { display: none; padding: 80px 0; min-height: 80vh; }
.page.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 10px 0;
}
body.outfit-mode .navbar { 
    background: rgba(26, 26, 46, 0.95); 
    border-bottom-color: rgba(233, 69, 96, 0.2); 
}

.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; font-family: var(--font-heading); color: var(--p-primary); }
body.outfit-mode .logo { color: var(--o-primary); }

.nav-actions { display: flex; gap: 15px; align-items: center; }
.icon-btn { background: none; color: var(--white); font-size: 1.4rem; position: relative; }
.badge { 
    position: absolute; top: -5px; right: -8px; 
    background: var(--p-primary); color: var(--p-dark); 
    font-size: 0.7rem; font-weight: 700; 
    width: 18px; height: 18px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center;
}
body.outfit-mode .badge { background: var(--o-primary); color: var(--white); }

/* Hero Section */
.hero { 
    padding: 120px 0 60px; text-align: center; 
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}
body.outfit-mode .hero { background: radial-gradient(circle at center, rgba(233, 69, 96, 0.1) 0%, transparent 70%); }

.hero h1 { font-size: 3rem; margin-bottom: 15px; }
.hero p { color: var(--gray); font-size: 1.1rem; max-width: 600px; margin: 0 auto 30px; }

/* Switcher */
.store-switcher { 
    display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; 
    background: var(--p-dark-alt); padding: 5px; border-radius: 50px; width: fit-content; margin-left: auto; margin-right: auto;
}
.switch-btn { 
    padding: 10px 25px; border-radius: 50px; font-weight: 600; 
    background: transparent; color: var(--gray); transition: var(--transition);
}
.switch-btn.active.perfume { background: var(--p-primary); color: var(--p-dark); }
.switch-btn.active.outfit { background: var(--o-primary); color: var(--white); }

/* Catalog */
.filters { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 20px; margin-bottom: 30px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter-chip { 
    white-space: nowrap; padding: 8px 20px; border-radius: 20px; 
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); 
    color: var(--white); font-size: 0.9rem;
}
.filter-chip.active { background: var(--p-primary); color: var(--p-dark); border-color: var(--p-primary); }
body.outfit-mode .filter-chip.active { background: var(--o-primary); color: var(--white); border-color: var(--o-primary); }

.search-bar { width: 100%; padding: 12px 20px; border-radius: 10px; background: var(--p-dark-alt); border: 1px solid rgba(255,255,255,0.1); color: var(--white); margin-bottom: 30px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; } }

.card { 
    background: var(--p-dark-alt); border-radius: 12px; overflow: hidden; 
    border: 1px solid rgba(255,255,255,0.05); transition: var(--transition);
    position: relative;
}
.card:hover { transform: translateY(-5px); border-color: var(--p-primary); }
body.outfit-mode .card:hover { border-color: var(--o-primary); }

.card-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #222; }
.card-body { padding: 12px; }
.card-brand { font-size: 0.75rem; text-transform: uppercase; color: var(--p-primary); letter-spacing: 1px; }
body.outfit-mode .card-brand { color: var(--o-primary); }
.card-title { font-size: 1rem; margin: 5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.price-usd { font-size: 1.2rem; font-weight: 700; color: #D4AF37; }
body.outfit-mode .price-usd { color: #e94560; }
.price-cup { font-size: 0.85rem; color: #999; font-weight: 400; }

.btn-add { 
    width: 100%; margin-top: 10px; padding: 8px; border-radius: 6px; 
    background: var(--p-primary); color: var(--p-dark); font-weight: 600; font-size: 0.9rem;
}
body.outfit-mode .btn-add { background: var(--o-primary); color: var(--white); }

/* Modals */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); z-index: 2000; 
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-content { 
    background: var(--p-dark-alt); width: 100%; max-width: 500px; 
    border-radius: 15px; position: relative; max-height: 90vh; overflow-y: auto;
    border: 1px solid rgba(212, 175, 55, 0.3);
}
body.outfit-mode .modal-content { border-color: rgba(233, 69, 96, 0.3); }

.modal-close { position: absolute; top: 15px; right: 15px; color: var(--white); font-size: 1.5rem; z-index: 10; }

/* Profile & Auth */
.auth-form { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.9rem; color: var(--gray); }
.form-group input { 
    padding: 12px; border-radius: 8px; background: var(--p-dark); 
    border: 1px solid rgba(255,255,255,0.1); color: var(--white); 
}

/* Referidos */
.referral-card { 
    background: linear-gradient(135deg, var(--p-primary-dark), var(--p-primary)); 
    color: var(--p-dark); padding: 25px; border-radius: 15px; margin-bottom: 30px;
}
.ref-code { font-size: 2rem; font-weight: 800; letter-spacing: 2px; margin: 15px 0; }

/* Carrito */
.cart-item { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.cart-item-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-controls { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.qty-btn { width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,0.1); color: var(--white); }

/* Footer */
.footer { padding: 40px 0; background: var(--p-dark-alt); border-top: 1px solid rgba(255,255,255,0.05); margin-top: 50px; }
.social-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.social-links a { font-size: 1.5rem; color: var(--gray); }
.social-links a:hover { color: var(--p-primary); }

/* Utils */
.hidden { display: none !important; }
.loading { text-align: center; padding: 40px; }
.spinner { 
    width: 40px; height: 40px; border: 4px solid rgba(212, 175, 55, 0.1); 
    border-top-color: var(--p-primary); border-radius: 50%; 
    animation: spin 1s linear infinite; margin: 0 auto 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Bottom Nav for Mobile */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; 
    background: rgba(13, 13, 13, 0.95); backdrop-filter: blur(10px);
    display: flex; justify-content: space-around; padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.05); z-index: 1000;
}
@media (min-width: 768px) { .bottom-nav { display: none; } }
.nav-item { display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; color: var(--gray); }
.nav-item.active { color: var(--p-primary); }
body.outfit-mode .nav-item.active { color: var(--o-primary); }
.nav-item i { font-size: 1.2rem; margin-bottom: 2px; }

/* Low Stock Alert Styles */
.card.low-stock {
    position: relative;
    border: 2px solid #ff6b35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}
.low-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff6b35, #e74c3c);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 10;
    animation: pulse-stock 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}
@keyframes pulse-stock {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
