
/* =================================
   COSMO - WEBSITE DESIGN
================================= */

:root {
    --cream: #EAE8DF;
    --off-white: #F8F7F2;
    --charcoal: #333832;
    --sage: #78816F;
    --muted: #77796F;
    --line: #D5D2C8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--off-white);
    color: var(--charcoal);
    font-family: 'DM Sans', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* HEADER */

.header {
    min-height: 82px;
    padding: 20px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    letter-spacing: 3px;
}

.logo span {
    color: var(--sage);
}

.navigation {
    display: flex;
    gap: 38px;
    font-size: 12px;
}

.navigation a:hover {
    color: var(--sage);
}

.header-link {
    font-size: 11px;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--charcoal);
    padding-bottom: 5px;
}

/* HERO */

.hero {
    min-height: 590px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--cream);
}

.hero-content {
    padding: 100px 8% 75px 14%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2.5px;
    color: var(--sage);
    font-weight: 600;
    margin-bottom: 25px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(45px, 5.5vw, 76px);
    font-weight: 400;
    line-height: 1.12;
}

h1 em,
h2 em {
    color: var(--sage);
    font-weight: 400;
}

.hero-description {
    max-width: 360px;
    margin-top: 25px;
    color: #66675F;
    font-size: 14px;
    line-height: 1.9;
}

.primary-button {
    margin-top: 35px;
    padding: 17px 23px;
    background: var(--charcoal);
    color: white;
    font-size: 10px;
    letter-spacing: 1.5px;
    transition: background 0.2s;
}

.primary-button:hover {
    background: var(--sage);
}

.primary-button span {
    margin-left: 15px;
}

.hero-note {
    font-size: 10px;
    color: var(--muted);
    margin-top: 35px;
}

.hero-visual {
    background:
        radial-gradient(
            ellipse at 50% 45%,
            #A6AC98 0%,
            #8D9782 30%,
            #707C68 65%,
            #59634F 100%
        );
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.visual-circle {
    width: 280px;
    height: 380px;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 50%;
    transform: rotate(30deg);
    position: absolute;
}

.visual-circle::before {
    content: "";
    position: absolute;
    inset: 25px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
}

.visual-caption {
    position: absolute;
    bottom: 30px;
    left: 35px;
    right: 35px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 9px;
    letter-spacing: 1.5px;
}

/* INTRODUCTION */

.introduction {
    text-align: center;
    padding: 115px 20px;
    max-width: 700px;
    margin: auto;
}

.introduction h2,
.section-heading h2,
.search-section h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.3;
}

