/* نافذة المفضلة (إضافة/إزالة) — نفس نافذة متجر محمد بكري، بطلب المالك 2026-10-28.
   منسوخة من assets/css/product-inline.css (كانت بتتحمّل في صفحة المنتج بس) علشان النافذة تشتغل في كل الصفحات.
   النافذة نفسها في footer.php والحركة في bk-theme.js (bkWishToggle). */
/* Wishlist Success Modal */
.wishlist-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wishlist-modal {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
    border-radius: 24px;
    padding: 35px 25px;
    max-width: 450px;
    width: 95%;
    text-align: center;
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 25px 80px rgba(239, 68, 68, 0.2);
}

.wishlist-modal-overlay.active .wishlist-modal {
    transform: scale(1) translateY(0);
}

.wishlist-modal-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    animation: heartBeat 1s ease-in-out;
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4);
}

@keyframes heartBeat {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.wishlist-modal h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.wishlist-modal p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1rem;
}

.wishlist-modal-product {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 25px;
    text-align: right;
}

.wishlist-modal-product img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.wishlist-modal-product-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.wishlist-modal-product-info span {
    color: var(--primary);
    font-weight: 600;
}

/* SAR Symbol in wishlist modal */
.wishlist-modal-product-info .sar-symbol {
    display: inline-block;
    width: 1em;
    height: 1.1em;
    vertical-align: -0.15em;
    margin-right: 2px;
    background-color: var(--primary);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1124.14 1256.39'%3E%3Cpath d='M699.62,1113.02h0c-20.06,44.48-33.32,92.75-38.4,143.37l424.51-90.24c20.06-44.47,33.31-92.75,38.4-143.37l-424.51,90.24Z'/%3E%3Cpath d='M1085.73,895.8c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.33v-135.2l292.27-62.11c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.27V66.13c-50.67,28.45-95.67,66.32-132.25,110.99v403.35l-132.25,28.11V0c-50.67,28.44-95.67,66.32-132.25,110.99v525.69l-295.91,62.88c-20.06,44.47-33.33,92.75-38.42,143.37l334.33-71.05v170.26l-358.3,76.14c-20.06,44.47-33.32,92.75-38.4,143.37l375.04-79.7c30.53-6.35,56.77-24.4,73.83-49.24l68.78-101.97v-.02c7.14-10.55,11.3-23.27,11.3-36.97v-149.98l132.25-28.11v270.4l424.53-90.28Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1124.14 1256.39'%3E%3Cpath d='M699.62,1113.02h0c-20.06,44.48-33.32,92.75-38.4,143.37l424.51-90.24c20.06-44.47,33.31-92.75,38.4-143.37l-424.51,90.24Z'/%3E%3Cpath d='M1085.73,895.8c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.33v-135.2l292.27-62.11c20.06-44.47,33.32-92.75,38.4-143.37l-330.68,70.27V66.13c-50.67,28.45-95.67,66.32-132.25,110.99v403.35l-132.25,28.11V0c-50.67,28.44-95.67,66.32-132.25,110.99v525.69l-295.91,62.88c-20.06,44.47-33.33,92.75-38.42,143.37l334.33-71.05v170.26l-358.3,76.14c-20.06,44.47-33.32,92.75-38.4,143.37l375.04-79.7c30.53-6.35,56.77-24.4,73.83-49.24l68.78-101.97v-.02c7.14-10.55,11.3-23.27,11.3-36.97v-149.98l132.25-28.11v270.4l424.53-90.28Z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.wishlist-modal-actions {
    display: flex;
    gap: 12px;
}

.wishlist-modal-btn {
    flex: 1;
    padding: 12px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.wishlist-modal-btn.primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.wishlist-modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.wishlist-modal-btn.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.wishlist-modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.15);
}

@media (max-width: 576px) {
    .wishlist-modal { padding: 25px 20px; }
    .wishlist-modal-actions { flex-direction: column; gap: 10px; }
    .wishlist-modal-icon { width: 75px; height: 75px; font-size: 2.2rem; }
    .wishlist-modal-btn { width: 100%; padding: 12px 20px; }
}

