/**
 * Shop Archive Styles
 * 
 * استایل‌های صفحه آرشیو محصولات و فروشگاه
 * شناسه تغییر: SHOP-ARCHIVE-CSS-007
 * 
 * @package TopTheme
 * @since 1.0.0
 */

.shop-archive-wrapper {
    background: #f5f5f5;
    min-height: 60vh;
}

.shop-archive-header-section {
    background: #fff;
    padding: 30px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.shop-archive-header-section .shop-archive-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

.shop-archive-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 20px 15px;
    padding-top: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

@media (min-width: 576px) {
    .shop-archive-header-section .shop-archive-container,
    .shop-archive-container {
        max-width: 540px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 768px) {
    .shop-archive-header-section .shop-archive-container,
    .shop-archive-container {
        max-width: 720px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 992px) {
    .shop-archive-header-section .shop-archive-container,
    .shop-archive-container {
        max-width: 960px;
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (min-width: 1200px) {
    .shop-archive-header-section .shop-archive-container,
    .shop-archive-container {
        max-width: 1140px;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 1400px) {
    .shop-archive-header-section .shop-archive-container,
    .shop-archive-container {
        max-width: 1320px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

.shop-archive-content {
    flex: 1;
    min-width: 0;
}

.woocommerce-products-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.woocommerce-products-header__title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 15px 0;
}

.shop-loop-controls {
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    display: block;
}

.shop-loop-controls .active-filters {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    background: #fafafa;
    border-radius: 8px;
}

.shop-loop-controls .active-filters-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.shop-loop-controls .active-filters-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.shop-loop-controls .active-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 5px;
    font-size: 13px;
    color: #333;
}

.shop-loop-controls .active-filter-item .filter-label {
    font-weight: 500;
}

.shop-loop-controls .active-filter-item .filter-remove {
    color: #999;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 11px;
}

.shop-loop-controls .active-filter-item .filter-remove:hover {
    background: #FFB22C;
    color: #000;
}

.shop-loop-controls .clear-all-filters {
    margin-right: auto;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.shop-loop-controls .clear-all-filters:hover {
    border-color: #FFB22C;
    color: #FFB22C;
    background: #fffef8;
}

.shop-loop-controls .woocommerce-ordering {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.shop-loop-controls .ordering-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #666;
    font-size: 16px;
}

.shop-loop-controls .ordering-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.shop-loop-controls .ordering-buttons {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.shop-loop-controls .ordering-button {
    padding: 6px 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    position: relative;
}

.shop-loop-controls .ordering-button:hover {
    color: #FFB22C;
}

.shop-loop-controls .ordering-button.active {
    color: #FFB22C;
    font-weight: 600;
}

.shop-loop-controls .ordering-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: #FFB22C;
}

.category-short-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.category-full-description {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.category-description-content {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
}

.category-description-content h2,
.category-description-content h3,
.category-description-content h4 {
    color: #000;
    margin-top: 20px;
    margin-bottom: 10px;
}

.category-description-content p {
    margin-bottom: 15px;
}

.category-description-content ul,
.category-description-content ol {
    margin: 15px 0;
    padding-right: 25px;
}

.product-subcategories {
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-subcategories .subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.product-subcategories .subcategory-item {
    margin: 0;
    padding: 0;
}

.product-subcategories .subcategory-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.product-subcategories .subcategory-link:hover {
    border-color: #FFB22C;
    color: #FFB22C;
    background: #fffef8;
}

.product-subcategories .subcategory-name {
    font-weight: 500;
}

.product-subcategories .subcategory-count {
    color: #999;
    font-size: 12px;
}

.products-grid-wrapper {
    margin-top: 0;
    width: 100%;
    clear: both;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.shop-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.shop-widget {
    margin-bottom: 0;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.shop-widget:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.shop-widget:first-child {
    border-radius: 12px 12px 0 0;
}

.shop-widget-title,
.shop-widget .widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #FFB22C;
    position: relative;
}

.shop-widget-title::after,
.shop-widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 50px;
    height: 2px;
    background: #FFB22C;
}

.shop-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-widget ul li {
    padding: 0;
    margin: 0 0 8px 0;
    border-bottom: none;
    display: flex;
    align-items: center;
}

.shop-widget ul li:last-child {
    margin-bottom: 0;
}

.shop-widget ul li label {
    width: 100%;
    margin: 0;
}

.shop-widget a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.5;
    gap: 8px;
}

.shop-widget a:hover {
    color: #FFB22C;
    padding-right: 5px;
}

.shop-widget a .count {
    color: #999;
    font-size: 13px;
    order: 2;
}

.shop-widget label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    min-height: 32px;
}

.shop-widget label:hover {
    color: #FFB22C;
}

.shop-widget input[type="checkbox"],
.shop-widget input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    min-width: 18px;
    cursor: pointer;
    accent-color: #FFB22C;
    flex-shrink: 0;
    vertical-align: middle;
    align-self: center;
}

.shop-widget label .count {
    color: #999;
    font-size: 13px;
    margin-right: auto;
    order: -1;
}

.shop-widget .count-label {
    color: #999;
    font-size: 13px;
    margin-right: auto;
}

.shop-widget select {
    width: 100%;
    padding: 10px 12px;
    padding-left: 35px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
    margin-top: 8px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 12px;
}

.shop-widget select:hover {
    border-color: #FFB22C;
}

.shop-widget select:focus {
    outline: none;
    border-color: #FFB22C;
    box-shadow: 0 0 0 2px rgba(255, 178, 44, 0.1);
}

.shop-widget .price_slider_wrapper {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
}

.shop-widget .price_slider {
    width: 100%;
    margin: 0;
    order: 1;
}

.shop-widget .price_slider_amount {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    order: 2;
}

.shop-widget .price_slider_amount .price_label {
    order: 1;
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 8px 0;
}

.shop-widget .price_slider_amount .button {
    order: 2;
    padding: 8px 16px;
    background: #FFB22C;
    color: #000;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    align-self: flex-start;
    margin-top: 0;
}

.shop-widget .price_slider_amount .button:hover {
    background: #e6a025;
}

.shop-widget .ui-slider {
    position: relative;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 15px 0;
    width: 90%;
}

.shop-widget .ui-slider-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #FFB22C;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    top: -6px;
    margin-left: -9px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.shop-widget .ui-slider-handle:hover {
    background: #e6a025;
    transform: scale(1.1);
}

.shop-widget .ui-slider-range {
    position: absolute;
    height: 100%;
    background: #FFB22C;
    border-radius: 3px;
}

.shop-widget .select2-container .select2-selection--single {
    height: auto !important;
    min-height: 42px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.shop-widget .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 10px 12px !important;
    padding-left: 35px !important;
    line-height: 1.5;
    font-size: 13px !important;
    color: #333;
}

.shop-widget .select2-container .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: auto;
    left: 8px;
    width: 20px;
}

.shop-widget .select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: #666 transparent transparent transparent;
    border-width: 5px 4px 0 4px;
    margin-top: -2px;
}

.shop-widget .select2-container--default .select2-selection--single {
    background-color: #fff;
    height: auto !important;
    min-height: 42px;
}

.shop-widget .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #666 transparent;
    border-width: 0 4px 5px 4px;
    margin-top: -3px;
}

.shop-widget .select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

.shop-widget .select2-results__option {
    padding: 8px 12px;
    font-size: 13px;
}

.shop-widget .select2-results__option--highlighted {
    background-color: #fffef8;
    color: #FFB22C;
}

.mobile-shop-controls {
    display: none;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
}

.mobile-filter-toggle, .mobile-sort-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #efeeee;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    font-family: iransans;
}

.mobile-filter-toggle:hover,
.mobile-sort-toggle:hover {
    background: #fff;
    border-color: #d0d0d0;
    color: #000;
}

.mobile-filter-toggle:active,
.mobile-sort-toggle:active {
    background: #f5f5f5;
    border-color: #c0c0c0;
}

.mobile-filter-toggle i,
.mobile-sort-toggle i {
    font-size: 16px;
    color: #666;
}

.mobile-filter-toggle span,
.mobile-sort-toggle span {
    color: inherit;
}

.sidebar-close-mobile {
    display: none;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.sidebar-close-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.sidebar-close-btn:hover {
    background: #FFB22C;
    color: #000;
}

.shop-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.shop-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.shop-sidebar {
    z-index: 9999;
}

.mobile-sort-modal {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-sort-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-sort-modal-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-sort-modal-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    direction: rtl !important;
    text-align: right !important;
}

.mobile-sort-modal.active .mobile-sort-modal-content {
    transform: translateY(0);
}

.mobile-sort-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-radius: 20px 20px 0 0;
    direction: rtl;
}

.mobile-sort-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    text-align: right;
}

.mobile-sort-close {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.mobile-sort-close:hover {
    background: #FFB22C;
    color: #000;
}

.mobile-sort-modal-body {
    padding: 20px;
    direction: rtl;
    text-align: right;
}

.mobile-sort-modal-body .woocommerce-ordering {
    margin: 0 !important;
    direction: rtl !important;
    text-align: right !important;
    float: right;
}

.mobile-sort-modal-body .woocommerce-ordering > .ordering-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    color: #666 !important;
    font-size: 16px !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
    vertical-align: middle !important;
}

.mobile-sort-modal-body .woocommerce-ordering > .ordering-label {
    display: inline-block !important;
    text-align: right !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

.mobile-sort-modal-body .ordering-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 15px !important;
    direction: rtl !important;
}

.mobile-sort-modal-body .ordering-button {
    width: 100% !important;
    text-align: right !important;
    padding: 14px 18px !important;
    direction: rtl !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    color: #666 !important;
    font-weight: 400 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    display: block !important;
    text-decoration: none !important;
}

.mobile-sort-modal-body .ordering-button:hover {
    color: #FFB22C !important;
    background: #fffef8 !important;
}

.mobile-sort-modal-body .ordering-button.active {
    color: #0066cc !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

@media (max-width: 1024px) {
    .shop-archive-container {
        flex-direction: column;
    }

    .shop-sidebar {
        width: 100%;
        position: static;
        order: 0;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .mobile-shop-controls {
        display: flex;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        z-index: 10000;
        overflow-y: auto;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
        padding: 0;
    }

    .shop-sidebar.active {
        right: 0;
    }

    .sidebar-close-mobile {
        display: block;
    }

    .shop-sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    
    .shop-sidebar-overlay.active {
        pointer-events: auto;
    }

    .shop-loop-controls {
        display: none !important;
    }
    
    .desktop-ordering-wrapper {
        display: none !important;
    }

    .shop-archive-wrapper {
        padding: 15px 0;
    }

    .shop-archive-container {
        padding: 0 10px;
        gap: 20px;
    }

    .woocommerce-products-header__title {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .shop-widget {
        padding: 15px;
    }

    .shop-widget-title {
        font-size: 16px;
    }

    .mobile-sort-modal {
        display: block;
    }
    
    .mobile-shop-controls {
        position: relative;
        z-index: 10;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Selected filters UI */
.selected-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filters-label {
    font-weight: 600;
    color: #495057;
    margin-right: 8px;
    white-space: nowrap;
}

.clear-all-filters {
    margin-left: auto;
    padding: 6px 12px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'IRANSansWeb', 'IRANSansWeb_FaNum', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear-all-filters:hover {
    background: #c82333;
}

.selected-filter {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 14px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-remove {
    color: #dc3545;
    cursor: pointer;
    margin-left: 8px;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s ease;
}

.filter-remove:hover {
    color: #c82333;
}

/* Price filter RTL direction */
.price_label,
.price_label span {
    direction: rtl;
}

