/* استایل‌های کلی - WooCommerce Archive Shortcodes */
.was-categories-container,
.was-filters-container,
.was-products-container {
    margin: 20px 0 !important;
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important;
    -moz-box-sizing: border-box !important;
}

/* جلوگیری از تداخل با سایر استایل‌ها */
.was-categories-container *,
.was-categories-container *:before,
.was-categories-container *:after {
    box-sizing: border-box !important;
}

/* استایل‌های دسته‌بندی‌ها */
.was-categories-container {
    position: relative !important;
    overflow: hidden !important;
    margin: 20px 0 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    width: 100% !important;
    max-width: 100% !important;
}

.was-section-title-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin: 0 0 8px 0 !important;
    padding: 4px 8px 12px !important;
    text-align: center !important;
}

.was-section-title-wrap::before,
.was-section-title-wrap::after {
    content: "" !important;
    flex: 1 1 auto !important;
    max-width: 120px !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, #c5ccd3, transparent) !important;
}

.was-section-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    position: relative !important;
}

.was-section-title::after {
    content: "" !important;
    display: block !important;
    width: 36px !important;
    height: 3px !important;
    margin: 8px auto 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #007cba, #28a745) !important;
}

@media (max-width: 768px) {
    .was-section-title {
        font-size: 16px !important;
        white-space: normal !important;
    }

    .was-section-title-wrap::before,
    .was-section-title-wrap::after {
        max-width: 40px !important;
    }
}

.was-categories-scroll {
    display: flex !important;
    gap: 20px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    padding: 20px 0 !important;
    scrollbar-width: thin !important;
    scrollbar-color: #007cba #f1f1f1 !important;
    -ms-overflow-style: auto !important;
    position: relative !important;
    margin: 0 10px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(10px) !important;
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
}

.was-categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.was-categories-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.was-categories-scroll::-webkit-scrollbar-thumb {
    background: #007cba;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.was-categories-scroll::-webkit-scrollbar-thumb:hover {
    background: #005a87;
}

.was-category-item {
    flex: 0 0 auto !important;
    min-width: 160px !important;
    max-width: 180px !important;
    text-align: center !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
}

.was-category-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.was-category-item.active {
    box-shadow: 0 6px 20px rgba(0,124,186,0.3);
    transform: translateY(-4px);
    border: 2px solid #007cba;
}

.was-category-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007cba, #28a745);
    z-index: 1;
}

.was-category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    cursor: pointer;
}

.was-category-image {
    position: relative;
    overflow: hidden;
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.was-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.was-category-item:hover .was-category-image img {
    transform: scale(1.1);
}

.was-category-info {
    padding: 15px 12px;
    background: white;
    position: relative;
}

.was-category-name {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

span.was-category-name {
    display: block;
    -webkit-line-clamp: 2;
}

.was-category-count {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
}

/* بهبود اسکرول دسته‌بندی‌ها */
.was-categories-scroll {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.was-categories-scroll:active {
    cursor: grabbing;
}

.was-categories-scroll.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.was-categories-scroll.dragging .was-category-item {
    pointer-events: none;
}

.was-categories-scroll.dragging .was-category-link {
    pointer-events: none;
}

/* اطمینان از اینکه لینک‌ها در حالت عادی قابل کلیک هستند */
.was-category-item:not(.dragging) .was-category-link {
    pointer-events: auto;
    z-index: 10;
}

/* نشانگر اسکرول */
.was-categories-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(248, 249, 250, 0.9), transparent);
    pointer-events: none;
    z-index: 5;
    border-radius: 0 12px 12px 0;
}

.was-categories-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(248, 249, 250, 0.9), transparent);
    pointer-events: none;
    z-index: 5;
    border-radius: 12px 0 0 12px;
}

/* استایل‌های فیلترها */
.was-filters-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

/* Sticky برای دسکتاپ */
@media (min-width: 769px) {
    .was-filters-container {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 20px !important;
        z-index: 1000 !important;
        backdrop-filter: blur(10px) !important;
        background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    }
    
    /* مخفی کردن دکمه و overlay در دسکتاپ */
    .was-mobile-filter-toggle {
        display: none !important;
    }
    
    .was-mobile-filter-overlay {
        display: none !important;
    }
    
    .was-mobile-filter-header {
        display: none !important;
    }
    
    /* نمایش عادی سایدبار در دسکتاپ */
    .was-filters-column {
        position: relative !important;
        right: auto !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
    }
}

