/* Product Archive Layout */
.product-archive-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 100px;
    margin: 0 auto;
}

/* Filter Results Title */
.filter-results {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Filter Sidebar */
.product-archive-filters {
    background: #fff;
    height: fit-content;
    top: 2rem;
}

/* Filter Section Header */
.filter-section-header {
    margin-bottom: 2rem;
}

.filter-section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #DEDEDE;
}

/* Model Number Search */
.model-number-search {
    margin-bottom: 2rem;
}

.model-number-search h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
}

/* Enhanced Search Input */
.product-archive-filters .sku-search-input {
    width: 100%;
    padding: 10px 19px;
    border-radius: 99px;
    background: #222222 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>') no-repeat;
    background-position: 12px center;
    padding-left: 40px;
    color: #fff;
    transition: all 0.2s ease;
    font-size: 16px !important;
    padding-left: 40px !important;
}

.sku-search-input::placeholder {
    color: #999;
}

.sku-search-input:focus {
    border-color: #FF6B00;
    outline: none;
    box-shadow: 0 0 0 1px rgba(255, 107, 0, 0.1);
    background-color: #262626;
}

/* Filter Sections */
.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* OEM and Application Sections with Enhanced Checkboxes */
.oem-filter,
[data-attribute="pa_application"] {
    margin-bottom: 2rem;
}

.oem-filter h3,
[data-attribute="pa_application"] h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* Enhanced Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    padding: 5px 0px;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.filter-options label:hover:before {
    content: "";
    background: #fdba371f;
    position: absolute;
    inset: -10px;
    left: -10px;
    border-radius: 5px;
    bottom: -5px;
    top: -5px;
}

/* Custom Checkbox Design */
.filter-options .checkbox-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
}

.filter-options input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.filter-options .checkbox-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #E5E5E5;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Orange checkboxes for OEM and Application */
.oem-filter .checkbox-custom,
[data-attribute="pa_application"] .checkbox-custom {
}

.filter-options input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #f9ba37;
    border-color: #f9ba37;
}

.filter-options input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Enhanced Diameter Size Section */
.diameter-size-filter .filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

[data-attribute="pa_diameter-size"] .filter-options label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    background: #F0F0F0;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
    text-align: center;
    margin: 0;
    height: 40px;
}

[data-attribute="pa_diameter-size"] .filter-options label:hover {
    border-color: #FF6B00;
    background: #FFF5ED;
    color: #FF6B00;
}

[data-attribute="pa_diameter-size"] .filter-options input[type="checkbox"] {
    display: none;
}

[data-attribute="pa_diameter-size"] .filter-options input[type="checkbox"]:checked + label {
    background-color: #FDBA36;
    border-color: #e3a11e;
    color: #000000;
    font-weight: 600;
}
[data-attribute="pa_diameter-size"] .filter-options {
    flex-direction: row;
    flex-wrap: wrap;
}

/* Hide filter labels */
.filter-options label > span:not(.checkbox-custom):not(.count) {
    display: none;
}

/* Enhanced Search Results Dropdown */
.sku-search-results {
    position: absolute;
    width: 100%;
    background: #262626;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.sku-search-results .search-result {
    padding: 8px 12px;
    cursor: pointer;
    display: flex
;
    align-items: start;
    gap: 0px;
    transition: background-color 0.2s;
    flex-direction: column;
}

.sku-search-results .search-result:hover {
    background-color: #171717;
}

.sku-search-results .search-result.exact-match {
    background-color: #222222;
}

.sku-search-results .exact-match-label {
    font-size: 12px;
    background: #000;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: auto;
}

.sku-search-results .sku {
    font-weight: 600;
    min-width: 80px;
    color:#f9ba37;
}

