
/* =========================================
   ANNIE'S FINDS — CATEGORY PAGE
   Quiet Sage Theme
========================================= */

/* =========================================
   1. ROOT VARIABLES & RESET
========================================= */

:root {
    --cream: #f8f6f1;
    --ink: #30332e;
    --sage: #a4b69b;
    --rose: #c88c9b;
    --mauve: #674e5a;
    --blue: #879ca1;
    --line: #deded6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #e9e9e4;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    transition: background-color 0.7s ease, color 0.7s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.site {
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--cream);
    overflow: hidden;
    transition: background-color 0.7s ease;
}

/* =========================================
   2. DARK MODE VARIABLES
========================================= */

body[data-theme="dark"] {
    --cream: #171e1b;
    --ink: #f0eee7;
    --line: #3b4b40;

    background: #101612;
    color: var(--ink);
    color-scheme: dark;
}

/* =========================================
   3. CATEGORY HERO
========================================= */

.collection-hero {
    padding: 76px 9% 52px;
    text-align: center;
    border-bottom: 1px solid var(--line);

    background-image:
        radial-gradient(
            ellipse at 85% 10%,
            rgba(200, 140, 155, 0.11),
            transparent 42%
        ),
        radial-gradient(
            ellipse at 10% 90%,
            rgba(164, 182, 155, 0.16),
            transparent 46%
        );

    animation: categoryFadeIn 1.6s ease both;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: #7e897b;
    font-weight: 700;
}

.collection-hero .eyebrow {
    margin-bottom: 17px;
}

.collection-hero h1 {
    font-family: "DM Serif Display", serif;
    font-size: clamp(43px, 6vw, 76px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -1.3px;
    margin: 0;
}

.collection-hero h1 em {
    color: #9e7683;
    font-weight: 400;
}

.collection-hero p {
    font-size: 14px;
    line-height: 1.9;
    color: #74766f;
    max-width: 530px;
    margin: 21px auto 0;
}

/* Dark Mode */

body[data-theme="dark"] .collection-hero {
    background-image: none;
}

body[data-theme="dark"] .eyebrow {
    color: #b0c4a7;
}

body[data-theme="dark"] .collection-hero h1 em {
    color: #d4a7b4;
}

body[data-theme="dark"] .collection-hero p {
    color: #abb5a9;
}

/* =========================================
   4. ARTICLE SEARCH TOOLBAR
========================================= */

.collection-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 38px 9% 20px;
}

.product-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 300px);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.35);

    transition:
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.product-search:focus-within {
    border-color: #91a38a;
    box-shadow: 0 0 0 3px rgba(164, 182, 155, 0.19);
}

.product-search svg {
    width: 17px;
    flex: none;
    color: #81917c;
}

.product-search input {
    border: 0;
    background: transparent;
    outline: 0;
    color: inherit;
    width: 100%;
    min-width: 0;
    font-size: 12px;
}

.product-search input::placeholder {
    color: #898e83;
    opacity: 1;
}

.product-search input:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Dark Mode */

body[data-theme="dark"] .product-search {
    background: rgba(255, 255, 255, 0.03);
    border-color: #566356;
}

body[data-theme="dark"] .product-search input {
    color: #f1f0e8;
}

body[data-theme="dark"] .product-search input::placeholder {
    color: #a4b3a4;
}

/* =========================================
   5. ARTICLE GRID
========================================= */

.product-grid {
    padding: 12px 9% 40px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
}

.product-card {
    min-width: 0;
    background: transparent;

    transition:
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.65s ease;
}

.product-card:hover {
    transform: translateY(-7px);
}

.product-image {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
}

.product-image img {
    width: 77%;
    height: 77%;
    object-fit: contain;

    transition:
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover img {
    transform: scale(1.055);
}

.product-info {
    padding: 21px 3px 14px;
}

.product-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #879184;
}

