/* =============================================
   KaroVision Category Filter — filter.css v1.3
   فقط برای shortcode فیلتر دسته‌بندی
   ============================================= */

/* ── Wrapper ── */
.karo-filter-wrapper {
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
    padding: 24px 0;
    scroll-margin-top: 80px;
}

/* ── دکمه‌های دسته‌بندی ── */
.karo-cat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.karo-cat-btn {
    padding: 9px 22px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    background: #fff;
    color: #444;
    cursor: pointer;
    font-size: 14px;
    font-family: Tahoma, Arial, sans-serif;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    outline: none;
}

.karo-cat-btn:hover {
    background: #f97316;
    border-color: #f97316;
    color: #fff !important;
}

.karo-cat-btn.active {
    background: #f97316;
    border-color: #f97316;
    color: #fff !important;
}

.karo-cat-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

/* ── عنوان دسته انتخاب‌شده ── */
.karo-filter-wrapper .karo-cat-title-bar {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f97316;
}

.karo-filter-wrapper .karo-cat-title-bar h2 {
    font-size: 20px;
    font-weight: bold;
    color: #222;
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
}

/* ── گرید محصولات ── */
.karo-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    min-height: 200px;
    transition: opacity 0.25s ease;
}

/* ── کارت محصول ── */
.karo-product-card {
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.karo-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ── تصویر محصول ── */
.karo-card-img-wrap {
    display: block;
    overflow: hidden;
    height: 190px;
}

.karo-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.karo-product-card:hover .karo-card-img-wrap img {
    transform: scale(1.05);
}

/* ── محتوای کارت ── */
.karo-card-body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.karo-card-title {
    font-size: 14px;
    font-weight: bold;
    color: #222;
    margin: 0;
    line-height: 1.5;
}

.karo-card-body a {
    text-decoration: none;
}

.karo-card-body a:hover .karo-card-title {
    color: #f97316;
}

/* ── قیمت ── */
.karo-price {
    font-size: 13px;
    color: #f97316;
    display: block;
}

.karo-price del {
    color: #aaa;
    font-size: 12px;
    margin-left: 4px;
}

/* ── دکمه مشاهده محصول ── */
.karo-view-btn {
    display: inline-block;
    margin-top: auto;
    padding: 8px 18px;
    background: #f97316;
    color: #fff !important;
    border-radius: 22px;
    font-size: 13px;
    text-align: center;
    text-decoration: none !important;
    transition: background 0.2s ease;
    font-family: Tahoma, Arial, sans-serif;
}

.karo-view-btn:hover {
    background: #ea6a0a;
    color: #fff !important;
}

/* ── اسپینر لودینگ ── */
.karo-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

.karo-load-more-loader {
    display: flex;
    justify-content: center;
    padding: 24px 0 8px;
}

.karo-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #eee;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: karo-spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes karo-spin {
    to { transform: rotate(360deg); }
}

/* ── پیام بدون محصول ── */
.karo-no-products {
    text-align: center;
    color: #aaa;
    grid-column: 1 / -1;
    padding: 60px 0;
    font-size: 15px;
}

/* ── ریسپانسیو ── */
@media (max-width: 600px) {
    .karo-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .karo-card-img-wrap {
        height: 140px;
    }

    .karo-cat-btn {
        padding: 7px 15px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .karo-products-grid {
        grid-template-columns: 1fr;
    }
}