.sku-search-results .name {
    color: #fff;
    font-size: 14px;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF6B00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Styles */
@media (max-width: 991px) {
    .product-archive-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-archive-filters {
        position: fixed;
        right: 0px;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: 400px;
        z-index: 999;
        overflow-y: auto;
        transition: transform 0.3sease;
        margin: 0;
        background: #fff;
        padding: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        transform: translateX(-150vw);
        left: 0px;
    }

    .product-archive-filters.active {
        left: 0;
    }



    .filter-toggle:hover {
        background: #E66000;
    }

    .filter-toggle svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 767px) {
    .product-archive-wrapper {
        padding: 1rem;
    }
}

/* Products Grid */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(31%, 1fr));
    gap: 1.5rem;
    transition: opacity 0.3s;
    border-radius: 8px;
}
.products-container li h3{
    font-size: 20px;
    text-align: left;
    line-height: 25px;
    font-weight: 900;
}
.products-container.loading {
    opacity: 0.5;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.pagination .page-numbers.current {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

/* Product Card Styles */
.products-container .product {
    background: #F0F0F0;
    text-align: center;
    padding: 0px;
    transition: transform 0.2s ease;
    list-style-type:none;
    border-radius:15px;
}

.products-container .product:hover {
}

.products-container .product a {
    text-decoration: none;
    color: inherit;
}

/* Product Image */
.products-container .product img {
    width: 100%;
    height: auto;
    max-width: 200px;
    margin: auto;
    display: block;
    max-height: 150px;
    object-fit: contain;
}

/* Product Title */
.products-container .product .woocommerce-loop-product__title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Product Description */
.products-container .product .product-description {
    font-size: 16px;
    color: #000000;
    margin-bottom: 0px;
    line-height: 20px;
    text-align: left;
}

/* Price Container */
.products-container .product .price-container {
    display: flex
;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    margin-top: 0px;
    padding: 20px;
}

/* Product Price */
.products-container .product .price {
    font-size: 0.875rem;
    color: #333;
    font-weight: 500;
    display: flex
;
    align-items: center;
    gap: 8px;
}

.products-container .product .price .amount {
    font-weight: 600;
    font-size:18px;
    color: #000000;
}
.products-container .product .price .from {
    color: #000000;
    font-weight: normal;
    font-size: 14px;
}

/* Arrow Button */
.products-container .product .arrow-button {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0px 0px 0px 0px #fdbb3600;
    transition: all 0.3s ease-in-out;

}

.products-container .product:hover .arrow-button {
    box-shadow: 0px 0px 0px 10px #FDBA36;
    border-radius: 99px;
    background-color:#FDBA36;
}

.products-container .product:hover .arrow-button:before{
    background-image:url('/wp-content/uploads/2025/02/arrowbg-yellow.svg');
}
.products-container .product .arrow-button:before{
    content: "";
    background-image: url(/wp-content/uploads/2025/02/arrowbg.svg);
    height: 33px;
    width: 33px;
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translatey(-50%);
    z-index: 1;
    background-repeat: no-repeat;
    background-size: contain;
    transition: all 0.3sease-in-out;
}
.products-container .product .arrow-button:after {
    content: "";
    background-image: url(/wp-content/uploads/2025/02/arrow-right.svg);
    height: 33px;
    width: 33px;
    background-size: initial;
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translatey(-50%);
    z-index: 2;
    background-repeat: no-repeat;
    background-position: center center;
    transition: all 0.3sease-in-out;
}

.products-container .product .arrow-button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Remove Default WooCommerce Styles */
.products-container .product .button {
    display: none;
}

.products-container .product .onsale {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 767px) {
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .products-container .product {
        padding: 1.5rem;
    }
} 


h2.product-title {
    font-size: 20px;
    text-align: left;
    line-height: 25px;
    font-weight: 900;
}
.product-content{
    padding:20px;
    border-bottom:1px solid #E0E0E0;
}

.filter-options label.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input[type="checkbox" i]:disabled + label{
    opacity: 0.4;
    cursor: not-allowed;
}
.attribute-filter h3{
    font-size: 18px;
    border-bottom: 1px solid #DEDEDE;
    padding-bottom: 10px;
    margin-top:30px;
}

.filter-options .count {
    color: #666;
    font-size: 14px;
    margin-left: 4px;
}

[data-attribute="pa_diameter-size"] .filter-options .count {
    color: inherit;
    font-size: inherit;
    margin-left: 4px;
}

.filter-options label.disabled .count {
    color: #999;
}

/* Active Filters Bar */
.active-filters-bar {
    display: none; /* Hide by default */
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    min-height: 40px;
    background: #ffffff;
    padding: 5px;
    border: 1px solid #ededed;
    border-radius: 5px;
    box-shadow: 0px 10px 40px #28282812;
    width: fit-content;
    gap: 5px;
}

.active-filters-bar.visible {
    display: flex; /* Show when visible class is added */
}

.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    border: 1px solid #e0e0e0;
}

.filter-tag .remove {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.2s ease;
}

.filter-tag .remove:hover {
    background: #d32f2f;
    color: white;
}

.filter-tag .remove svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

.clear-all-filters {
    display: none;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.clear-all-filters:hover {
    color: black;
    background-color:#f9ba37;
}

.clear-all-filters.visible {
    display: inline-flex;
}

/* Category Header */
.category-header {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0px 10px 40px #28282812;
}

.category-header-content {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: flex-end;
}

.category-header-content .category-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
}

.category-header-content .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    position: absolute;
    inset: 0px;
    max-width: 100%;
}

