/* 
 * ESTÉTICA CLINICAL CHIC (BLANCO INMACULADO + ALTA GAMA)
 */

:root {
    --color-bg: #FFFFFF; 
    --color-surface: #F9F9FB; 
    --color-text: #1C1D1F; 
    --color-text-muted: #8E8E93; 
    --color-border: #E5E5EA; 
    --color-accent: #000000;
    
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --space-sm: 1.5rem;
    --space-md: 3rem;
    --space-lg: 6rem;
    --space-xl: 10rem;
    --max-width: 1300px;
}

*, *::before, *::after { box-sizing: border-box; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
    margin: 0; padding: 0; font-family: var(--font-body); font-weight: 300;
    background-color: var(--color-bg); color: var(--color-text); line-height: 1.5;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    overflow: hidden; 
}

/* PRELOADER DE LUJO */
#preloader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: var(--color-bg); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}
.loader-content { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.loader-logo { font-size: 1rem; font-weight: 300; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 2rem; color: var(--color-text); }
.loader-line-container { width: 120px; height: 1px; background-color: #E5E5EA; position: relative; overflow: hidden; }
.loader-line { position: absolute; top: 0; left: 0; height: 100%; background-color: #000; width: 0%; }

body.loaded { overflow: auto; }
#preloader.hide { transform: translateY(-100%); opacity: 0; pointer-events: none; }

h1, h2, h3 { font-weight: 300; letter-spacing: -0.04em; margin-top: 0; color: var(--color-text); }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-sm); }

/* Header */
.site-header {
    padding: var(--space-sm) 0;
    background-color: rgba(255, 255, 255, 0.7); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100; border-bottom: 1px solid rgba(0,0,0,0.03);
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 500; font-size: 1.1rem; letter-spacing: 0.02em; }
.main-nav { display: flex; gap: var(--space-md); }
.main-nav a { font-size: 0.85rem; color: var(--color-text-muted); transition: color 0.3s; }
.main-nav a:hover { color: var(--color-text); }

.cart-toggle {
    background: none; border: none; font-size: 0.85rem; padding: 0.5rem 1.5rem;
    border-radius: 99px; background-color: var(--color-surface); transition: background-color 0.3s;
}
.cart-toggle:hover { background-color: var(--color-border); }

/* Hero */
.hero { padding: calc(var(--space-xl) + 60px) 0 var(--space-lg); text-align: center; }
.line-wrap { display: block; overflow: hidden; }
.line { display: block; transform: translateY(110%); }
.hero h1 { font-size: clamp(3.5rem, 8vw, 6.5rem); line-height: 1.1; margin-bottom: var(--space-sm); font-weight: 200; }
.hero p { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--color-text-muted); max-width: 650px; margin: 0 auto; opacity: 0; transform: translateY(20px); }

/* Catálogo Bento */
.catalog-section { padding-bottom: var(--space-xl); background-color: var(--color-bg); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: var(--space-sm); }
.product-card {
    background-color: var(--color-surface); border-radius: 20px; padding: var(--space-sm);
    display: flex; flex-direction: column; text-align: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; position: relative; opacity: 0;
}
.product-card:hover { transform: scale(1.02); }
.product-info { margin-bottom: var(--space-sm); z-index: 2; margin-top: 1rem; }
.product-info h2 { font-size: 1.5rem; font-weight: 300; margin-bottom: 0.25rem; }
.product-info p.desc { font-size: 0.9rem; color: var(--color-text-muted); margin: 0 0 1rem 0; letter-spacing: 0.02em; }
.product-info p.price { font-size: 1.2rem; font-weight: 400; }

.product-image {
    width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 14px;
    margin-top: auto; background-color: #FFFFFF; padding: 1rem;
}

/* Footer */
.site-footer { padding: var(--space-lg) 0; text-align: center; border-top: 1px solid var(--color-border); font-size: 0.8rem; color: var(--color-text-muted); }

/* Botones genéricos */
.btn-primary { background: var(--color-accent); color: white; border: none; padding: 1.2rem; width: 100%; border-radius: 99px; font-size: 1rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1rem; transition: opacity 0.3s;}
.btn-primary:hover { opacity: 0.9; }

/* -----------------------------
 * CARRITO DE COMPRAS (DRAWER)
 * ----------------------------- */
.cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(5px);
    z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.cart-overlay.active { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed; top: 0; right: 0; width: 100%; max-width: 450px; height: 100%;
    background-color: var(--color-bg); z-index: 1000;
    transform: translateX(100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
}
.cart-drawer.active { transform: translateX(0); }

.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 2rem; border-bottom: 1px solid var(--color-border); }
.cart-header h3 { margin: 0; font-weight: 400; }
#close-cart { background: none; border: none; font-size: 2rem; color: var(--color-text-muted); padding: 0; line-height: 1; }
#close-cart:hover { color: var(--color-text); }

.cart-body { flex: 1; overflow-y: auto; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.cart-empty-msg { text-align: center; color: var(--color-text-muted); margin: auto; }

.cart-item { display: flex; gap: 1rem; align-items: center; }
.cart-item img { width: 80px; height: 80px; border-radius: 12px; object-fit: contain; background: var(--color-surface); padding: 0.5rem;}
.cart-item-details { flex: 1; }
.cart-item-title { font-weight: 500; font-size: 0.95rem; margin-bottom: 0.2rem;}
.cart-item-price { color: var(--color-text-muted); font-size: 0.9rem;}
.remove-item { background: none; border: none; color: red; font-size: 0.8rem; padding: 0; margin-top: 0.5rem; text-decoration: underline; opacity: 0.7;}
.remove-item:hover { opacity: 1; }

.cart-footer { padding: 2rem; border-top: 1px solid var(--color-border); background: var(--color-bg); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 500; margin-bottom: 1rem; }