.product-info h3 {
    font-family: "DM Serif Display", serif;
    font-weight: 400;
    font-size: 25px;
    line-height: 1.25;
    margin: 10px 0;
}

.product-info p {
    font-size: 12px;
    line-height: 1.8;
    color: #777b73;
    margin: 0 0 15px;
}

.product-action {
    font-size: 11px;
    color: #657b61;
    border-bottom: 1px solid currentColor;
    padding-bottom: 3px;
}

.product-card[hidden] {
    display: none !important;
}

/* Dark Mode */

body[data-theme="dark"] .product-info p {
    color: #abb5a9;
}

body[data-theme="dark"] .product-type {
    color: #b3c5ad;
}

body[data-theme="dark"] .product-action {
    color: #b5c9af;
}

/* =========================================
   6. EMPTY ARTICLE MESSAGE
========================================= */

.category-empty {
    text-align: center;
    padding: 65px 9% 105px;
    animation: categoryFadeIn 1.8s ease both;
}

.category-empty-symbol {
    display: block;
    font-family: "DM Serif Display", serif;
    font-size: 43px;
    color: var(--rose);
    margin-bottom: 15px;
}

.category-empty h2 {
    font-family: "DM Serif Display", serif;
    font-size: clamp(27px, 4vw, 36px);
    font-weight: 400;
    margin: 0 0 15px;
}

.category-empty p {
    font-size: 13px;
    line-height: 1.9;
    color: #777b73;
    max-width: 420px;
    margin: 0 auto;
}

body[data-theme="dark"] .category-empty p {
    color: #abb5a9;
}

/* =========================================
   7. ABOUT ANNIE'S FINDS
========================================= */

.collection-about {
    text-align: center;
    padding: 67px 20px 55px;
    border-top: 1px solid var(--line);
}

.collection-about h2 {
    font-family: "DM Serif Display", serif;
    font-weight: 400;
    font-size: 39px;
    margin: 12px 0;
}

.collection-about p {
    font-size: 14px;
    color: #74766f;
    line-height: 1.9;
    max-width: 550px;
    margin: 0 auto;
}

body[data-theme="dark"] .collection-about p {
    color: #abb5a9;
}

/* =========================================
   8. FOOTER
========================================= */

.bottom {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 30px 9%;
    font-size: 11px;
    color: #85877e;
}

body[data-theme="dark"] .bottom {
    color: #aeb9ac;
}

/* =========================================
   9. ENTRANCE ANIMATIONS
========================================= */

@keyframes categoryFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   10. TABLET RESPONSIVENESS
========================================= */

@media (max-width: 1050px) and (min-width: 851px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .collection-hero {
        padding: 55px 8% 42px;
    }

    .collection-toolbar {
        padding: 30px 8% 20px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px 8% 40px;
        gap: 18px;
    }

    .bottom {
        padding: 26px 8%;
        gap: 12px;
        justify-content: center;
        text-align: center;
        flex-wrap: wrap;
    }
}

/* =========================================
   11. MOBILE RESPONSIVENESS
========================================= */

@media (max-width: 540px) {
    .collection-hero {
        padding: 46px 7% 36px;
    }

    .collection-hero h1 {
        font-size: clamp(40px, 11vw, 55px);
    }

    .collection-toolbar {
        padding: 24px 7% 16px;
        align-items: stretch;
        flex-direction: column-reverse;
        gap: 13px;
    }

    .product-search {
        width: 100%;
        max-width: none;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 5px 7% 30px;
        gap: 12px;
    }

    .product-info {
        padding: 13px 1px;
    }

    .product-info h3 {
        font-size: clamp(18px, 5vw, 23px);
        margin: 8px 0;
    }

    .product-info p {
        font-size: 11px;
        line-height: 1.65;
    }

    .product-type {
        font-size: 9px;
    }

    .product-image img {
        width: 85%;
        height: 85%;
    }

    .category-empty {
        padding: 55px 7% 80px;
    }

    .collection-about {
        padding: 55px 8% 35px;
    }

    .collection-about h2 {
        font-size: 34px;
    }
}

