/* Base Category Page Layout */
.tax-product_cat .section-inner {
    max-width: 1920px;
    padding-left: 100px;
    padding-right: 100px;
    margin: 0 auto;
    width: 100%;
}

/* Top Inner Section Background */
section.top-inner {
    background-image: url('../images/bgPc.png');
    background-repeat: repeat-x;
    background-position: left center;
}

/* Grid Layout */
section.category .grid-category {
    display: flex;
    gap: 35px;
    width: 100%;
}

/* Sidebar */
section.category .grid-category .sidebar {
    width: 300px;
    flex-shrink: 0;
    margin-left: 0;
}

/* Main Content Area */
section.category .grid-category .main {
    flex: 1;
    max-width: 1337px; /* (320 × 4) + (19 × 3) */
}

/* Product Grid */
section.category .boxes {
    margin: 0;
    display: grid;
    gap: 19px;
    width: 100%;
}

/* Product Box Base Styles */
section.category .boxes .box {
    padding: 0;
    width: 100%;
    max-width: 320px;
}

section.category .boxes .box-product .part-top .image {
    width: 100%;
    height: 460px;
    max-height: 460px;
    overflow: hidden;
}

section.category .boxes .box-product .part-top .image img {
    width: 100%;
    height: 460px;
    object-fit: contain;
}

/* Badge Adjustments for Category Page */
section.category .box-product .part-top .new {
    display: none; /* Hide best seller badge */
}

/* Hide ALL pseudo-element badges ONLY on category pages, not home page */
section.category .box-product .part-top::before {
    display: none;
}
.best-sellers .onsale {
    right: auto !important;
    left: 10px !important;
}

.box-product .part-bottom .buttons {
    position: relative;
}

.box-product .part-bottom {
    padding: 20px 25px 25px;
    min-height: 174px;
}
.box-product .part-bottom .title {
    margin-bottom: 0;
}
/* Size and Style Selector Styles */
.parameters-selector.tax-select[taxonomy="size"] .items,
.parameters-selector.tax-select[taxonomy="t_style"] .items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 10px;
}

.parameters-selector.tax-select[taxonomy="size"] .item,
.parameters-selector.tax-select[taxonomy="t_style"] .item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.parameters-selector.tax-select[taxonomy="size"] .item span,
.parameters-selector.tax-select[taxonomy="t_style"] .item span {
    font-weight: normal;
}

.parameters-selector.tax-select[taxonomy="size"] .item.active span,
.parameters-selector.tax-select[taxonomy="t_style"] .item.active span {
    font-weight: bold;
}

/* Hide ALL checkboxes in filter sections */
.parameters-selector.tax-select .item input[type="checkbox"],
.parameters-selector.tax-select .item input {
    display: none;
}
.parameters-selector.tax-select[taxonomy="size"] .item span, .parameters-selector.tax-select[taxonomy="t_style"] .item span {
    font-size: 13px;
    line-height: 20px;
    color: #929292;
}
section.category .category-filters .parameters-selector .items .item:before {
    display: none;
}
section.category .category-filters .parameters-selector .items .item {
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.parameters-selector.tax-select[taxonomy="size"] .item.active span, .parameters-selector.tax-select[taxonomy="t_style"] .item.active span {
    color: #283582;
}
section.category .category-filters .parameters-selector .title {
    margin-bottom: 0;
    color: #222447;
}
section.category .category-filters .parameters-selector {
    border-color: rgba(112, 112, 112, 0.5); /* #707070 with 50% opacity */
}
.box-product .part-bottom .price {
    font-size: 20px;
}
section.category .category-filters .parameters-selector.colors .items .item .icon {
    border-radius: 30px;
    border: 2px solid transparent;
}
section.category .category-filters .parameters-selector.colors .items .item .icon img {
    border-radius: 30px;
}
section.category .category-filters .parameters-selector.colors .items {
    gap: 4px;
}
section.category .category-filters .parameters-selector.colors .items .item.active .icon,
section.category .category-filters .parameters-selector.colors .items .item:hover .icon {
    border: 2px solid #222447;
    padding: 4px;
}

/* Mobile Filter Overlay */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #27347F;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-overlay.active {
    opacity: 0.84;
    visibility: visible;
}