.introduction > p:last-child {
    max-width: 470px;
    margin: 25px auto 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

/* PRODUCTS */

.products-section {
    background: #F0EFE9;
    padding: 90px 8%;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 45px;
}

.section-heading .eyebrow {
    margin-bottom: 15px;
}

.product-count {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--muted);
    padding-bottom: 10px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.category-card {
    display: block;
}

.category-image {
    height: 330px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: filter 0.3s;
}

.category-card:hover .category-image {
    filter: brightness(0.94);
}

.category-image span {
    font-family: 'Playfair Display', serif;
    font-size: 45px;
    color: rgba(255,255,255,0.65);
}

.shampoo-image {
    background: linear-gradient(145deg, #D1CEC0, #A6A58F);
}

.conditioner-image {
    background: linear-gradient(145deg, #C8C7BC, #969F8D);
}

.oil-image {
    background: linear-gradient(145deg, #B7B6A6, #7E8875);
}

.category-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.category-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    font-weight: 400;
}

.category-info span {
    font-size: 9px;
    letter-spacing: 1px;
}

/* SEARCH */

.search-section {
    padding: 110px 20px;
    text-align: center;
}

.search-section .eyebrow {
    margin-bottom: 18px;
}

.search-section > p:not(.eyebrow, .search-message) {
    color: var(--muted);
    font-size: 13px;
    margin-top: 15px;
}

.search-box {
    max-width: 540px;
    display: flex;
    margin: 35px auto 0;
    border: 1px solid var(--line);
    background: white;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: 18px;
    font-family: inherit;
    font-size: 13px;
    background: transparent;
}

.search-box button {
    border: none;
    background: var(--charcoal);
    color: white;
    width: 60px;
    font-size: 22px;
    cursor: pointer;
}

.search-message {
    color: var(--muted);
    font-size: 11px;
    margin-top: 20px;
}

/* FOOTER */

.footer {
    background: var(--charcoal);
    color: var(--off-white);
    padding: 45px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer p,
.footer > span {
    font-size: 9px;
    letter-spacing: 1.5px;
}

.footer .logo span {
    color: #A6AC98;
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 700px) {

    .header {
        min-height: 70px;
        padding: 18px 5%;
    }

    .logo {
        font-size: 25px;
    }

    .navigation {
        gap: 15px;
        font-size: 10px;
    }

    .header-link {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 80px 8%;
    }

    .hero-visual {
        min-height: 340px;
    }

    .visual-circle {
        width: 200px;
        height: 270px;
    }

    .introduction {
        padding: 85px 25px;
    }

    .products-section {
        padding: 75px 6%;
    }

    .section-heading {
        display: block;
    }

    .product-count {
        display: inline-block;
        margin-top: 15px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .category-image {
        height: 280px;
    }

    .search-section {
        padding: 85px 20px;
    }

    .footer {
        flex-direction: column;
        gap: 22px;
        text-align: center;
    }

}

/* =================================
   COSMO - PRODUCT LIBRARY
================================= */

/* Library filters */

.library-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 35px 0 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--muted);
    font-weight: 600;
}

.filter-group select {
    width: 100%;
    padding: 14px;
    background: var(--off-white);
    border: 1px solid var(--line);
    color: var(--charcoal);
    font-family: inherit;
    font-size: 13px;
    border-radius: 0;
}

/* Results summary */

.library-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    padding: 15px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

#resultCount {
    font-size: 12px;
    color: var(--muted);
}

#clearFilters {
    background: none;
    border: none;
    color: var(--sage);
    font-size: 10px;
    letter-spacing: 1px;
    cursor: pointer;
}

/* Product grid */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.product-card {
    background: var(--off-white);
    border: 1px solid var(--line);
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.product-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
}

.product-tag {
    font-size: 9px;
    letter-spacing: 1.2px;
    color: var(--sage);
    text-transform: uppercase;
}

.product-card h3 {
    font-family: "Playfair Display", serif;
    font-size: 21px;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.product-card p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

.product-meta {
    margin-top: auto;
    padding-top: 22px;
    font-size: 10px;
    color: var(--sage);
    line-height: 1.8;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.product-actions button {
    flex: 1;
    padding: 11px 8px;
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.view-analysis {
    background: var(--charcoal);
    color: var(--off-white);
    border: 1px solid var(--charcoal);
}

.compare-button {
    background: transparent;
    color: var(--charcoal);
    border: 1px solid var(--line);
}

/* Product details */

.product-details {
    margin-top: 35px;
    padding: 30px;
    background: var(--off-white);
    border: 1px solid var(--line);
}

#productDetails[hidden],
#comparisonPanel[hidden] {
    display: none !important;
}

.close-details {
    background: none;
    border: none;
    color: var(--sage);
    font-size: 10px;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 30px;
}

.product-details h2 {
    font-family: "Playfair Display", serif;
    font-size: 30px;
    font-weight: 400;
    margin-bottom: 15px;
}

.product-details h3 {
    font-family: "Playfair Display", serif;
    font-size: 21px;
    font-weight: 400;
    margin: 30px 0 15px;
}

.product-details p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}

.ingredient-list {
    border-top: 1px solid var(--line);
    margin-top: 20px;
}

.ingredient-item {
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}

.ingredient-item strong {
    display: block;
    font-size: 13px;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.ingredient-item span {
    display: block;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

.assessment {
    background: var(--cream);
    padding: 22px;
    margin-top: 25px;
}

.assessment h3 {
    margin-top: 0;
}

/* Comparison panel */

.comparison-panel {
    margin-top: 40px;
    padding: 28px;
    background: var(--cream);
    border: 1px solid var(--line);
}

.comparison-panel h3 {
    font-family: "Playfair Display", serif;
    font-size: 25px;
    font-weight: 400;
    margin-bottom: 20px;
}

.comparison-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.comparison-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.comparison-item p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

#clearComparison {
    margin-top: 20px;
    padding: 12px 18px;
    background: var(--charcoal);
    color: white;
    border: none;
    font-size: 10px;
    letter-spacing: 1px;
    cursor: pointer;
}

/* Mobile layout */

@media (max-width: 700px) {

    .library-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: 220px;
    }

    .product-details,
    .comparison-panel {
        padding: 20px;
    }

    .library-summary {
        gap: 10px;
    }

}
