:root {
    --primary-plum: #352338;
    --soft-mauve: #9A7188;
    --champagne-gold: #D6B36A;
    --blush-cream: #F7F0EC;
    --porcelain: #FFFDFC;
    --powder-pink: #EAD9DF;
    --espresso: #282024;
    --muted-taupe: #887B7D;
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s ease;
    
    --nav-height: 80px;
}

/* BASE */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--porcelain);
}

body {
    font-family: var(--font-sans);
    color: var(--espresso);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    background-color: var(--porcelain);
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul {
    list-style: none;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, .serif {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--primary-plum);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.8rem); }

p {
    margin-bottom: 1.5rem;
    color: var(--espresso);
}

.editorial-label {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--champagne-gold);
    display: block;
    margin-bottom: 0.5rem;
}

/* LAYOUT */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 6rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* HEADER & NAV */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 253, 252, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--powder-pink);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand-logo a {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--primary-plum);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--espresso);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: var(--champagne-gold);
}

.header-actions button {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-plum);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-plum);
    color: var(--porcelain);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-plum);
    border-color: var(--primary-plum);
}

.btn-secondary:hover {
    background-color: var(--blush-cream);
}

/* HERO - 3D STUDIO DRIFT */
.hero {
    min-height: 100vh;
    padding-top: var(--nav-height);
    display: flex;
    align-items: center;
    background: radial-gradient(circle at center, var(--blush-cream) 0%, var(--porcelain) 100%);
    overflow: hidden;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 50vw;
    height: 80vh;
    perspective: 1000px;
    z-index: 1;
}

.drift-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.drift-item {
    position: absolute;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.drift-item img {
    filter: drop-shadow(0 20px 30px rgba(53, 35, 56, 0.15));
}

.item-serum { top: 10%; right: 20%; width: 120px; z-index: 5; }
.item-gel { top: 40%; left: 10%; width: 150px; z-index: 3; }
.item-tool { bottom: 15%; right: 30%; width: 180px; z-index: 4; }
.item-ring { top: 20%; left: 30%; width: 300px; opacity: 0.3; z-index: 1; border: 1px solid var(--champagne-gold); border-radius: 50%; aspect-ratio: 1; }
.item-ring-2 { bottom: 10%; right: 10%; width: 200px; opacity: 0.2; z-index: 1; border: 2px solid var(--soft-mauve); border-radius: 50%; aspect-ratio: 1; }

/* PRODUCT CARDS */
.product-card {
    background: var(--porcelain);
    border: 1px solid var(--powder-pink);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(53, 35, 56, 0.05);
    border-color: var(--champagne-gold);
}

.product-image-wrap {
    aspect-ratio: 1;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blush-cream);
    border-radius: 4px;
    overflow: hidden;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-meta {
    flex-grow: 1;
}

.product-brand {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-taupe);
    margin-bottom: 0.25rem;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    color: var(--primary-plum);
}

.product-desc {
    font-size: 0.9rem;
    color: var(--espresso);
    margin-bottom: 1.5rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.product-actions .btn {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    flex: 1;
}

/* ROUTINE BUILDER */
.routine-builder {
    background: var(--primary-plum);
    color: var(--porcelain);
    padding: 6rem 0;
    text-align: center;
}

.routine-builder h2 {
    color: var(--porcelain);
    margin-bottom: 2rem;
}

.routine-builder p,
.routine-builder h1, 
.routine-builder h3, 
.routine-builder h4 {
    color: var(--porcelain);
}

.builder-step {
    display: none;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.builder-step.active {
    display: block;
}

.builder-options {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.builder-option {
    padding: 1.5rem;
    border: 1px solid rgba(255, 253, 252, 0.2);
    background: transparent;
    color: var(--porcelain);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.builder-option:hover, .builder-option.selected {
    background: var(--champagne-gold);
    color: var(--primary-plum);
    border-color: var(--champagne-gold);
}

/* ANATOMY SECTION */
.anatomy-section {
    background: var(--blush-cream);
    padding: 6rem 0;
}

.anatomy-container {
    position: relative;
    max-width: 800px;
    margin: 3rem auto;
}

.anatomy-img {
    width: 100%;
    border-radius: 8px;
}

.hotspot {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--champagne-gold);
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px rgba(214, 179, 106, 0.3);
    transition: var(--transition-fast);
}

.hotspot:hover, .hotspot.active {
    background: var(--primary-plum);
    box-shadow: 0 0 0 6px rgba(53, 35, 56, 0.2);
}

.hotspot-panel {
    position: absolute;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--porcelain);
    padding: 1.5rem;
    border: 1px solid var(--powder-pink);
    width: 300px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.hotspot.active + .hotspot-panel {
    opacity: 1;
    pointer-events: auto;
    bottom: -120px;
}

/* SEARCH OVERLAY */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 253, 252, 0.98);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.search-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.search-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: var(--primary-plum);
}

.search-input-wrap {
    width: 80%;
    max-width: 800px;
    border-bottom: 2px solid var(--primary-plum);
}

.search-input {
    width: 100%;
    padding: 1rem 0;
    font-size: 2rem;
    font-family: var(--font-serif);
    border: none;
    background: transparent;
    outline: none;
    color: var(--primary-plum);
}

.search-suggestions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.suggestion-tag {
    padding: 0.5rem 1rem;
    background: var(--blush-cream);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--espresso);
    cursor: pointer;
}

/* FOOTER */
.site-footer {
    background: var(--primary-plum);
    color: var(--porcelain);
    padding: 6rem 0 2rem;
}

.site-footer p,
.site-footer h1, 
.site-footer h2, 
.site-footer h3, 
.site-footer h4,
.site-footer .mandatory-notice p {
    color: var(--porcelain);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--champagne-gold);
    margin-bottom: 1rem;
}

.footer-links h4 {
    color: var(--porcelain);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.footer-links ul li { margin-bottom: 0.75rem; }
.footer-links ul li a { opacity: 0.7; font-size: 0.9rem; }
.footer-links ul li a:hover { opacity: 1; color: var(--champagne-gold); }

.mandatory-notice {
    font-size: 0.75rem;
    opacity: 0.6;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .hero-visual { display: none; }
    .hero-content { text-align: center; margin: 0 auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

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

/* GLOSSARY */
.glossary-item {
    border-bottom: 1px solid var(--powder-pink);
    padding: 1.5rem 0;
}
.glossary-term {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--primary-plum);
    margin-bottom: 0.5rem;
}

/* COMPARISON */
.comparison-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
}
.compare-col {
    min-width: 300px;
    background: var(--porcelain);
    padding: 2rem;
    border: 1px solid var(--powder-pink);
}
.compare-row {
    border-bottom: 1px solid var(--powder-pink);
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
}
.compare-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted-taupe);
}

/* ERROR PAGE */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--blush-cream);
}

/* GUIDES */
.guide-article {
    background: var(--porcelain);
    padding: 3rem;
    border-radius: 4px;
    border: 1px solid var(--powder-pink);
}
.guide-article h3 {
    margin-bottom: 1rem;
}

/* IMAGE FALLBACK PLACEHOLDER */
.img-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--blush-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    color: var(--soft-mauve);
    font-size: 1rem;
    text-align: center;
    border: 1px solid var(--powder-pink);
}

/* UTILITIES */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-4 { margin-top: 4rem; }
.d-none { display: none !important; }