/* Shop Page Styles */

.shop {
    padding: 40px 0;
}

.shop__title {
    font-weight: 400;
    font-size: 64px;
    line-height: 100%;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    text-align: center;
    color: var(--secondary-color);
    max-width: 926px;
    margin-bottom: 40px;
}

.shop__title span {
    color: var(--primary-color);
}

.shop .container {
    align-items: center;
}

.shop__desc {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.shop__desc p {
    font-weight: 400;
    font-size: 18px;
    text-align: center;
    color: var(--text-color);
}

/* Filters Section */
.shop__filters {
    margin-bottom: 40px;
}

.shop__filters-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto 2fr;
    gap: 15px;
    align-items: center;
}

/* Filter Items */
.filter-item {
    position: relative;
}

/* Search Field */
.filter-input {
    width: 100%;
    padding: 12px 16px;
    font-weight: 400;
    font-size: 18px;
    height: 53px;
    color: #000;
    border: 1px solid #000;
    outline: none;
    transition: border-color 0.3s ease;
}

.filter-input::placeholder {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    color: var(--extra-color);
}

.filter-input:focus {
    border-color: var(--primary-color);
}

/* Custom Select */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

/* Multiselect modifier */
.custom-select--multiselect .custom-select__options {
    padding: 10px 0;
}