/* Prevent body scroll when filter is open */
body.filter-open {
    overflow: hidden;
}
/* Hide mobile filter button on desktop */
.category-info .button-open-filters {
    display: none;
}
section.top-inner .bg {
    display: none;
}
section.top-inner .title {
    color: #23408D;
    font-size: 48px;
    line-height: 57px;
    margin-bottom: 20px;
    font-weight: bold;
}
section.top-inner .breadcrumbs {
    font-size: 16px;
    line-height: 19px;
    color: #000000;
}
section.top-inner {
    padding: 49px 0;
}
@media (min-width: 769px) {
    .box-product .part-top .image,
    .box-product .part-top .image img {
        width: 100% !important;
        max-width: 100% !important;
    }
    .box-product .part-bottom .title {
        font-size: 19px;
        font-weight: 600;
    }
    .category .section-title {
        margin-bottom: 40px;
    }
    .category.section {
        padding-top: 40px;
    }
    .section-subtitle {
        margin-bottom: 40px;
    }
}
/* Mobile Layout */
@media (max-width: 768px) {
    /* Mobile background for top-inner section */
    section.top-inner {
        padding: 21px 0 38px
    }
    section.top-inner .title {
        font-size: 33px;
        line-height: 39px;
        margin-bottom: 14px;
    }
    section.top-inner .breadcrumbs {
        font-size: 12px;
        line-height: 14px;
    }
    section.top-inner {
        background-image: url('../images/bgMobile.png');
        background-repeat: repeat-x;
        background-position: left center;
    }
    
    section.category .grid-category .sidebar {
        width: 100%;
    }
    .category-info {
        display: flex;
        justify-content: space-between;
    }
    .content p {
        margin-top: 0;
        font-size: 14px;
        line-height: 18px;
    }
    /* Position filter button inside category-info */
    .category-info .button-open-filters {
        display: block;
        margin-top: 0;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        cursor: pointer;
        width: max-content;
        text-align: center;
        position: relative;
        height: max-content;
        top: 0;
        box-shadow: none;
        margin-right: 18px;
    }
    
    .category-info .button-open-filters img {
        width: auto;
        height: auto;
        max-width: 55px;
    }
    section.category .container-slide {
        z-index: 999;
    }
    section.category .container-slide.open {
        width: auto;
        z-index: 999;
        left: 56px;
        right: 0;
    }
    .category .section-title {
        margin-bottom: 35px;
    }
    .section-subtitle {
        margin-bottom: 35px;
    }

    /* Position close button outside slide on the left */
    .container-slide.open .button-close-filters {
        position: fixed;
        left: 2%;
        top: 72px;
        z-index: 1000;
        background: transparent;
        border: none;
        padding: 10px;
        width: 40px;
        height: 40px;
        cursor: pointer;
    }
    
    .container-slide.open .button-close-filters img {
        width: 20px;
        height: 20px;
        content: url('../images/closeButton.png');
    }
    section.category .grid-category {
        gap: 24px;
    }
    .tax-product_cat .section-inner {
        padding-left: 28px;
        padding-right: 28px;
    }

    section.category .boxes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    section.category .boxes .box-product {
        width: 100%;
        max-width: 320px;
    }
    
    section.category .boxes .box-product .part-top .image {
        height: auto;
        max-height: none;
        width: 100%;
    }
    
    section.category .boxes .box-product .part-top .image img {
        width: 100%;
        height: 242px;
    }
    .parameters-selector.tax-select[taxonomy="size"] .item span, .parameters-selector.tax-select[taxonomy="t_style"] .item span {
        font-size: 13px;
        line-height: 1;
    }
    section.category .container-slide .category-filters .parameters-selector .items .item {
        padding: 0;
        margin: 0;
    }
    .box-product .part-bottom .price {
        font-size: 14px;
        font-weight: normal
    }
    section.category .boxes {
        gap: 10px;
    }
    .box-product .part-bottom .title {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
    }
    .box-product .part-bottom .price {
        margin-bottom: 12px;
    }
    .box-product .part-bottom {
        padding: 10px 15px 14px;
        min-height: 124px;
    }
    .box-product .part-bottom .price .woocommerce-Price-amount {
        font-weight: bold !important;
    }
    .box-product .part-bottom .price del .woocommerce-Price-amount {
        font-size: 12px;
        font-weight: normal !important;
    }

}

/* Tablet Layout */
@media (min-width: 769px) and (max-width: 1024px) {
    .tax-product_cat .section-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    section.category .boxes {
        grid-template-columns: repeat(3, minmax(0, 320px));
        justify-content: center;
    }

    section.category .boxes .box-product {
        width: 100%;
        max-width: 320px;
    }
}

/* Large Desktop Layout - 4 products for screens 1600px and above */
@media (min-width: 1600px) {
    section.category .boxes {
        grid-template-columns: repeat(4, minmax(0, 320px));
        justify-content: center;
    }

    section.category .boxes .box-product {
        width: 100%;
        max-width: 320px;
    }
}

/* Desktop Layout - 3 products for screens 1025px to 1599px */
@media (min-width: 1025px) and (max-width: 1599px) {
    section.category .boxes {
        grid-template-columns: repeat(3, minmax(0, 320px));
        justify-content: center;
    }

    section.category .boxes .box-product {
        width: 100%;
        max-width: 320px;
    }
}
.box-product .part-bottom .price .woocommerce-Price-amount {
    font-weight: bold !important;
}
.box-product .part-bottom .price del .woocommerce-Price-amount {
    font-weight: normal !important;
}
/* Filter Accordion System */
.parameters-selector .title {
    position: relative;
    cursor: pointer;
    padding-left: 20px;
    transition: all 0.3s ease;
    user-select: none;
}

.parameters-selector .title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url('../images/filterDrop.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.parameters-selector.open .title::before {
    transform: translateY(-50%) rotate(180deg);
}

.parameters-selector .items {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 1000px;
    opacity: 1;
    margin-top: 25px;
}

.parameters-selector.closed .items {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.parameters-selector .title:hover {
    color: #27347F;
}

/* Price selector accordion */
.parameters-selector.price-select .title {
    padding-left: 20px;
}

.parameters-selector.price-select .title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url('../images/filterDrop.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.parameters-selector.price-select.open .title::before {
    transform: translateY(-50%) rotate(180deg);
}

.parameters-selector.price-select .irs,
.parameters-selector.price-select #price_range {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 200px;
    opacity: 1;
}

.parameters-selector.price-select.closed .irs,
.parameters-selector.price-select.closed #price_range {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

