/* مستر اير — Wishlist Page */

/* ============ Page Header ============ */
.wl-page-header {
    text-align: center;
    margin-bottom: 2rem;
}
.wl-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}
.wl-page-header h1 i { color: #E53935; margin-left: 0.5rem; }
.wl-page-header .wl-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============ Toolbar ============ */
.wl-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.wl-toolbar-right { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.wl-toolbar-left { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.wl-toolbar select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.82rem;
    background: #fff;
    cursor: pointer;
}
.wl-toolbar .btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 6px;
}

/* ============ Cards Grid ============ */
.wl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* ============ Wishlist Card ============ */
.wl-card {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.wl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Remove button */
.wl-remove-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.wl-remove-btn:hover { background: #FEE2E2; color: #DC2626; }

/* Image */
.wl-card-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 1rem;
    position: relative;
}
.wl-card-img a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.wl-card-img img {
    max-width: 90%;
    max-height: 170px;
    object-fit: contain;
    transition: transform 0.3s;
}
.wl-card:hover .wl-card-img img { transform: scale(1.03); }

/* Out of stock overlay */
.wl-card-oos {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wl-card-oos span {
    background: #EF4444;
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Badges */
.wl-card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wl-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
}
.wl-badge-sale { background: #EF4444; }
.wl-badge-inverter { background: #0077C8; }

/* Body */
.wl-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wl-card-brand {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}
.wl-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wl-card-name a { color: inherit; text-decoration: none; }
.wl-card-name a:hover { color: var(--primary); }

/* Meta */
.wl-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.wl-card-meta i { color: var(--primary); width: 14px; }

/* Price */
.wl-card-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}
.wl-price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent, #F57C00);
}
.wl-price-current small { font-size: 0.7rem; font-weight: 400; }
.wl-price-old {
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: line-through;
}
.wl-card-stock {
    font-size: 0.75rem;
    font-weight: 600;
}
.wl-stock-in { color: #16A34A; }
.wl-stock-out { color: #EF4444; }

/* Actions */
.wl-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
}
.wl-card-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.wl-btn-cart {
    background: var(--accent, #F57C00);
    color: #fff;
}
.wl-btn-cart:hover { background: #E65100; box-shadow: 0 2px 8px rgba(245,124,0,0.3); }
.wl-btn-cart:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; box-shadow: none; }
.wl-btn-compare {
    background: #f1f5f9;
    color: var(--primary);
    border: 1px solid #e2e8f0 !important;
}
.wl-btn-compare:hover { background: #e0ecf5; }
.wl-btn-view {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0 !important;
}
.wl-btn-view:hover { background: #e2e8f0; }

/* ============ Empty State ============ */
.wl-empty {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 420px;
    margin: 0 auto;
}
.wl-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wl-empty-icon i {
    font-size: 2.5rem;
    color: #F87171;
}
.wl-empty h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}
.wl-empty p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.wl-empty .btn {
    padding: 0.65rem 2rem;
    font-size: 0.9rem;
    border-radius: 25px;
}

/* ============ Animations ============ */
@keyframes wlPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.wl-pulse i { animation: wlPulse 0.4s ease; }
.wl-loading { opacity: 0.6; pointer-events: none; }

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .wl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .wl-toolbar { flex-direction: column; align-items: stretch; }
    .wl-toolbar-right, .wl-toolbar-left { justify-content: center; }
    .wl-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .wl-card-img { height: 160px; }
    .wl-card-body { padding: 0.75rem; }
    .wl-card-actions { padding: 0 0.75rem 0.75rem; }
    .wl-card-actions .btn { font-size: 0.72rem; padding: 0.4rem; }
    .wl-card-name { font-size: 0.82rem; }
}
@media (max-width: 480px) {
    .wl-grid { grid-template-columns: 1fr; }
    .wl-card { flex-direction: row; }
    .wl-card-img { width: 130px; height: auto; min-height: 130px; flex-shrink: 0; }
    .wl-card-img img { max-height: 100px; }
    .wl-card-content { flex: 1; display: flex; flex-direction: column; }
    .wl-card-actions { flex-wrap: wrap; }
    .wl-card-actions .btn { min-width: 0; }
    .wl-remove-btn { top: 6px; left: 6px; width: 28px; height: 28px; font-size: 0.75rem; }
}
