:root {
    --primary: #A7D46F;
    --secondary: #6E8B57;
    --accent: #E2B86B;
    --highlight: #8DD8C0;
    --bg-deep: #101816;
    --bg-secondary: #17221E;
    --surface: #202D27;
    --surface-light: #F2F4EA;
    --text-main: #EEF3EA;
    --text-dark: #172019;
    --text-muted: #87948C;
    --border: #39483F;
    --glow: #B9E982;
    --glass-bg: rgba(32, 45, 39, 0.65);
    --glass-border: rgba(167, 212, 111, 0.15);
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html {
    font-family: var(--font-stack);
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(167, 212, 111, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(141, 216, 192, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--text-main); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.text-muted { color: var(--text-muted); }
.text-highlight { color: var(--highlight); }

/* Header & Nav (Non-sticky) */
.site-header {
    position: relative;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: transparent;
    z-index: 100;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--glow);
}

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

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

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-dark);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--glow);
    box-shadow: 0 0 15px rgba(167, 212, 111, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-deep);
    z-index: 999;
    padding: 5rem 5%;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu .nav-links {
    flex-direction: column;
    font-size: 1.5rem;
}

.close-mobile {
    position: absolute;
    top: 1.5rem;
    right: 5%;
    font-size: 2rem;
}

/* Hero Scalp Pulse */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 4rem 5%;
    overflow: hidden;
}

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

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-goals {
    margin-top: 3rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.goal-chip {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--surface);
    cursor: pointer;
}

.goal-chip:hover, .goal-chip.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(167, 212, 111, 0.1);
}

.hero-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scalp-pulse-container {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(167, 212, 111, 0.2);
    animation: pulseAnim 4s infinite linear;
}

.pulse-ring:nth-child(1) { width: 100%; height: 100%; animation-delay: 0s; }
.pulse-ring:nth-child(2) { width: 75%; height: 75%; animation-delay: -1s; }
.pulse-ring:nth-child(3) { width: 50%; height: 50%; animation-delay: -2s; border-color: rgba(141, 216, 192, 0.4); }

@keyframes pulseAnim {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}

.core-follicle {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 50px var(--glow);
    z-index: 2;
    transition: transform 0.3s ease;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--highlight);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--highlight);
    pointer-events: none;
    transition: all 0.5s ease-out;
}

/* Sections */
.section-pad {
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: var(--primary);
}

/* Horizontal Rail (Products) */
.product-rail-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2rem;
}
.product-rail-wrapper::-webkit-scrollbar { display: none; }

.product-rail {
    display: flex;
    gap: 2rem;
    width: max-content;
}

.product-card {
    width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.product-img-wrap {
    width: 100%;
    height: 300px;
    position: relative;
    background: var(--bg-deep);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img {
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05) rotate(2deg);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

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

.product-name {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--text-muted);
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-card {
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}
.btn-card.specs { background: var(--bg-secondary); color: var(--text-main); }
.btn-card.specs:hover { background: var(--border); }
.btn-card.official { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-card.official:hover { background: rgba(167, 212, 111, 0.1); }

.compare-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}
.compare-toggle:hover, .compare-toggle.active {
    color: var(--primary);
    border-color: var(--primary);
}

/* Scalp Map */
.scalp-map-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 2rem;
    background: var(--surface);
    border-radius: 2rem;
    border: 1px solid var(--border);
}

.map-svg-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

.scalp-zone {
    fill: var(--bg-secondary);
    stroke: var(--border);
    stroke-width: 2;
    transition: var(--transition);
    cursor: pointer;
}

.scalp-zone:hover, .scalp-zone.active {
    fill: rgba(167, 212, 111, 0.2);
    stroke: var(--primary);
    filter: drop-shadow(0 0 10px rgba(167, 212, 111, 0.3));
}

.zone-info-panel {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 1rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Ingredient Orbit */
.orbit-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-center {
    width: 150px;
    height: 150px;
    background: var(--surface);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
    box-shadow: 0 0 30px rgba(167, 212, 111, 0.1);
    padding: 1rem;
}

.ingredient-node {
    position: absolute;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    transform: translate(-50%, -50%);
    z-index: 5;
    white-space: nowrap;
}

.ingredient-node:hover, .ingredient-node.active {
    background: var(--primary);
    color: var(--text-dark);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glow);
    z-index: 20;
}

/* Product Catalog Grid */
.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

.filters-sidebar {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.filter-opt {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-main);
}
.filter-opt input { margin-right: 0.5rem; accent-color: var(--primary); }

.search-bar {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-main);
    margin-bottom: 2rem;
}
.search-bar:focus { outline: none; border-color: var(--primary); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Comparison Tray */
.comparison-tray {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 900;
}
.comparison-tray.active { transform: translateY(0); }

.compare-items {
    display: flex;
    gap: 1rem;
}

.compare-item-thumb {
    width: 50px;
    height: 50px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.compare-item-thumb img { max-height: 80%; }
.remove-compare {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Compare Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(16, 24, 22, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.compare-modal {
    background: var(--surface);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 2rem;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.compare-table th, .compare-table td {
    border: 1px solid var(--border);
    padding: 1rem;
    text-align: left;
}
.compare-table th { background: var(--bg-secondary); color: var(--primary); }

/* Routine Builder */
.routine-steps-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.routine-step-row {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    gap: 2rem;
}

.step-num {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 300;
    opacity: 0.5;
}
.step-details { flex-grow: 1; }
.step-slot {
    width: 200px;
    height: 100px;
    border: 1px dashed var(--border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background: var(--bg-deep);
}
.step-slot.filled {
    border-style: solid;
    border-color: var(--primary);
    background: rgba(167, 212, 111, 0.05);
}

/* Routine Modal Grid Specifics */
#routine-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Detail Page */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 5%;
}
.detail-gallery {
    background: var(--surface);
    border-radius: 2rem;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.detail-gallery img { max-height: 500px; }
.spec-list { margin-top: 2rem; }
.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.spec-label { color: var(--text-muted); }

/* Footer */
.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    padding: 4rem 5% 2rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-col h4 { color: var(--primary); margin-bottom: 1.5rem; font-size: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }

.legal-disclaimers {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: justify;
}
.legal-disclaimers p { margin-bottom: 1rem; }

/* Cookie Banner Updates */
.cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 1rem;
}
@media(min-width: 768px) {
    .cookie-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        max-width: 1000px;
        bottom: 2rem;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        padding: 1.5rem 2rem;
        gap: 2rem;
    }
}
.cookie-banner-content {
    flex: 1;
}
.cookie-banner-content h4 {
    margin-bottom: 0.25rem;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 500;
}
.cookie-banner-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    color: var(--text-muted);
}
.cookie-banner-content p a {
    color: var(--primary);
}
.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.cookie-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Cookie Blocker for forcing consent */
.cookie-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 24, 22, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cookie-blocker.active {
    opacity: 1;
    pointer-events: auto;
}
.cookie-banner.required {
    box-shadow: 0 10px 50px rgba(0,0,0,0.9), 0 0 0 1px var(--primary);
    animation: fadeInConsent 0.4s ease-out forwards;
}
@keyframes fadeInConsent {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(167, 212, 111, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Responsive */
@media (max-width: 1024px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .hero-section { grid-template-columns: 1fr; text-align: center; min-height: auto; gap: 3rem; }
    .hero-content { margin: 0 auto; }
    .hero-actions, .hero-goals { justify-content: center; }
    .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    h1 { font-size: 2.5rem; }
    .routine-step-row { flex-direction: column; text-align: center; gap: 1rem; }
    .orbit-container { height: 400px; }
}