.was-filters-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007cba, #28a745, #ffc107);
}

.was-filter-group {
    margin-bottom: 20px;
}

/* استایل‌های بهبود یافته برای select دسته‌بندی */
.was-category-select-wrapper {
    position: relative;
    width: 100%;
}

.was-category-select-wrapper::after {
    content: '▼';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
    font-size: 12px;
    z-index: 1;
    transition: color 0.3s ease;
}

.was-category-select-wrapper:hover::after {
    color: #007cba;
}

/* نمایش دسته انتخاب شده */
.was-category-select-wrapper.has-selection::after {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
    left: 10px;
}

.was-category-select-wrapper.has-selection .was-category-select {
    background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%) !important;
    border-color: #007cba !important;
    border-width: 2px !important;
    font-weight: 600 !important;
    color: #005a87 !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1) !important;
    min-height: 50px !important;
    padding: 14px 50px 14px 40px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.was-category-select-wrapper.has-selection .was-category-select option {
    background: #ffffff;
    color: #212529;
}

.was-category-select-wrapper.has-selection .was-category-select option:checked {
    background: #007cba;
    color: #ffffff;
}

/* استایل فیلترهای فعال */
.was-active-filters {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.was-active-filters-header {
    margin-bottom: 12px;
}

.was-active-filters-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.was-active-filters-title::before {
    content: '🔍';
    font-size: 18px;
}

.was-active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.was-active-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
}

.was-active-filter-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.was-filter-label {
    font-weight: 500;
    opacity: 0.9;
}

.was-filter-value {
    font-weight: 600;
}

.was-remove-filter {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.was-remove-filter:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.was-category-select {
    width: 100%;
    min-width: 200px;
    padding: 14px 50px 14px 40px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    background: #ffffff;
    background-image: none;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #212529;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-family: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: auto;
    min-height: 50px;
    line-height: 1.4;
    display: block;
}

.was-category-select:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
}

.was-category-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.1), 0 4px 12px rgba(0, 124, 186, 0.15);
    background: #ffffff;
}

.was-category-select option {
    padding: 12px 15px;
    font-size: 14px;
    background: #ffffff;
    color: #212529;
}

.was-category-select option:first-child {
    color: #6c757d;
    font-style: italic;
}

.was-category-select option:checked {
    background: #007cba;
    color: #ffffff;
}

/* استایل برای نمایش دسته انتخاب شده */
.was-category-select:not([value=""]) {
    background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%);
    border-color: #007cba;
    font-weight: 600;
}

.was-category-select:not([value=""])::after {
    content: '✓';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #007cba;
    font-weight: bold;
    font-size: 16px;
}

.was-filter-group h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.was-filter-group h4::before {
    content: '🔧';
    font-size: 18px;
}

/* استایل‌های دکمه‌های مرتب‌سازی */
.was-sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.was-sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    width: 140px;
    justify-content: center;
    flex: 1;
}

.was-sort-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.was-sort-btn:hover::before {
    left: 100%;
}

.was-sort-btn:hover {
    border-color: #007cba;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,124,186,0.15);
}

.was-sort-btn.active {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border-color: #007cba;
    box-shadow: 0 4px 15px rgba(0,124,186,0.3);
    transform: translateY(-2px);
}

.was-sort-btn.active::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
    font-weight: bold;
}

.was-sort-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.was-sort-btn:hover .was-sort-icon {
    transform: scale(1.1);
}

.was-sort-btn.active .was-sort-icon {
    transform: scale(1.1);
}

.was-sort-text {
    font-weight: 500;
    transition: all 0.3s ease;
}

.was-sort-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,124,186,0.2);
}

.was-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.was-clear-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220,53,69,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.was-clear-btn::before {
    content: '🗑️';
    font-size: 16px;
}

.was-clear-btn:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220,53,69,0.4);
}

.was-clear-btn:active {
    transform: translateY(0);
}

/* استایل‌های محصولات */
.was-products-container {
    position: relative;
}

.was-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.was-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
    list-style: none;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

