/* Breadcrumbs */
.archive .breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #666;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.archive .breadcrumb a {
    color: #552F24;
    text-decoration: none;
}

.archive .breadcrumb a:hover {
    text-decoration: underline;
}

.archive .breadcrumb span {
    color: #2F2F2F;
}

.archive {
    margin-bottom: 40px;
}
/* Archive Header */
.archive__header {
    margin-bottom: 2rem;
}

.archive__title {
    font-weight: 600;
    font-size: 32px;
    line-height: 40px;
    color: #2F2F2F;
    margin-bottom: 4px;
}

.archive__description {
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #575757;
}

/* Archive Wrapper - Two Columns */
.archive__wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 968px) {
    .archive__wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.fillers {
    padding: 10px 0;
    border-top: 1px solid silver;
    border-bottom: 1px solid silver;
    margin-bottom: 24px;
}

.fillers__box {
    display: flex;
    align-items: center;
    gap: 70px;
}

/* Sidebar Filters */
.archive__sidebar {
    position: sticky;
    top: 20px;
}

.archive__filters {

}

.archive__filters-title {
    font-weight: 500;
    font-size: 18px;
    line-height: 28px;
    color: #2F2F2F;
}


/* Active Filters */
.archive__active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.archive__filter-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #CCCCCC;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #393435;
    padding: 10px 20px;

}

.archive__filter-remove {
    color: #393435;
}


.archive__clear-filters {
    font-weight: 700;
    font-size: 14px;

    color: #393435;
}

.archive__clear-filters:hover {
    text-decoration: underline;
}

/* Filter Sections */
.archive__filter-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;

}

.archive__filter-section:last-child {
    border-bottom: none;
}

.archive__filter-section-title {
    color: #575757;
    transition: color 0.3s ease;
    font-weight: 700;
    font-size: 18px;
    line-height: 156%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;

}

.archive__filter-section-title:hover {
    color: #552F24;
}

.archive__filter-icon {
    font-size: 1.5rem;
    color: #552F24;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

.archive__filter-section-title[aria-expanded="true"] .archive__filter-icon {
    transform: rotate(0deg);
}

.archive__filter-content {
    padding-bottom: 1rem;
    overflow: hidden;
}

.archive__filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive__filter-item {
    margin-bottom: 0.5rem;
}

.archive__filter-link {
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 700;
    font-size: 16px;
    line-height: 150%;
    color: #575757;
}

.archive__filter-link:hover {
    color: #552F24;
}

.archive__filter-item.is-active .archive__filter-link {
    color: #552F24;
    font-weight: 600;

}


/* Main Content */
.archive__content {
    width: 100%;
}

.archive__sort {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
}

.archive__sort .woocommerce-ordering {
    margin: 0;
}

.archive__sort select {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9375rem;
    color: #2F2F2F;
    background: #fff;
    cursor: pointer;
}

/* Products Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 968px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }




}

/* Product Card */
.product-card {
    list-style: none;
    margin: 0;
}

.product-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.product-card__link:hover {
    transform: translateY(-4px);
}

.product-card__image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f5f5f5;
}

.product-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card__link:hover .product-card__img {
    transform: scale(1.05);
}

.product-card__label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #2F2F2F;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

.product-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: #2F2F2F;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.product-card__wishlist {
    flex-shrink: 0;
}

.product-card__cat {
    font-size: 0.875rem;
    color: #666;
}

.product-card__price {
    font-size: 1rem;
    font-weight: 600;
    color: #552F24;
}

/* Pagination */
.woocommerce-pagination {
    margin-top: 3rem;
    text-align: center;
}

.woocommerce-pagination .page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination .page-numbers li {
    margin: 0;
}

.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2F2F2F;
    transition: all 0.3s ease;
}

.woocommerce-pagination .page-numbers a:hover,
.woocommerce-pagination .page-numbers .current {
    background: #552F24;
    border-color: #552F24;
    color: #fff;
}

/* WooCommerce Widgets in Sidebar */
.archive__sidebar .widget {
    margin-bottom: 2rem;
}

.archive__sidebar .widget:last-child {
    margin-bottom: 0;
}

.archive__sidebar .widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2F2F2F;
    margin-bottom: 1rem;
}