.category-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to right, rgb(0 0 0 / 80%) 0%, rgb(0 0 0 / 22%) 100%);
}

.category-info {
    position: relative;
    z-index: 2;
    padding: 2rem;
    color: #fff;
    width: 100%;
}

.category-info h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #fff;
}

.category-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .category-header-content {
        min-height: 200px;
    }

    .category-info h1 {
        font-size: 1.8rem;
    }

    .category-description {
        font-size: 1rem;
    }
}

/* Mobile Filter Toggle Styles */
.filter-toggle {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    background: #FDBA36;
    color: #000000;
    padding: 12px 24px;
    border-radius: 99px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    border: none;
    display: none;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-toggle:hover {
    background: #ffc53d;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.filter-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Mobile Filter Overlay */
.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Filter Panel */
@media (max-width: 991px) {
    .filter-toggle {
        display: flex;
    }

    .filter-overlay {
        display: block;
    }

    .product-archive-filters {
        position: fixed;
        right: 0px;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: 400px;
        z-index: 999;
        overflow-y: auto;
        transition: transform 0.3sease;
        margin: 0;
        background: #fff;
        padding: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        transform: translateX(-150vw);
        left: 0px;
    }

    .product-archive-filters.active {
        transform: translateX(0%);
    }

    .mobile-filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem;
        border-bottom: 1px solid #DEDEDE;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
    }

    .mobile-filter-header h2 {
        font-size: 24px;
        font-weight: 600;
        color: #333;
        margin: 0;
    }

    .mobile-filter-close {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        color: #666;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s ease;
    }

    .mobile-filter-close:hover {
        background: #f5f5f5;
        color: #333;
    }

    .mobile-filter-close svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
    }

    .mobile-filter-content {
        padding: 1.5rem;
        padding-bottom: 100px;
        overflow: scroll;
        max-height: 100svh;
        padding-bottom: 200px;
    }
    .mobile-filter-content {
        overflow: auto; /* Ensure scrolling is still possible */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer & Edge */
      }
      
      /* Hide scrollbar for WebKit browsers (Chrome, Safari) */
      .mobile-filter-content::-webkit-scrollbar {
        display: none;
      }
    p#breadcrumbs{
        display:none;
    }
    /* Hide desktop filter header when in mobile */
    .product-archive-filters .filter-section-header {
        display: none;
    }

    /* Hide filter section header on mobile */
    .filter-section-header {
        display: none;
    }
}

/* Desktop Styles */
@media (min-width: 992px) {
    .mobile-filter-header {
        display: none;
    }
}

.breadcrumbs a{
    color:black;
}

button.mobile-filter-close-btn {
    color: white;
    background: black;
    border-radius: 99px;
    font-size: 16px;
    top:20px;
}
.mobile-filter-close-btn svg{
    color: #ffffff;
}