ul.was-products-grid {
    list-style: none !important;
    padding: 0 !important;
}

.was-product-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    list-style: none;
    margin: 0;
}

.was-no-products-item {
    grid-column: 1 / -1;
    list-style: none;
    margin: 0;
    padding: 30px 10px;
    text-align: center;
}

.was-product-card:hover {
    border-color: #007cba;
}

.was-product-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* پشتیبانی از مرورگرهای قدیمی‌تر */
@supports not (aspect-ratio: 1 / 1) {
    .was-product-image {
        height: 0;
        padding-bottom: 100%; /* 1:1 aspect ratio */
    }
    
    .was-product-image a {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

.was-product-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.was-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.was-product-card:hover .was-product-image img {
    transform: scale(1.02);
}

.was-product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 8px;
}

.was-product-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.was-product-title a {
    text-decoration: none;
    color: #212529;
    transition: color 0.2s ease;
}

.was-product-title a:hover {
    color: #007cba;
}

.was-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #28a745;
    margin: 8px 0 0 0;
}

.was-product-details-btn {
    display: block;
    background: transparent;
    color: #007cba;
    padding: 6px 0;
    border: none;
    border-radius: 0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
}

.was-product-details-btn:hover {
    background: transparent;
    color: #005a87;
    transform: none;
    box-shadow: none;
}

/* استایل‌های Pagination */
.was-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 40px 0 20px 0 !important;
    padding: 16px !important;
    background: linear-gradient(180deg, #ffffff, #f8f9fa) !important;
    border-radius: 16px !important;
    flex-direction: column !important;
    gap: 14px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06) !important;
    border: 1px solid #eef1f4 !important;
}

.was-pagination-info {
    font-size: 13px !important;
    color: #6c757d !important;
    text-align: center !important;
}

