/* =========================================================
   CROWN THEORY
   Collection Page Styles
   ========================================================= */


/* =========================================================
   1. COLLECTION HERO
   ========================================================= */

.collection-hero {
    padding: 72px 0 64px;
    background-color: #F7F4EB;
    border-bottom: 1px solid #DDD6C8;
}

.collection-hero-content {
    max-width: 720px;
}

.collection-hero-content h1 {
    margin-bottom: 20px;
    color: #3D2314;
    font-family: "Cooper Black", Georgia, serif;
    font-size: 58px;
    line-height: 1.1;
}

.collection-hero-content p {
    max-width: 620px;
    color: #6C625B;
    font-size: 18px;
    line-height: 1.7;
}


/* =========================================================
   2. COLLECTION SECTION
   ========================================================= */

.collection-section {
    background-color: #FCFAF5;
}


/* =========================================================
   3. TOOLBAR
   ========================================================= */

.collection-toolbar {
    margin-bottom: 40px;
    padding-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    border-bottom: 1px solid #DDD6C8;
}

.collection-count strong {
    color: #3D2314;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 15px;
}

.collection-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}


/* =========================================================
   4. SORT CONTROL
   ========================================================= */

.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-control label {
    color: #3D2314;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.sort-control select {
    min-width: 180px;
    padding: 11px 36px 11px 14px;

    background-color: #FFFFFF;
    color: #3D2314;

    border: 1px solid #DDD6C8;
    border-radius: 8px;

    font-family: "Inter", Arial, sans-serif;
    font-size: 14px;
}

.sort-control select:hover {
    border-color: #6B7F63;
}

.sort-control select:focus {
    outline: 3px solid #D9A05B;
    outline-offset: 2px;
}


/* =========================================================
   5. FILTER BUTTON
   ========================================================= */

.filter-toggle-button {
    display: none;
}


/* =========================================================
   6. COLLECTION LAYOUT
   ========================================================= */

.collection-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: start;
}


/* =========================================================
   7. FILTER SIDEBAR
   ========================================================= */

.collection-filters {
    padding: 24px;

    background-color: #F7F4EB;
    border: 1px solid #DDD6C8;
    border-radius: 16px;
}

