/* ═══════════════════════════════════════════════════════════
   Kitronic — Wishlist
   جميع الألوان من --kt-* (الثيم)
   ═══════════════════════════════════════════════════════════ */

/* ─── العدّاد العائم ─────────────────────────────────── */
.kt-wishlist-counter {
    position: fixed;
    /* Slot 3 — above the WhatsApp button. */
    bottom: var(--kt-float-slot-3, 153px);
    inset-inline-end: var(--kt-float-edge, 25px);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kt-surface);
    border: 2px solid var(--kt-border);
    border-radius: 50%;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--kt-text) 10%, transparent);
    text-decoration: none;
    transition: all 0.25s ease;
    z-index: 999997;
}

.kt-wishlist-counter:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px color-mix(in srgb, var(--kt-danger) 25%, transparent);
    border-color: var(--kt-danger);
}

.kt-wishlist-counter__icon {
    font-size: 22px;
    line-height: 1;
    color: inherit;
}

.kt-wishlist-counter__icon i.fa-solid,
.kt-wishlist-counter__icon i[class*="fa-"] {
    color: var(--kt-danger);
    font-size: inherit;
}

.kt-wishlist-counter__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--kt-danger);
    color: var(--kt-on-danger);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--kt-danger) 40%, transparent);
}

.kt-wishlist-counter:not(.has-items) .kt-wishlist-counter__badge {
    display: none;
}

/* ─── صفحة المفضلة ───────────────────────────────────── */
.kt-wishlist-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    direction: rtl;
}

/* ─── Count Badge ────────────────────────────── */
.kt-wishlist-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 10px;
    margin-inline-start: 8px;
    background: var(--kt-danger-light);
    color: var(--kt-danger-dark);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

/* ─── Empty State ────────────────────────────────────── */
.kt-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--kt-surface);
    border: 2px dashed var(--kt-border);
    border-radius: 14px;
}

.kt-wishlist-empty__icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
    color: var(--kt-text-muted);
}

.kt-wishlist-empty__icon i.fa-solid,
.kt-wishlist-empty__icon i[class*="fa-"] {
    color: var(--kt-text-muted);
    font-size: inherit;
}

.kt-wishlist-empty__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--kt-text);
}

.kt-wishlist-empty__desc {
    margin: 0 0 24px;
    color: var(--kt-text-muted);
    font-size: 14px;
}

.kt-wishlist-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--kt-primary);
    color: var(--kt-on-primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.kt-wishlist-empty__btn:hover {
    background: var(--kt-primary-dark);
    transform: translateY(-2px);
    color: var(--kt-on-primary);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .kt-wishlist-counter {
        bottom: 90px;
        inset-inline-end: 15px;
        width: 46px;
        height: 46px;
    }

    .kt-wishlist-counter__icon {
        font-size: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════
   زر القلب — فوق صورة المنتج (Single Product + Loop)
   ═══════════════════════════════════════════════════════════ */

.woocommerce-product-gallery {
    position: relative;
}

.kt-wishlist-btn {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--kt-surface) 98%, transparent);
    border: 2px solid var(--kt-surface);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--kt-text) 12%, transparent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--kt-text-muted);
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    outline: none;
}

.kt-wishlist-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--kt-text) 18%, transparent);
    background: var(--kt-surface);
}

.kt-wishlist-btn.is-active {
    color: var(--kt-danger);
}

/* زر القلب داخل بطاقة المنتج يُنسَّق في product-card.css (مصدر واحد) —
   هنا حالة التحميل فقط. */
.kt-wishlist-btn.is-loading,
.kt-product-card__wishlist.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ═══ Responsive ═══ */
@media (max-width: 600px) {
    .kt-wishlist-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: 10px;
        inset-inline-end: 10px;
    }
}