/* ===== نافذة المفضلة — نفس ستايل نافذة السلة بلون وردي/أحمر ===== */
.wishlist-modal-overlay { background: rgba(3, 6, 15, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 16px; }
.wishlist-modal {
    --w: #f43f5e; --w-rgb: 244, 63, 94;
    position: relative; max-width: 420px; width: 100%; padding: 30px 26px 22px; border-radius: 26px; text-align: center;
    background: radial-gradient(120% 60% at 50% 0%, rgba(var(--w-rgb), .16), transparent 60%), linear-gradient(160deg, #161b2e 0%, #0f1322 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(var(--w-rgb), .14), inset 0 1px 0 rgba(255, 255, 255, .06);
    transform: translateY(24px) scale(.96); transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.wishlist-modal-overlay.is-remove .wishlist-modal, .wishlist-modal-overlay.is-remove { }
#wishlist-modal.is-remove .wishlist-modal { --w: #94a3b8; --w-rgb: 148, 163, 184; }
.wishlist-modal-overlay.active .wishlist-modal { transform: translateY(0) scale(1); }
.wishlist-modal-close {
    position: absolute; top: 14px; left: 14px; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); color: #94a3b8;
    display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .9rem; transition: all .25s ease;
}
.wishlist-modal-close:hover { color: #fff; background: rgba(255, 255, 255, .1); transform: rotate(90deg); }
.wishlist-modal-icon {
    width: 76px; height: 76px; margin: 2px auto 16px; border-radius: 50%; font-size: 2rem; color: var(--w) !important;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, rgba(var(--w-rgb), .2) 0%, rgba(var(--w-rgb), .05) 70%) !important;
    border: 1px solid rgba(var(--w-rgb), .35);
    box-shadow: 0 0 0 8px rgba(var(--w-rgb), .06), 0 12px 34px rgba(var(--w-rgb), .28);
    animation: none;
}
.wishlist-modal-icon i { filter: drop-shadow(0 0 10px rgba(var(--w-rgb), .6)); }
.wishlist-modal-overlay.active .wishlist-modal-icon i { animation: wlHeartPop .7s cubic-bezier(.22, 1.4, .36, 1) both; }
@keyframes wlHeartPop { 0% { transform: scale(0); } 55% { transform: scale(1.3); } 75% { transform: scale(.92); } 100% { transform: scale(1); } }
.wishlist-modal h3 { font-size: 1.35rem; font-weight: 900; margin: 0 0 6px; color: #fff; }
.wishlist-modal > p { font-size: .9rem; margin: 0 0 18px; color: #94a3b8; }
.wishlist-modal-product {
    gap: 14px; padding: 12px; margin-bottom: 18px; border-radius: 18px; text-align: start; justify-content: flex-start; align-items: center;
    background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .07);
}
.wishlist-modal-product img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex-shrink: 0; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.wishlist-modal-product-info { text-align: start; min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wishlist-modal-product-info h4 { font-size: .95rem; font-weight: 800; line-height: 1.45; margin: 0; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#wishlist-product-price { font-size: 1rem; font-weight: 900; color: #00d4ff; }
#wishlist-product-price:empty { display: none; }
.wishlist-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.wishlist-modal-btn { width: 100%; padding: 13px 18px; font-size: .95rem; border-radius: 14px; }
.wishlist-modal-btn.primary { background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%) !important; color: #fff; box-shadow: 0 10px 24px rgba(244, 63, 94, .3); }
#wishlist-modal.is-remove .wishlist-modal-btn.primary { background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.wishlist-modal-btn.secondary { background: transparent; border: 1px solid rgba(255, 255, 255, .12); color: #e2e8f0; }
.wishlist-modal-btn.secondary:hover { border-color: rgba(0, 212, 255, .5); color: #00d4ff; background: rgba(0, 212, 255, .06); }
[data-theme="light"] .wishlist-modal { background: radial-gradient(120% 60% at 50% 0%, rgba(var(--w-rgb), .1), transparent 60%), #fff; border-color: rgba(15, 23, 42, .08); box-shadow: 0 30px 70px rgba(15, 23, 42, .2); }
[data-theme="light"] .wishlist-modal h3, [data-theme="light"] .wishlist-modal-product-info h4 { color: #0f172a; }
[data-theme="light"] .wishlist-modal-product { background: #f8fafc; border-color: rgba(15, 23, 42, .06); }
[data-theme="light"] .wishlist-modal-btn.secondary { color: #334155; border-color: rgba(15, 23, 42, .15); }
@media (max-width: 576px) {
    .wishlist-modal { padding: 26px 18px 18px; border-radius: 22px; }
    .wishlist-modal-icon { width: 64px; height: 64px; font-size: 1.7rem; }
    .wishlist-modal h3 { font-size: 1.2rem; }
    .wishlist-modal-product img { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .wishlist-modal-overlay.active .wishlist-modal-icon i { animation: none; } }

