.shop-content {
    max-width: 100rem; 
    margin: 0 auto; 
    display: flex;
    gap: 20px;
    width: 100%;
    margin-bottom: 50px;
}

.product-grid-container {
    display: grid;
    gap: 20px;
    justify-content: center;
    grid-template-columns: repeat(4, 1fr);
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    box-sizing: border-box;
    padding: 15px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    box-shadow: 0px 8px 20px rgba(0, 0, 255, 0.3);
}

.woocommerce ul.products.columns-3 li.product, .woocommerce-page ul.products.columns-3 li.product {
    width: 100%;
}

.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
    margin: 0;
    padding: 0;
}

.custom-sorting-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
}

#sorting-icon {
    display: inline-flex;
    align-items: center;
}

.sorting-label {
    font-weight: bold;
    margin-right: -5px;
    font-size: 15px;
}

.sorting-button {
    display: inline-block;
    padding: 0 5px;
    font-size: 15px;
    color: #81858b;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.sorting-button.active {
    color: #027bff;
}

.sorting-button:hover {
    color: #027bff94;
}

.custom-sorting-buttons svg {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.shop-sidebar {
    flex: 0 0 280px;
    border: 1px solid #e7eaef;
    padding: 20px 20px 10px 20px;
    border-radius: 15px;
    height: auto;
    align-self: flex-start;
    position: sticky;
    top: calc(80px + 30px);
    margin: 10px 10px 25px 0;
}

@media (min-width: 1024px) {
    .shop-sidebar .children .cat-item:before {
        content: " ";
        color: #333;
        font-size: 16px;
        margin: 0 -30px 0 5px;
    }
    
    .shop-sidebar .children .cat-item {
        list-style-type: none;
    }
}

.shop-main-content {
    flex: 1;
    margin: 10px;
}

.filters-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #3f4064;
    margin: 0 0 30px 0;
}

.shop-sidebar h3 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
    color: #3f4064;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-arrow {
    transition: transform 0.3s ease;
    margin-top: 10px;
}

.toggle-arrow svg {
   color: #a1a3a9;
   font-weight: bold;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    color: #333;
    transition: transform 0.3s ease;
}

.toggle-arrow.active .arrow-icon {
    transform: rotate(180deg);
}

.shop-categories {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    max-height: 100%;
}

.search-item {
    position: sticky;
    top: 0;
    background-color: #fff;
    padding-top: 5px;
}

.category-search-desk-shop {
    width: calc(100% - 20px);
    padding: 8px 10px;
    border: 1px solid #e9ebef;
    border-radius: 50px;
    font-size: 14px;
    box-sizing: border-box;
}

.category-search-desk-shop::placeholder {
    color: #c4cad6;
}


.shop-categories li {
    margin-bottom: 10px;
    padding: 5px;
}

.shop-categories a {
    color: #3f4064;
    transition: color 0.3s;
    font-size: 15px;
    font-weight: 500;
}

.shop-categories a:hover {
    color: #027bff94;
    font-weight: bold;
}

.shop-categories .current-cat > a {
    color: #007bff;
    font-weight: bold;
}

.shop-categories .category-thumbnail {
    width: 25px;
    height: 25px;
    margin-left: 5px;
    vertical-align: middle;
    border-radius: 4px;
    object-fit: cover;
}

.vwalt-shop-breadcrumbs {
    padding: 20px;
    font-size: 14px;
    color: #666;
    max-width: 100rem;
    margin: 0 auto;
    width: 100%;
}

.vwalt-shop-breadcrumbs a {
    color: #81858b;
}

.vwalt-shop-breadcrumbs a:hover {
    text-decoration: underline;
}

.vwalt-shop-breadcrumbs span {
    color: #81858b;
}

.vwalt-shop-slash-breadcrumbs {
    margin: 0 10px;
}

.woocommerce ul.products li.product a img {
    border-radius: 15px;
}

