/**
 * KAP Wishlist Styles
 */

/* ─────────────────────────────────────────────
   Toast notification
   ───────────────────────────────────────────── */
.kap-wishlist-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #222;
    color: #fff;
    padding: 12px 24px;
    font-size: 14px;
    font-family: inherit;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
    direction: rtl;
    max-width: 90vw;
    text-align: center;
}

.kap-wishlist-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.kap-wishlist-toast--login {
    background: #e74c3c;
}

.kap-wishlist-toast--added {
    background: #27ae60;
}

.kap-wishlist-toast--removed {
    background: #555;
}

/* ─────────────────────────────────────────────
   [kap_wishlist_btn] — دکمه قلب
   ───────────────────────────────────────────── */
.kap-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.15s;
    line-height: 1;
    margin-right: -7px;
}

.kap-wishlist-btn:hover {
    transform: scale(1.1);
}

.kap-wishlist-btn:active {
    transform: scale(0.95);
}

.kap-wishlist-btn__icon {
    width: 22px;
    height: 22px;
    display: block;
    stroke: #333;
    fill: none;
    transition: stroke 0.2s, fill 0.2s;
}

/* Active state — قلب پر */
.kap-wishlist-btn--active .kap-wishlist-btn__icon {
    stroke: #e74c3c;
    fill: #e74c3c;
}

/* Loading state */
.kap-wishlist-btn--loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ─────────────────────────────────────────────
   [kap_wishlist_count] — آیکون هدر
   ───────────────────────────────────────────── */
.kap-wishlist-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.kap-wishlist-count__icon {
    width: 30px;
    height: 30px;
    display: block;
    stroke: #333;
    fill: none;
}

.kap-wishlist-count__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    position: absolute;
    top: -5px;
    left: -5px;
	border-radius: 50%;
}

/* ─────────────────────────────────────────────
   صفحه علاقه‌مندی‌ها در My Account
   ───────────────────────────────────────────── */
.kap-wishlist-page {
    direction: rtl;
}

.kap-wishlist-page__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #222;
}

/* Empty state */
.kap-wishlist-page__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 24px;
    text-align: center;
    color: #999;
}

.kap-wishlist-page__empty svg {
    stroke: #ccc;
}

.kap-wishlist-page__empty p {
    font-size: 15px;
    margin: 0;
}

.kap-wishlist-page__shop-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.kap-wishlist-page__shop-btn:hover {
    background: #444;
    color: #fff;
}

/* List */
.kap-wishlist-page__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Product Card (horizontal) ──────────── */
.kap-wl-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.2s;
}


/* Image */
.kap-wl-card__image-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    display: block;
}

.kap-wl-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info */
.kap-wl-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kap-wl-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kap-wl-card__title:hover {
    color: #555;
}

.kap-wl-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
}

.kap-wl-card__rating-count {
    color: #999;
    font-size: 12px;
}

.kap-wl-card__price {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.kap-wl-card__price del {
    color: #aaa;
    font-weight: 400;
    margin-left: 6px;
}

.kap-wl-card__price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* Actions */
.kap-wl-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex-shrink: 0;
    min-width: 140px;
}

.kap-wl-card__cart-btn,
.kap-wl-card__view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: filter 0.2s, transform 0.15s;
    border: none;
    white-space: nowrap;
}

.kap-wl-card__cart-btn {
    background: #ffc31d;
    color: #222;
}

.kap-wl-card__cart-btn:hover {
    filter: brightness(1.2);
}

.kap-wl-card__cart-btn--added {
    background: #27ae60;
}

.kap-wl-card__cart-btn--loading {
    opacity: 0.6;
    pointer-events: none;
}

.kap-wl-card__view-btn {
    background: #f1f1f1;
    color: #333;
}

.kap-wl-card__view-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.kap-wl-card__unavailable {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #f8f8f8;
    color: #999;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.kap-wl-card__remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: none;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    color: #bbb;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    align-self: center;
}

.kap-wl-card__remove-btn:hover {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fff5f5;
}

/* Removing animation */
.kap-wl-card--removing {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ─────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .kap-wl-card {
        flex-wrap: wrap;
    }

    .kap-wl-card__image-wrap {
        width: 80px;
        height: 80px;
    }

    .kap-wl-card__actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        min-width: unset;
    }

    .kap-wl-card__cart-btn,
    .kap-wl-card__view-btn {
        flex: 1;
    }
}