.custom-select--multiselect .custom-select__option {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.custom-select--multiselect .custom-select__option:hover {
    background-color: #f5f5f5;
}

.custom-select--multiselect .custom-select__option.selected {
    background-color: #fff3e0;
}

.custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: 53px;
    background: transparent;
    font-weight: 400;
    font-size: 18px;
    color: #000;
    border: 1px solid #000;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.custom-select__trigger:hover,
.custom-select.open .custom-select__trigger {
    border-color: var(--primary-color);
}

.custom-select__trigger span.more {
    font-size: 14px;
}

.custom-select__arrow {
    transition: transform 0.3s ease;
    color: var(--secondary-color);
}

.custom-select.open .custom-select__arrow {
    transform: rotate(180deg);
}

/* Color Filter Specific Styles */
.custom-select__option--color {
    position: relative;
    padding-right: 40px !important;
    transition: background-color 0.2s ease;
}

.custom-select__option--color:hover {
    background-color: #f5f5f5 !important;
}

.color-box {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    border-radius: 2px;
    flex-shrink: 0;
    display: inline-block;
}

.color-name {
    flex-grow: 1;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    color: #000;
}

.color-checkbox {
    position: absolute;
    right: 16px;
    width: 18px;
    height: 18px;
    border: 2px solid #000;
    border-radius: 2px;
    background: transparent;
    transition: all 0.2s ease;
}

.custom-select__option--color.selected .color-checkbox {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-select__option--color.selected .color-checkbox::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.custom-select__options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #000;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-select.open .custom-select__options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select__option {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 400;
    font-size: 18px;
    color: #000;
    transition: background-color 0.2s linear, color .2s linear;
}

.custom-select__option:hover {
    color: var(--background-color);
    background-color: var(--primary-color);
}

.custom-select__option.selected {
    background-color: var(--primary-color);
    color: #fff;
}

/* Price Range Filter */
.custom-select__options--price {
    padding: 15px;
    min-width: 250px;
}

.custom-select__options--price .price_slider_wrapper {
    width: 100%;
}

.custom-select__options--price .price_slider {
    margin-bottom: 15px;
}

.custom-select__options--price .price_slider_amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.custom-select__options--price .price_slider_amount input {
    flex: 1;
    min-width: 70px;
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid #000;
    text-align: center;
    background: #f9f9f9;
}

.ui-slider-horizontal .ui-slider-handle {
    top: -8px !important;
}

.custom-select__options--price .price_slider_amount span {
    color: var(--secondary-color);
    font-weight: bold;
}

.custom-select__options--price button.button {
    padding: 8px 16px;
    font-family: var(--font-family);
    font-size: 14px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.custom-select__options--price button.button:hover {
    background-color: #d89b00;
}

.custom-select__options--price .ui-slider {
    height: 4px;
    background: #e0e0e0;
    border: none;
    border-radius: 2px;
}

.custom-select__options--price .ui-slider-range {
    background: var(--primary-color);
}

.custom-select__options--price .ui-slider-handle {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    top: -6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-select__options--price .ui-slider-handle:focus {
    outline: none;
}

/* Filter Buttons */
.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 13px 24px;
    font-weight: 400;
    font-size: 18px;
    font-family: var(--font-family);
    color: var(--background-color);
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s linear;
    white-space: nowrap;
}

.filter-btn--apply {
    background-color: var(--primary-color);
    color: #fff;
}

.filter-btn--apply:hover {
    background-color: #d89b00;
}

.filter-btn--reset {
    background-color: #e0e0e0;
    color: var(--secondary-color);
}

.filter-btn--reset:hover {
    background-color: #d0d0d0;
}

/* Loading State */
.shop__items.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.shop__items.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.woocommerce-products-header {
    margin-bottom: 2rem;
}

.woocommerce-products-header__title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Product Cards Styles */

.shop__block .container {
    align-items: center;
}

.shop__block .shop__block__title {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 64px;
    line-height: 100%;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

.shop__block .shop__block__title span {
    color: var(--primary-color);
}

.shop__block .shop__block__desc {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    text-align: center;
    color: var(--text-color);
    max-width: 669px;
    margin-bottom: 40px;
}

.shop__block .shop__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    margin-bottom: 60px;
}

.shop__item--link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.shop__item--photo {
    position: relative;
    width: 100%;
    min-height: 480px;
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: block;
    margin-bottom: 20px;
}

.shop__item--title {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 28px;
    line-height: 100%;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.shop__item--desc {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    line-height: 140%;
    color: var(--text-color);
    flex-grow: 1;
    margin-bottom: 20px;
    min-height: 101px;
}

.shop__item--bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
}

.shop__item--price {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 28px;
    line-height: 100%;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.shop__item--price del {
    font-size: 16px;
    color: #999;
    margin-right: 8px;
}

.shop__item--price ins {
    text-decoration: none;
    color: var(--primary-color);
}

/* WooCommerce add to cart button styling */
.shop__item--bottom .button,
.shop__item--bottom .add_to_cart_button,
.shop__item--bottom .product_type_simple {
    display: inline-block;
    background-color: none;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    text-decoration: underline !important;
    text-decoration-skip-ink: none;
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.shop__item--bottom .added_to_cart {
    display: none !important;
}

.shop__block__no-products {
    text-align: center;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 18px;
    line-height: 140%;
    color: var(--text-color);
    padding: 40px 0;
}

/* Pagination Styles */
.shop__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 140px;
}

.shop__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 24px;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop__pagination .page-numbers:hover {
    color: var(--primary-color);
}

.shop__pagination .page-numbers.current {
    color: var(--primary-color);
    cursor: default;
}

.shop__pagination .page-numbers.prev,
.shop__pagination .page-numbers.next {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 24px;
}

.shop__pagination .page-numbers.next svg,
.shop__pagination .page-numbers.prev svg {
    stroke: #111111;
    transition: stroke .3s ease;
}

.shop__pagination .page-numbers.next:hover svg,
.shop__pagination .page-numbers.prev:hover svg {
    stroke: var(--primary-color);
}

.shop__pagination .page-numbers.dots {
    border: none;
    background: none;
    cursor: default;
    pointer-events: none;
}

.shop__pagination .page-numbers.dots:hover {
    background: none;
    color: #333;
}

.woocommerce-pagination {
    display: none !important;
}

.shop__item.sold .shop__item--photo::after {
    content: 'Sold Out';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 64px;
    line-height: 100%;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    text-align: center;
    color: var(--primary-color);
}

.shop__item.sold .shop__item--price {
    opacity: 0.2;
}

@media screen and (max-width: 1279px) {}

@media screen and (max-width: 1100px) {
    .shop__block .shop__items {
        grid-template-columns: repeat(2, 1fr);
    }

    .shop__filters-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }

    .filter-search {
        grid-column: 1/4;
    }

    .filter-actions {
        grid-column: 4/5;
        grid-row: 2/3;
    }

    .filter-btn {
        width: 100%;
    }
}

@media screen and (max-width: 1023px) {}

@media screen and (max-width: 959px) {
    .shop__title {
        font-size: 60px;
    }
}

@media screen and (max-width: 767px) {
    .shop__filters-wrapper {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
        grid-column: 1/2;
        grid-row: 6/7;
    }

    .filter-btn {
        width: 100%;
    }

    .shop__pagination {
        margin-bottom: 100px;
    }

    .shop__block .shop__items {
        grid-template-columns: 1fr;
    }

    .filter-search {
        grid-column: 1/2;
    }
}

@media screen and (max-width: 550px) {
    .shop__pagination {
        margin-bottom: 40px;
    }

    .shop__desc {
        margin-bottom: 0;
    }

    .shop__title {
        font-size: 44px;
        margin-bottom: 20px;
    }

    .shop__desc p {
        font-size: 16px;
    }

    .shop__item--title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .shop__item--desc {
        font-size: 16px;
    }
}

@media screen and (max-width: 474px) {}

@media screen and (max-width: 424px) {}

@media screen and (max-width: 374px) {}