@media (max-width: 350px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =========================================
   12. REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .collection-hero,
    .category-empty {
        animation: none;
    }

    .product-card,
    .product-image img {
        transition: none !important;
    }
}


/* =========================================
   ARTICLE COVER IMAGE — FULL CONTAINER
========================================= */

.product-card .product-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}


/* Entire article card is clickable */
a.article-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.article-card:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 4px;
}



/* =========================================
   13. EXPLORE MORE CATEGORIES
   Homepage-Inspired Category Cards
========================================= */

.explore-categories {
    padding: 55px 9% 75px;
    border-top: 1px solid var(--line);
}

.explore-categories-heading {
    margin-bottom: 30px;
}

.explore-categories-eyebrow {
    display: block;
    margin-bottom: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7e897b;
}

.explore-categories-heading h2 {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-size: clamp(28px, 3vw, 39px);
    font-weight: 400;
    line-height: 1.2;
    color: var(--ink);
}

.explore-categories-heading h2 em {
    font-weight: 400;
    color: var(--rose);
}

/* CATEGORY GRID */

.explore-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* CATEGORY CARD */

.explore-category-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 300px;
    padding: 30px;
    border-radius: 5px;
    background: #ede2d9;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;

    transition:
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.65s ease,
        background-color 0.6s ease;
}

/* Soft pastel backgrounds */

.explore-category-card:nth-child(3n + 1) {
    background: #ede2d9;
}

.explore-category-card:nth-child(3n + 2) {
    background: #e4e8df;
}

.explore-category-card:nth-child(3n + 3) {
    background: #e9e2e8;
}

.explore-category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 38px rgba(34, 51, 38, 0.14);
}

.explore-category-card:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 4px;
}

/* CATEGORY LABEL */

.explore-category-label {
    display: block;
    margin-bottom: 18px;
    font-size: 12px;
    color: #92958d;
    overflow-wrap: anywhere;
}

/* CATEGORY CONTENT */

.explore-category-content h3 {
    margin: 0 0 18px;
    font-family: "DM Serif Display", serif;
    font-size: 31px;
    font-weight: 400;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.explore-category-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #777b73;
}

/* ARROW */

.explore-category-arrow {
    align-self: flex-end;
    margin-top: auto;
    padding-top: 18px;
    font-size: 24px;

    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.explore-category-card:hover .explore-category-arrow {
    transform: translate(5px, -5px);
}

/* =========================================
   DARK MODE
========================================= */

body[data-theme="dark"] .explore-categories-eyebrow {
    color: #b0c4a7;
}

body[data-theme="dark"] .explore-category-card:nth-child(3n + 1) {
    background: #354035;
}

body[data-theme="dark"] .explore-category-card:nth-child(3n + 2) {
    background: #303d38;
}

body[data-theme="dark"] .explore-category-card:nth-child(3n + 3) {
    background: #403740;
}

body[data-theme="dark"] .explore-category-label {
    color: #b3c5ad;
}

body[data-theme="dark"] .explore-category-content p {
    color: #b8c1b6;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 850px) {
    .explore-categories {
        padding: 45px 8% 65px;
    }

    .explore-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .explore-category-card {
        min-height: 280px;
        padding: 26px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 620px) {
    .explore-categories {
        padding: 38px 7% 55px;
    }

    .explore-categories-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .explore-category-card {
        min-height: 260px;
        padding: 26px;
    }

    .explore-category-content h3 {
        font-size: 28px;
    }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
    .explore-category-card,
    .explore-category-arrow {
        transition: none;
    }

    .explore-category-card:hover {
        transform: none;
    }
}


/* =========================================
   CATEGORY PAGE — FULL PAGE ENTRANCE
========================================= */

@keyframes categoryPageEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body .site > main {
    animation: categoryPageEnter 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    body .site > main {
        animation: none;
    }
}