.product-image {
    flex-grow: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

.woocommerce-loop-product__title {
    text-align: right;
    font-size: 13px !important;
    color: #333;
    font-weight: 500;
    margin: 0;
}

.product-title {
    flex-grow: 0; 
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    margin: 10px 0 0 0;
    width: 100%;
}

.product-item-link {
    color: inherit;
    display: block; 
}

.vwalt-price {
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
    color: #333;
    font-weight: bold;
}

.product-price {
    flex-grow: 0;
    margin-top: auto;
    width: 100%;
}

.vwalt-price-icon {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: -5px;
    display: inline-block;
    filter: invert(31%) sepia(0%) saturate(0%) hue-rotate(172deg) brightness(95%) contrast(90%);
}

.woocommerce ul.products[class*=columns-] li.product, .woocommerce-page ul.products[class*=columns-] li.product {
    margin: 0; 
}

/* باکس برای کنترل‌های موبایل */
.mobile-controls-container {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f0f0f1;
    border-radius: 20px;
    margin: 10px;
    position: sticky;
    top: 90px;
    z-index: 1;
}

.control-button {
    color: #767676;
    background: #fff;
    border: none;
    padding: 10px 0;
    width: 48%;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    text-align: right;
    padding: 10px 30px;
    transition: background-color 0.3s ease;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
}

.control-button .filter-icon,
.control-button .sort-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

/* پاپ‌آپ فیلتر */
.filter-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.filter-popup-content {
    background-color: #fff;
    margin: 0;
    padding: 0;
    border: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    position: relative;
    box-sizing: border-box;
    overflow-y: auto;
}

.category-search-mobile {
    width: calc(100% - 20px);
    padding: 8px 10px;
    border: 1px solid #e9ebef;
    border-radius: 50px;
    font-size: 14px;
    box-sizing: border-box;
    margin: 10px 10px; /* فاصله از بالا و پایین */
}

.category-search-mobile::placeholder {
    color: #c4cad6;
}

#category-list {
    overflow-y: auto;
    max-height: 100%;
}

.filter-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #edf1f5;
    position: sticky;
    top: 0;
    background-color: #fff; 
    z-index: 10;
}


.mobile-filters-title {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin: 0 auto 0 20px;
    text-align: center;
    flex-grow: 1;
}

.mobile-stor-filters-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    text-align: right;
    flex-grow: 1;
}

.close-popup {
    color: #a8aebc;
    font-size: 28px;
    font-weight: 100;
    cursor: pointer;
    margin-right: 15px;
}

.close-popup-shop-mobile {
    color: #a8aebc;
    font-size: 28px;
    font-weight: 100;
    cursor: pointer;
    margin-left: 10px;
}

.close-popup:hover,
.close-popup:focus {
    color: black;
    cursor: pointer;
}

/* استایل پاپ‌آپ مرتب‌سازی */
.sort-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    bottom: 0; 
    width: 100%;
    height: 70%; 
    background-color: #fff;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    transform: translateY(100%);
}


/* هدر پاپ‌آپ مرتب‌سازی */
.sort-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px 0 15px;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    flex-direction: row-reverse;
    position: sticky; 
    top: 0;
    background-color: #fff;
    z-index: 100;
}

.sort-popup.active {
    display: block;
    transform: translateY(0);
}

/* پس‌زمینه سیاه زیر پاپ‌آپ مرتب‌سازی */
.sort-popup-overlay {
    display: none;
    position: fixed;
    z-index: 9998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}


.sort-options {
    list-style: none;
    padding: 0;
    margin: 20px;
    text-align: right;
}

.sort-options li {
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f1f2;
    padding-bottom: 15px;
}

.sort-options li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sort-options a {
    color: #777; 
    font-size: 15px;
    display: block;
    text-align: right; 
}

/* استایل برای آیتم‌های فعال */
.sort-options a.active-sort {
    position: relative;
    color: #007bff;
    font-weight: bold;
}

/* افزودن آیکون تیک روبروی عنوان آیتم‌های فعال */
.sort-options a.active-sort::after {
    content: url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" version="1.1" fill="none" stroke="%23007bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><polyline points="2.75 8.75,6.25 12.25,13.25 4.75"></polyline></svg>');
    position: absolute;
    left: 0; 
    top: calc(50% + 0px); 
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
}

.sort-options a:hover {
    color: #007bff;
}

.sort-options .active-sort {
    color: #007bff;
    font-weight: bold;
}

.mobile-filter-category {
    padding: 15px;
}

.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    color: #333;
}

.dropdown-toggle.active .dropdown-arrow .arrow-icon {
    transform: rotate(180deg);
}

.category-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: block; 
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #777;
    font-size: 14px;
    transition: color 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
    color: #007bff;
    font-weight: bold;
}

.category-list .current-cat > a {
    color: #007bff;
    font-weight: bold;
}

.category-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.category-thumbnail {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border-radius: 5px;
    object-fit: cover;
    margin-bottom: -5px;
}

/* استایل خاص برای زیر دسته‌ها */
.category-item.subcategory {
    padding-left: 20px; /* ایجاد فاصله تو رفتگی برای زیر دسته‌ها */
    display: flex;
    align-items: center;
}

.category-item.subcategory .subcategory-indicator {
    margin: 0 8px; /* فاصله مناسب بین علامت و متن */
    color: #777;
}

/* غیرفعال کردن اسکرول صفحه */
.no-scroll {
    overflow: hidden;
}


/* Desktop: 5 columns */
@media (min-width: 1024px) {
    .mobile-controls-container {
        display: none;
    }
    .product-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet: 4 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .shop-sidebar, .custom-sorting-buttons {
        display: none;
    }
    .vwalt-price {
       font-size: 13px;
 }

/* Mobile: 2 columns */
@media (max-width: 767px) {
    .product-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}