/* No Products Found */
.woocommerce-info,
.woocommerce-no-products-found {
    padding: 2rem;
    text-align: center;
    color: #666;
}



.archive__sort {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.archive__sort .woocommerce-ordering {
    margin: 0;
    position: relative;
}

.archive__sort select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Custom Sort Dropdown */
.archive__sort-dropdown {
    position: relative;
    display: inline-block;
}

.archive__sort-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #FBF5EC;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #2F2F2F;
    cursor: pointer;
    transition: all 0.3s ease;
}

.archive__sort-button:hover {
    background-color: #f5f0e6;
}

.archive__sort-button.active {
    background-color: #FBF5EC;
}

.archive__sort-icon {
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.archive__sort-button.active .archive__sort-icon {
    transform: rotate(0deg);
}

.archive__sort-icon svg {
    width: 100%;
    height: 100%;
}

.archive__sort-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.archive__sort-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.archive__sort-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #2F2F2F;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.archive__sort-option:hover {
    background-color: #f9f9f9;
}

.archive__sort-option.selected {
    border: 2px dashed #0F4D9E;
    border-radius: 0.25rem;
    margin: 0 0.5rem;
}

.archive__sort-option:not(.selected) {
    margin: 0 0.5rem;
}



/* Mobile Filter/Sort Bar */
.archive__mobile-bar {
    display: none;
}



@media (max-width: 968px) {
    .fillers {
        padding: 20px 0;
    }
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Mobile Filter/Sort Bar */
    .archive__mobile-bar {
        display: flex;
    }

    .archive__filter-mobile-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        border: none;
        border-radius: 0.5rem;
        font-weight: 500;
        font-size: 1rem;
        color: #2F2F2F;
        cursor: pointer;
        transition: all 0.3s ease;
        justify-content: center;
    }

    .archive__filter-mobile-btn:hover {
        background-color: #f5f0e6;
    }

    .archive__filter-mobile-btn svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .archive__sort {
        flex: 1;
        margin-bottom: 0;
        justify-content: flex-end;
    }

    /* Hide sidebar on mobile - show as overlay */
    .archive__wrapper {
        grid-template-columns: 1fr;
    }

    .archive__sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        background-color: #fff;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .archive__sidebar.active {
        transform: translateX(0);
    }

    /* Mobile filter header */
    .archive__filter-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #fff;
        padding: 1rem;
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
        z-index: 10;
    }

    .archive__filter-mobile-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: #2F2F2F;
        margin: 0;
    }

    /* Scrollable filters content */
    .archive__filters {
        border: none;
        padding: 1rem;
        padding-bottom: 2rem; /* Extra space for button */
        background: transparent;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling in Safari */
        overscroll-behavior: contain; /* Prevent scroll chaining */
        min-height: 0; /* Important for flex scrolling */
    }

    /* Close button for mobile filters */
    .archive__filter-close {
        width: 2rem;
        height: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #2F2F2F;
        cursor: pointer;
        padding: 0;
        line-height: 1;
        flex-shrink: 0;
    }

    /* Overlay when filters are open */
    .archive__filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .archive__filter-overlay.active {
        display: block;
    }

    /* Mobile filter view button */
    .archive__filter-view-btn {
        background-color: #552F24;
        color: #FBF5EC;
        border: none;
        border-radius: 0;
        font-weight: 500;
        font-size: 1rem;
        line-height: 1.5rem;
        cursor: pointer;
        padding: 1rem;
        width: 100%;
        flex-shrink: 0;
        z-index: 1001;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .archive__filter-view-btn:hover {
        background-color: #4a281f;
    }

    .archive__filter-view-btn:active {
        background-color: #3d1f18;
    }
    .fillers__box {
        display: none;
    }
}


/* Color Swatches */
.archive__filter-list--color {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.archive__filter-link--color {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    opacity: .5;
    border: 1px solid silver;
}

.archive__filter-link--color:hover {
    border-color: rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.archive__filter-item.is-active .archive__filter-link--color {
    border-color: #552F24;
    border-width: 2px;
}

.archive__filter-color-swatch {
    width: 100%;
    height: 100%;
    border-radius: 0.125rem;
    display: block;
}