.filter-header {
    margin-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-header h2 {
    color: #3D2314;
    font-family: "Cooper Black", Georgia, serif;
    font-size: 24px;
}

.clear-filters-button {
    background: none;
    border: none;

    color: #6B7F63;

    font-family: "DM Sans", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.clear-filters-button:hover {
    color: #3D2314;
    text-decoration: underline;
}


/* =========================================================
   8. FILTER GROUPS
   ========================================================= */

.filter-group {
    margin: 0;
    padding: 24px 0;

    border: none;
    border-top: 1px solid #DDD6C8;
}

.filter-group legend {
    margin-bottom: 16px;

    color: #3D2314;

    font-family: "DM Sans", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.filter-option {
    margin-bottom: 12px;

    display: flex;
    align-items: center;
    gap: 10px;

    color: #6C625B;

    font-size: 14px;

    cursor: pointer;
}

.filter-option:last-child {
    margin-bottom: 0;
}

.filter-option input {
    width: 17px;
    height: 17px;

    accent-color: #6B7F63;
}

.filter-option:hover {
    color: #3D2314;
}


/* =========================================================
   9. PRODUCT GRID
   ========================================================= */

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


/* =========================================================
   10. PRODUCT CARD
   ========================================================= */

.product-card {
    background-color: #F7F4EB;

    border: 1px solid #DDD6C8;
    border-radius: 16px;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #6B7F63;
    box-shadow: 0 10px 28px rgba(61, 35, 20, 0.10);
}


/* =========================================================
   11. PRODUCT IMAGE
   ========================================================= */

.product-card-image {
    position: relative;

    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;

    background-color: #EEE9DE;

    overflow: hidden;
}

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

    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.03);
}


/* =========================================================
   12. PRODUCT BADGES
   ========================================================= */

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;

    padding: 7px 12px;

    background-color: #D9A05B;
    color: #3D2314;

    border-radius: 20px;

    font-family: "DM Sans", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sage-badge {
    background-color: #6B7F63;
    color: #FFFFFF;
}


/* =========================================================
   13. PRODUCT CARD CONTENT
   ========================================================= */

.product-card-content {
    padding: 24px;
}

.product-card-heading {
    margin-bottom: 14px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.product-category {
    display: block;
    margin-bottom: 7px;

    color: #6B7F63;

    font-family: "DM Sans", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.product-card h2 {
    font-size: 22px;
    line-height: 1.2;
}

.product-card h2 a {
    color: #3D2314;
}

.product-card h2 a:hover {
    color: #6B7F63;
}

.product-price {
    flex-shrink: 0;

    color: #3D2314;

    font-size: 17px;
}

.product-card-content > p {
    margin-bottom: 18px;

    color: #6C625B;

    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   14. PRODUCT TAGS
   ========================================================= */

.product-tags {
    margin-bottom: 20px;

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-tags span {
    padding: 6px 10px;

    background-color: #E7ECE3;
    color: #3D2314;

    border-radius: 20px;

    font-family: "DM Sans", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   15. PRODUCT BUTTON
   ========================================================= */

.product-card .button {
    width: 100%;
}


/* =========================================================
   16. NO RESULTS
   ========================================================= */

.no-results {
    padding: 80px 20px;

    text-align: center;
}

.no-results h2 {
    margin-bottom: 16px;
    color: #3D2314;
}

.no-results p {
    max-width: 500px;
    margin: 0 auto 24px;

    color: #6C625B;
}

.no-results[hidden] {
    display: none;
}


/* =========================================================
   17. EDUCATION SECTION
   ========================================================= */

.collection-education {
    padding: 96px 0;

    background-color: #E7ECE3;
}

.collection-education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
}

.collection-education-content {
    max-width: 540px;
}

.collection-education-content h2 {
    margin-bottom: 20px;

    color: #3D2314;

    font-size: 44px;
}

.collection-education-content p {
    margin-bottom: 28px;

    color: #5F665A;

    font-size: 17px;
    line-height: 1.7;
}


/* =========================================================
   18. EDUCATION IMAGE
   ========================================================= */

.collection-education-image {
    height: 500px;

    border-radius: 24px;

    overflow: hidden;
}

.collection-education-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}


/* =========================================================
   19. PRODUCT CARD ACTIVE STATE
   ========================================================= */

.product-card:active {
    transform: translateY(-1px);
}


/* =========================================================
   20. TABLET
   ========================================================= */

@media screen and (max-width: 1100px) {

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .collection-layout {
        grid-template-columns: 220px 1fr;
        gap: 28px;
    }

    .collection-education-grid {
        gap: 40px;
    }

}


/* =========================================================
   21. SMALL TABLET / MOBILE
   ========================================================= */

@media screen and (max-width: 850px) {

    .collection-hero {
        padding: 56px 0;
    }

    .collection-hero-content h1 {
        font-size: 46px;
    }

    .collection-toolbar {
        align-items: flex-start;
    }

    .filter-toggle-button {
        display: inline-flex;
    }

    .collection-layout {
        display: block;
    }

    .collection-filters {
        display: none;

        margin-bottom: 32px;
    }

    .collection-filters.open {
        display: block;
    }

    .collection-education-grid {
        grid-template-columns: 1fr;
    }

    .collection-education-content {
        max-width: 100%;
    }

    .collection-education-image {
        height: 420px;
    }

}


/* =========================================================
   22. MOBILE
   ========================================================= */

@media screen and (max-width: 650px) {

    .collection-hero {
        padding: 48px 0;
    }

    .collection-hero-content h1 {
        font-size: 38px;
    }

    .collection-hero-content p {
        font-size: 16px;
    }

    .collection-toolbar {
        flex-direction: column;
        gap: 18px;
    }

    .collection-actions {
        width: 100%;

        justify-content: space-between;
    }

    .sort-control {
        flex: 1;
    }

    .sort-control label {
        display: none;
    }

    .sort-control select {
        width: 100%;
        min-width: 0;
    }

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

    .product-card-heading {
        gap: 12px;
    }

    .product-card h2 {
        font-size: 21px;
    }

    .collection-education {
        padding: 72px 0;
    }

    .collection-education-content h2 {
        font-size: 36px;
    }

    .collection-education-image {
        height: 350px;
    }

}


/* =========================================================
   23. VERY SMALL MOBILE
   ========================================================= */

@media screen and (max-width: 420px) {

    .collection-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-toggle-button {
        width: 100%;
    }

    .sort-control {
        width: 100%;
    }

    .product-card-content {
        padding: 20px;
    }

    .collection-filters {
        padding: 20px;
    }

}