/* ══════════════════════════════════════════════════════════════════
   WC Product Grid — style.css v2.0.0
   ══════════════════════════════════════════════════════════════════ */

/* ── ریست پایه ──────────────────────────────────────────────────── */
.wc-grid-wrap,
.wc-grid-wrap *,
.wcpg-filter-wrap,
.wcpg-filter-wrap * {
    font-family: IRANYekanX, IRANYekan, sans-serif !important;
    box-sizing: border-box;
}

.wcpg-wrap,
.wc-grid-wrap,
.wcpg-filter-wrap {
    direction: rtl;
}

/* ══════════════════════════════════════════════════════════════════
   گرید محصولات
   ══════════════════════════════════════════════════════════════════ */

.wc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.wc-card {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .25s ease,
                box-shadow .25s ease,
                border-color .25s ease;
    position: relative;
}

.wc-card:hover {
    transform: translateY(-3px);
    border-color: #cfcfcf;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}

.wc-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.wc-thumb {
    aspect-ratio: 1 / 1;
    background: #f1f1f1;
    overflow: hidden;
}

.wc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.wc-card:hover .wc-thumb img {
    transform: scale(1.04);
}

.wc-content {
    padding: 14px;
}

.wc-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 70px;
    margin: 0 0 10px;
    color: #111;
    text-align: right;
}

/* ── قیمت ───────────────────────────────────────────────────────── */

.wc-price {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    direction: ltr;
    text-align: left;
    gap: 6px;
    width: 100%;
    margin-bottom: 12px;
}

.wc-price-currency {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    white-space: nowrap;
    direction: rtl;
}

.wc-price-amount {
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 18px;
    font-weight: 900;
    color: #111;
    line-height: 1.4;
}

/* ── تماس بگیرید ─────────────────────────────────────────────────── */

.wc-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    color: #1a6fc4;
    background: rgba(26, 111, 196, .08);
    border: 1px solid rgba(26, 111, 196, .22);
    border-radius: 7px;
    padding: 5px 12px;
    margin-bottom: 12px;
}

.wc-contact::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a6fc4;
    flex-shrink: 0;
}

/* ── متا ─────────────────────────────────────────────────────────── */

.wc-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.wc-id,
.wc-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 5px;
    text-align: center;
    white-space: nowrap;
}

.wc-id {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    background: #e9e9e9;
}

.wc-guarantee {
    font-size: 12px;
    font-weight: 800;
    color: #00a86b;
    background: rgba(0, 168, 107, .12);
}

.wc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 16px;
    border: 1px dashed #ddd;
    border-radius: 12px;
    color: #666;
    background: #fafafa;
    font-size: 14px;
}

/* ── پیجینیشن ───────────────────────────────────────────────────── */

.wc-pagination {
    margin-top: 26px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.wcpg-page-btn {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
    line-height: 1.5;
}

.wcpg-page-btn:hover:not(.current) {
    background: #f5f5f5;
    border-color: #bbb;
}

.wcpg-page-btn.current {
    background: #111;
    color: #fff;
    border-color: #111;
    cursor: default;
    pointer-events: none;
}

/* ── لودینگ ─────────────────────────────────────────────────────── */

#wcpg-results.wcpg-loading {
    opacity: .4;
    pointer-events: none;
    transition: opacity .2s;
}

/* ══════════════════════════════════════════════════════════════════
   بخش فیلتر
   ══════════════════════════════════════════════════════════════════ */

.wcpg-filter-wrap {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    padding: 18px 16px;
}

.wcpg-filter-group {
    margin-bottom: 22px;
}

.wcpg-filter-group:last-of-type {
    margin-bottom: 0;
}

/* ── عنوان فیلتر ─────────────────────────────────────────────────── */

.wcpg-filter-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #111;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    letter-spacing: -.01em;
}

/* ── ورودی ───────────────────────────────────────────────────────── */

.wcpg-filter-input[type="text"],
.wcpg-filter-input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    direction: rtl;
    color: #333;
    background: #fafafa;
    transition: border-color .2s, background .2s, box-shadow .2s;
    -moz-appearance: textfield;
    appearance: textfield;
}

.wcpg-filter-input[type="text"]:focus,
.wcpg-filter-input[type="number"]:focus {
    outline: none;
    border-color: #1a6fc4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 111, 196, .1);
}

.wcpg-filter-input[type="number"]::-webkit-inner-spin-button,
.wcpg-filter-input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* ── قیمت ───────────────────────────────────────────────────────── */

.wcpg-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcpg-price-inputs .wcpg-filter-input {
    flex: 1;
    min-width: 0;
}

.wcpg-price-sep {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   Toggle (کلید) برای موجودی
   ══════════════════════════════════════════════════════════════════ */

.wcpg-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.wcpg-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.wcpg-toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ddd;
    border-radius: 100px;
    flex-shrink: 0;
    transition: background .25s ease;
}

.wcpg-toggle-thumb {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    transition: right .25s ease;
}

.wcpg-toggle-input:checked ~ .wcpg-toggle-track {
    background: #1a6fc4;
}

.wcpg-toggle-input:checked ~ .wcpg-toggle-track .wcpg-toggle-thumb {
    right: calc(100% - 21px);
}

.wcpg-toggle-text {
    font-size: 13px;
    font-weight: 400;
    color: #444;
    transition: color .2s;
}

.wcpg-toggle-input:checked ~ .wcpg-toggle-text {
    color: #1a6fc4;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════
   Chip برای ویژگی‌ها
   ══════════════════════════════════════════════════════════════════ */

.wcpg-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wcpg-chip {
    display: inline-flex;
    cursor: pointer;
    user-select: none;
}

.wcpg-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.wcpg-chip-text {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 400;
    color: #555;
    background: #f5f5f5;
    border: 1.5px solid #e8e8e8;
    border-radius: 100px;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
    white-space: nowrap;
    line-height: 1.5;
}

.wcpg-chip:hover .wcpg-chip-text {
    background: #eef3fb;
    border-color: #b3cde8;
    color: #1a6fc4;
}

.wcpg-chip input[type="checkbox"]:checked + .wcpg-chip-text {
    background: #1a6fc4;
    border-color: #1a6fc4;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(26, 111, 196, .25);
}

/* ── دکمه‌ها ─────────────────────────────────────────────────────── */

.wcpg-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.wcpg-btn-apply,
.wcpg-btn-reset {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    line-height: 1.5;
    transition: background .2s, color .2s, transform .15s;
}

.wcpg-btn-apply:active,
.wcpg-btn-reset:active {
    transform: scale(.98);
}

.wcpg-btn-apply {
    background: #1a6fc4;
    color: #fff;
    font-weight: 600;
}

.wcpg-btn-apply:hover {
    background: #155da0;
}

.wcpg-btn-reset {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #e0e0e0;
    font-weight: 400;
}

.wcpg-btn-reset:hover {
    background: #eaeaea;
    color: #333;
}

/* ══════════════════════════════════════════════════════════════════
   ریسپانسیو
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .wc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .wc-title {
        font-size: 13px;
        min-height: 60px;
    }

    .wc-price-amount {
        font-size: 16px;
    }

    .wc-id,
    .wc-guarantee {
        font-size: 10px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .wc-grid {
        grid-template-columns: 1fr;
    }

    .wcpg-chip-text {
        font-size: 12px;
        padding: 5px 12px;
    }
}