/* WC Custom Archive - Premium Design Match */
:root {
    --primary: #2E2E2E;
    --accent: #8E7047;
    --border: #ECECEC;
    --text: #2E2E2E;
    --text-light: #707070;
}

.wc-archive-container {
    max-width: 1440px;
    margin: 0 auto;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
}

/* Header */
.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    gap: 20px;
}

.header-col {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-center {
    justify-content: center;
}

.header-right {
    justify-content: flex-end;
}

.filter-toggle-label {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.filter-chip {
    display: flex;
    align-items: center;
    background: var(--e-global-color-primary);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
}

.remove-chip {
    margin-left: 10px;
    cursor: pointer;
    font-size: 14px;
}

.reset-all-btn {
    background: transparent;
    border: 1px solid var(--e-global-color-primary);
    color: var(--e-global-color-primary);
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.sort-dropdown select {
    border: none;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    background: transparent;
}

/* Main Layout */
.archive-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
}

/* Sidebar */
.filter-section.collapsed .filter-content {
    display: none;
}

.filter-header .toggle-icon {
    transition: transform 0.3s ease;
}

.filter-section.collapsed .toggle-icon {
    transform: rotate(0deg);
}
.filter-section .toggle-icon{
    transform: rotate(-180deg);
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.filter-section.collapsed .filter-content {
    display: none;
}

.filter-header .toggle-icon {
    transition: transform 0.3s ease;
}
.filter-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Checkboxes */
.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-light);
}

.checkbox-item input {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    accent-color:#4A3428;
    border: 1px solid var(--border);
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.size-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.size-btn label {
    display: block;
    padding: 12px 0;
    border: 1px solid var(--border);
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.size-btn input:checked + label {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Color Squares */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.color-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-btn label {
    display: block;
    width: 100%;
    height: 47px;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn input:checked + label {
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--primary);
}

/* Price Range */
.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfcfcf !important;
    font-size: 12px;
    color: var(--text-light);
    border-radius:0px !important;
}

.price-slider-container {
    position: relative;
    height: 2px;
    background: var(--border);
    margin: 20px 0;
}

.price-slider-track {
    position: absolute;
    height: 100%;
    background:#cfcfcf;
}

.range-slider {
    position: absolute;
    width: 100%;
    height: 2px;
    top: 1px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #cfcfcf;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    margin-top: -5px;
}

/* Grid & Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card-btns {
    position: relative;
    overflow: hidden;
    margin-bottom:10px;
}

.product-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

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

.add-to-cart-btn {
    position: absolute;
    bottom: -60px;
    left: 15px;
    right: 15px;
    background: #fff;
    color: var(--primary);
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 3;
    border: 1px solid transparent;
}

.product-card:hover .add-to-cart-btn {
    bottom: 15px;
}
.archive-sidebar .filter-section .filter-header {
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 18px;
    margin-bottom: 20px;
}
.add-to-cart-btn:hover {
    background: var(--e-global-color-primary);
    color: #fff;
    border: 1px solid var(--e-global-color-primary);
    outline: 1px solid var(--e-global-color-primary); /* Double border effect */
}
.filter-section {
    margin-bottom: 30px;
}
/* Hide default WooCommerce View cart link */
.added_to_cart {
    display: none !important;
}

.wishlist-btn-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 4;
}

/* Product Info */
.product-info {
    text-align: left;
}

h4.product-title {
    font-family: DM Sans;
    font-weight: 600;
    font-size: 18px !important;
    line-height: 24px !important;
    letter-spacing: 0%;
    text-transform: uppercase;
}

.product-title a {
    color: var(--primary);
    text-decoration: none;
}

.product-price {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--e-global-color-primary);
}

/* Pagination */
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
}

.page-numbers {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-numbers.next, .page-numbers.prev {
    width: auto;
    border: none;
    font-weight: 600;
}

.no-products-msg {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-light);
    margin-top: 50px;
}

/* Loader */
.grid-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


@media (max-width: 1024px) {
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 30px;
    }
    .archive-main {
        gap: 30px;
    }
}

@media (max-width: 991px) {
    .archive-main {
        grid-template-columns: 200px 1fr;
    }
    .color-btn label {
        height: 30px;
    }
}

@media (max-width:575px) {
    .products-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 30px 30px;
    }
    .archive-main{
        grid-template-columns:1fr;
    }
}