/*
 * Category page styling – premium modern design with glassmorphism and subtle animations.
 */


/* Header section – content-first layout */
/* Standard header (categories) */
.category-header {
    background-color: var(--color-bg-page);
    padding: 1.5rem 0 3rem 0;
}

.category-header__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.category-header__content {
    flex: 1;
}

.category-title {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-top: 32px;
    ;
    color: var(--color-text);
}

/* Site Breadcrumbs are now in globals.css under .site-breadcrumbs */

.category-description {
    font-family: var(--font-body);
    font-size: .85rem;
    line-height: 1.6;
    max-width: 525px;
    color: #454545BF;
}

.category-description h2 {
    font-family: var(--font-label);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 500;
    letter-spacing: 0;
}

.category-header__media {
    flex: 0 0 50%;
}

.category-header__media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
}


/* Hero header (collections only) */

.category-header--hero {
    position: relative;
    padding: 0 !important;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: var(--color-dark-gray);
    margin-bottom: 2rem;
}

.category-header--hero .category-header__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.category-header--hero .category-header__bg img,
.category-header--hero .category-header__bg picture {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
}

.category-header--hero .category-header__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.category-header--hero .container {
    max-width: var(--container-max);
    margin-inline: auto;
    width: 100%;
}

.category-header--hero .category-header__content {
    position: relative;
    z-index: 3;
    padding-bottom: 4rem;
    color: #fff;
    max-width: 800px;
    text-align: left;
}

.category-header--hero .category-title {
    color: #fff !important;
    font-size: clamp(24px, 6vw, 42px);
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.category-header--hero .site-breadcrumbs .woocommerce-breadcrumb,
.category-header--hero .site-breadcrumbs .woocommerce-breadcrumb a {
    color: #fff;
    opacity: 0.8;
}

.category-header--hero .category-description {
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 100%;
    font-size: 15px;
    margin-top: 1.5rem;
}

.category-header--hero .category-description h2 {
    color: #fff !important;
}

@media (max-width: 991px) {
    .category-header--hero {
        min-height: 80vh;
        /* More vertical presence */
        min-height: -webkit-fill-available;
        padding-top: 100px !important;
        align-items: flex-end;
    }

    .category-header--hero .category-header__content {
        padding-bottom: 2rem;
    }

    .category-header--hero .category-title {
        font-size: 28px;
    }
}


.category-filters-wrap,
.category-filters {
    padding: .75rem 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 20;
}


/* Product grid – max 4 columns */
.product-count {
    font-size: .75rem;
    font-weight: 400;
    color: var(--color-dark-gray);
}

.category-tools {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 1.5rem auto;
    gap: 24px;
}


.category-products .product-grid {
    display: grid;
    gap: 40px 10px;
    margin: 2rem 0;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}


@media (min-width: 580px) {
    .category-products .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 860px) {
    .category-products .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1150px) {
    .category-products .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* Tags cloud (Shared) */
.category-tags {
    padding: 2rem 1.25rem 0;
    text-align: center;
}

.category-tags .section-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    color: #333;
}



/* Sorting select styled as a pill button */
.product-sorting .orderby {
    display: inline-block;
    padding: .45rem 2rem .45rem 1.25rem;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    /* Pill shape */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%232F2B26' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
    transition: all var(--transition);
}






/* Responsive adjustments */
@media (max-width: 1024px) {
    .category-header {
        padding: 2.5rem 0 2.5rem 0;
    }

    .category-header__inner {
        flex-direction: column;
        gap: 2rem;
    }

    .category-header__content,
    .category-header__media {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .category-description {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .category-products .product-grid {
        gap: 1rem;
    }

    .orderby {
        max-width: 230px;
    }
}