.was-pagination-links {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.was-pagination-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    min-width: 44px !important;
    height: 44px !important;
    border: 2px solid #e9ecef !important;
    background: #ffffff !important;
    color: #2c3e50 !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

.was-pagination-btn:hover {
    background: linear-gradient(135deg, #f8f9fa, #eef2f6) !important;
    border-color: #cfd6dd !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}

.was-pagination-btn.active {
    background: linear-gradient(135deg, #007cba, #005a87) !important;
    color: #ffffff !important;
    border-color: #007cba !important;
    box-shadow: 0 8px 22px rgba(0,124,186,0.35) !important;
    transform: translateY(-2px) !important;
}

span.was-pagination-btn.active {
    cursor: default !important;
}

a.was-pagination-btn:focus-visible {
    outline: 2px solid #007cba !important;
    outline-offset: 2px !important;
}

.was-pagination-btn.was-prev-btn,
.was-pagination-btn.was-next-btn {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
    color: #ffffff !important;
    border-color: #28a745 !important;
    box-shadow: 0 8px 22px rgba(40,167,69,0.35) !important;
}

.was-pagination-btn.was-prev-btn:hover,
.was-pagination-btn.was-next-btn:hover {
    background: linear-gradient(135deg, #30b34f, #1c7430) !important;
    border-color: #1c7430 !important;
}

.was-pagination-dots {
    padding: 10px 8px !important;
    color: #8a9199 !important;
    font-weight: 700 !important;
}

/* حالت‌های قابل دسترسی و غیرفعال */
.was-pagination-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(0,124,186,0.2) !important;
}

.was-pagination-btn[disabled],
.was-pagination-btn.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    filter: grayscale(10%) !important;
}

/* توضیحات دسته‌بندی (بعد از محصولات) — استایل خودکار برای محتوای ویرایشگر */
.was-category-description {
    margin-top: 30px !important;
    padding: 28px 32px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.85 !important;
    width: 100% !important;
    clear: both !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}

.was-category-description > *:first-child {
    margin-top: 0 !important;
}

.was-category-description > *:last-child {
    margin-bottom: 0 !important;
}

/* پاراگراف */
.was-category-description p {
    margin: 0 0 1em !important;
    color: #444 !important;
}

/* تیترها */
.was-category-description h1,
.was-category-description h2,
.was-category-description h3,
.was-category-description h4,
.was-category-description h5,
.was-category-description h6 {
    margin: 1.5em 0 0.75em !important;
    color: #1a1a1a !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.was-category-description h1:first-child,
.was-category-description h2:first-child,
.was-category-description h3:first-child,
.was-category-description h4:first-child,
.was-category-description h5:first-child,
.was-category-description h6:first-child {
    margin-top: 0 !important;
}

.was-category-description h1 {
    font-size: 1.75em !important;
    padding-bottom: 0.4em !important;
    border-bottom: 2px solid #007cba !important;
}

.was-category-description h2 {
    font-size: 1.45em !important;
    padding-bottom: 0.35em !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.was-category-description h3 {
    font-size: 1.25em !important;
    color: #007cba !important;
}

.was-category-description h4 {
    font-size: 1.1em !important;
}

.was-category-description h5 {
    font-size: 1em !important;
    color: #555 !important;
}

.was-category-description h6 {
    font-size: 0.95em !important;
    color: #666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

/* لیست‌ها */
.was-category-description ul,
.was-category-description ol {
    margin: 0 0 1.25em !important;
    padding-inline-start: 1.75em !important;
    color: #444 !important;
}

.was-category-description ul {
    list-style-type: disc !important;
}

.was-category-description ol {
    list-style-type: decimal !important;
}

.was-category-description li {
    margin-bottom: 0.5em !important;
    line-height: 1.75 !important;
}

.was-category-description li > ul,
.was-category-description li > ol {
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
}

.was-category-description ul ul {
    list-style-type: circle !important;
}

.was-category-description ul ul ul {
    list-style-type: square !important;
}

/* جدول */
.was-category-description table {
    width: 100% !important;
    margin: 1.25em 0 !important;
    border-collapse: collapse !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    font-size: 0.95em !important;
    background: #fff !important;
}

.was-category-description thead {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%) !important;
}

.was-category-description th {
    padding: 12px 16px !important;
    text-align: start !important;
    font-weight: 600 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.was-category-description td {
    padding: 11px 16px !important;
    border: 1px solid #e9ecef !important;
    color: #444 !important;
    vertical-align: top !important;
}

.was-category-description tbody tr:nth-child(even) {
    background: #f8f9fa !important;
}

.was-category-description tbody tr:hover {
    background: #eef6fb !important;
}

/* نقل‌قول */
.was-category-description blockquote {
    margin: 1.25em 0 !important;
    padding: 16px 20px !important;
    border-inline-start: 4px solid #007cba !important;
    background: #fff !important;
    border-radius: 0 8px 8px 0 !important;
    color: #555 !important;
    font-style: italic !important;
}

.was-category-description blockquote p:last-child {
    margin-bottom: 0 !important;
}

/* لینک */
.was-category-description a {
    color: #007cba !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    transition: color 0.2s ease !important;
}

.was-category-description a:hover,
.was-category-description a:focus {
    color: #005a87 !important;
}

/* تصویر */
.was-category-description img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 1em 0 !important;
}

.was-category-description figure {
    margin: 1.25em 0 !important;
}

.was-category-description figcaption {
    margin-top: 0.5em !important;
    font-size: 0.9em !important;
    color: #666 !important;
    text-align: center !important;
}

/* متن پررنگ و مورب */
.was-category-description strong,
.was-category-description b {
    font-weight: 700 !important;
    color: #222 !important;
}

.was-category-description em,
.was-category-description i {
    font-style: italic !important;
}

/* خط جداکننده */
.was-category-description hr {
    margin: 1.5em 0 !important;
    border: 0 !important;
    border-top: 1px solid #dee2e6 !important;
}

/* کد */
.was-category-description code {
    padding: 2px 6px !important;
    background: #e9ecef !important;
    border-radius: 4px !important;
    font-size: 0.9em !important;
    color: #c7254e !important;
}

.was-category-description pre {
    margin: 1.25em 0 !important;
    padding: 16px !important;
    background: #2d2d2d !important;
    color: #f8f8f2 !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    font-size: 0.9em !important;
    line-height: 1.6 !important;
}

.was-category-description pre code {
    padding: 0 !important;
    background: transparent !important;
    color: inherit !important;
}

/* لیست تعریفی */
.was-category-description dl {
    margin: 1em 0 !important;
}

.was-category-description dt {
    font-weight: 700 !important;
    color: #222 !important;
    margin-top: 0.75em !important;
}

.was-category-description dd {
    margin-inline-start: 1.5em !important;
    margin-bottom: 0.5em !important;
    color: #555 !important;
}

@media (max-width: 768px) {
    .was-category-description {
        padding: 20px 16px !important;
        font-size: 14px !important;
    }

    .was-category-description h1 {
        font-size: 1.5em !important;
    }

    .was-category-description h2 {
        font-size: 1.3em !important;
    }

    .was-category-description table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .was-category-description th,
    .was-category-description td {
        padding: 10px 12px !important;
        white-space: nowrap !important;
    }
}

/* استایل‌های Loading */
.was-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.was-loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 124, 186, 0.1);
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

.was-loading-text {
    color: #007cba;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
/* Skeletons */
.was-skeleton-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.was-products-grid.was-loading {
    opacity: 0.7;
}

.was-skeleton-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: skeletonFade 1.5s ease-in-out infinite;
}

@keyframes skeletonFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.was-skeleton-card .was-product-image {
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.was-skeleton-card .was-product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmerSlide 1.5s ease-in-out infinite;
}

@keyframes shimmerSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skeleton-block {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 14px;
    border-radius: 6px;
    margin: 8px 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-50 { width: 50%; }

.skeleton-btn {
    height: 36px;
    border-radius: 6px;
    margin-top: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* استایل‌های خطا */
.was-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.was-no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive - تبلت */
@media (max-width: 1024px) and (min-width: 769px) {
    .was-products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
}

/* دکمه باز کردن فیلترها برای موبایل - پیش‌فرض مخفی */
.was-mobile-filter-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Overlay برای مودال */
.was-mobile-filter-overlay {
    display: none;
}

/* Header مودال */
.was-mobile-filter-header {
    display: none;
}

/* Responsive - موبایل */
@media (max-width: 768px) {
    /* دکمه sticky برای موبایل */
    .was-mobile-filter-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        position: fixed !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 99999 !important;
        background: linear-gradient(135deg, #007cba, #005a87) !important;
        color: white !important;
        border: none !important;
        border-radius: 50px !important;
        padding: 14px 24px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        box-shadow: 0 4px 20px rgba(0, 124, 186, 0.4) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        width: auto !important;
        height: auto !important;
        min-width: 120px !important;
        pointer-events: auto !important;
    }
    
    .was-mobile-filter-toggle:hover {
        background: linear-gradient(135deg, #005a87, #004a6f);
        transform: translateX(-50%) translateY(-2px);
        box-shadow: 0 6px 25px rgba(0, 124, 186, 0.5);
    }
    
    .was-mobile-filter-toggle:active {
        transform: translateX(-50%) translateY(0);
    }
    
    .was-filter-icon {
        font-size: 18px;
    }
    
    /* Overlay برای مودال */
    .was-mobile-filter-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .was-mobile-filter-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* سایدبار فیلترها در موبایل */
    .was-filters-column {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 85% !important;
        max-width: 350px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 10000 !important;
        overflow-y: auto !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: -2px 0 20px rgba(0, 0, 0, 0.2) !important;
        flex: none !important;
        min-width: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .was-filters-column.active {
        right: 0 !important;
    }
    
    /* Header مودال */
    .was-mobile-filter-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        background: linear-gradient(135deg, #007cba, #005a87);
        color: white;
        position: sticky;
        top: 0;
        z-index: 1;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .was-mobile-filter-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }
    
    .was-mobile-filter-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .was-mobile-filter-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }
    
    /* محتوای فیلترها در مودال */
    .was-mobile-filter-content {
        padding: 20px;
        padding-bottom: 100px; /* فاصله برای دکمه sticky */
        flex: 1;
        overflow-y: auto;
    }
    
    /* استایل فیلترها در مودال */
    .was-mobile-filter-content .was-filters-container {
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
    }
    
    /* Scrollbar برای سایدبار مودال */
    .was-filters-column::-webkit-scrollbar {
        width: 6px;
    }
    
    .was-filters-column::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .was-filters-column::-webkit-scrollbar-thumb {
        background: #007cba;
        border-radius: 3px;
    }
    
    .was-filters-column::-webkit-scrollbar-thumb:hover {
        background: #005a87;
    }
    
    /* مخفی کردن سایدبار در حالت عادی */
    .was-filters-column:not(.active) {
        display: none !important;
    }
    
    /* محصولات در موبایل */
    .was-products-column {
        width: 100% !important;
    }
    
    /* جلوگیری از scroll body وقتی مودال باز است */
    body.was-modal-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
    
    /* دکمه sticky در پایین صفحه - اطمینان از نمایش */
    .was-mobile-filter-toggle {
        bottom: 20px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* وقتی مودال باز است، دکمه را مخفی کن */
    body.was-modal-open .was-mobile-filter-toggle {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(-50%) translateY(20px) !important;
        transition: all 0.3s ease !important;
    }
    .was-categories-container {
        margin: 20px 0 !important;
        padding: 20px !important;
    }
    
    .was-categories-scroll {
        gap: 20px !important;
        padding: 20px 0 !important;
    }
    
    .was-category-item {
        min-width: 160px !important;
        max-width: 180px !important;
    }
    
    .was-category-image {
        height: 120px !important;
    }
    
    .was-category-info {
        padding: 15px 12px !important;
    }
    
    .was-category-name {
        font-size: 15px !important;
    }
    
    .was-filters-container {
        padding: 25px !important;
        margin-bottom: 25px !important;
    }
    
    .was-sort-buttons {
        gap: 8px !important;
        justify-content: center !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    
    .was-sort-btn {
        min-width: calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        padding: 10px 8px !important;
        font-size: 12px !important;
        flex: 0 0 calc(50% - 4px) !important;
    }
    
    .was-sort-text {
        font-size: 11px !important;
    }
    
    .was-filter-actions {
        justify-content: flex-end !important;
    }
    
    .was-clear-btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    /* تنظیم دو ستون برای موبایل */
    .was-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .was-skeleton-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .was-product-info {
        padding: 8px !important;
    }
    
    .was-product-title {
        font-size: 14px !important;
        min-height: 42px !important;
        font-weight: 600 !important;
    }
    
    .was-product-price {
        font-size: 15px !important;
        font-weight: 700 !important;
    }
    
    .was-product-details-btn {
        font-size: 11px !important;
        padding: 6px 0 !important;
    }
    
    .was-pagination {
        margin: 40px 0 20px 0 !important;
        padding: 20px !important;
    }
    
    .was-pagination-links {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    .was-pagination-btn {
        padding: 10px 15px !important;
        font-size: 14px !important;
        min-width: 40px !important;
    }
}

@media (max-width: 480px) {
    .was-categories-container {
        padding: 20px !important;
    }
    
    .was-category-item {
        min-width: 160px !important;
        max-width: 180px !important;
    }
    
    .was-category-image {
        height: 120px !important;
    }
    
    .was-category-info {
        padding: 15px 12px !important;
    }
    
    .was-category-name {
        font-size: 15px !important;
    }
    
    .was-category-count {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
    
    .was-filters-container {
        padding: 25px !important;
    }
    
    .was-filter-group h4 {
        font-size: 16px !important;
    }
    
    .was-sort-buttons {
        gap: 6px !important;
        justify-content: center !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    
    .was-sort-btn {
        min-width: calc(50% - 3px) !important;
        max-width: calc(50% - 3px) !important;
        padding: 8px 6px !important;
        font-size: 11px !important;
        flex: 0 0 calc(50% - 3px) !important;
    }
    
    .was-sort-text {
        font-size: 10px !important;
    }
    
    .was-sort-icon {
        font-size: 14px !important;
    }
    
    .was-clear-btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    .was-category-select {
        padding: 12px 45px 12px 35px !important;
        font-size: 14px !important;
        min-height: 45px !important;
        min-width: 150px !important;
    }
    
    .was-category-select-wrapper::after {
        left: 10px !important;
        font-size: 11px !important;
    }
    
    .was-category-select-wrapper.has-selection::after {
        left: 8px !important;
        font-size: 16px !important;
    }
    
    .was-category-select-wrapper.has-selection .was-category-select {
        padding: 12px 45px 12px 35px !important;
        min-height: 45px !important;
    }
}
