/* „Любими продукти“ — прозорецът и табът в профила. Едни и същи компактни карти като в менюто: 2 колони на телефон, 4–5 на компютър.
   Цветовете идват от темите (--fv-*), радиуси 6/10/12, без сияния. */
#favorites-modal, #profile-modal { --fv-bg: #181818; --fv-s1: #1d1d1d; --fv-line: rgba(255, 255, 255, .11); --fv-tx: #f3f3f3; --fv-mu: #a9a9a9; --fv-ac: #e15829; --fv-ok: #2ecc71; }
html[data-theme="light"] #favorites-modal, html[data-theme="light"] #profile-modal { --fv-bg: #ffffff; --fv-s1: #f5f6f8; --fv-line: rgba(0, 0, 0, .11); --fv-tx: #17181c; --fv-mu: #60636b; --fv-ok: #15803d; }

#favorites-modal .favorites-grid, #profile-modal .favorites-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; max-height: none; overflow: visible; padding: 2px 0 8px; animation: none;
}
#favorites-modal .favorites-modal-content .modal-body { padding: 14px; }
#favorites-modal .favorites-grid .product-card, #profile-modal .favorites-grid .product-card {
    display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; background: var(--fv-s1); border: 1px solid var(--fv-line); border-radius: 10px; overflow: hidden; box-shadow: none; cursor: pointer;
    transition: border-color .15s, transform .15s;
}
#favorites-modal .favorites-grid .product-card:hover, #profile-modal .favorites-grid .product-card:hover { border-color: rgba(225, 88, 41, .55); transform: none; }
.favorites-grid .product-card .product-image { position: relative; aspect-ratio: 1 / 1; height: auto; width: 100%; background: #0a0a0a; overflow: hidden; }
.favorites-grid .product-card .product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.favorites-grid .product-card .favorite-btn { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
.favorites-grid .product-card .discount-badge { position: absolute; left: 8px; bottom: 8px; }
.favorites-grid .product-card .product-info { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; flex: 1 1 auto; }
.favorites-grid .product-card .product-name { margin: 0; font-size: 13.5px; line-height: 1.25; color: var(--fv-tx); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.5em; }
.favorites-grid .product-card .product-pricing { margin: 0; }
.favorites-grid .product-card .discount-pricing, .favorites-grid .product-card .normal-pricing { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.favorites-grid .product-card .current-price { font-size: 15px; padding: 2px 8px; border-radius: 6px; }
.favorites-grid .product-card .original-price { font-size: 12.5px; }
#favorites-modal .favorites-grid .product-card .product-weight, #profile-modal .favorites-grid .product-card .product-weight { margin-left: auto; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; gap: 4px; }
#favorites-modal .favorites-grid .product-card .product-weight i, #profile-modal .favorites-grid .product-card .product-weight i { font-size: 10px; }
.favorites-grid .product-card .pp-save { flex: 1 1 100%; margin: 0; font-size: 11.5px; padding: 3px 8px; }
.favorites-grid .product-card .fav-cart-area { margin-top: auto; position: relative; }
.favorites-grid .product-card .fav-cart-btn { position: static !important; inset: auto !important; transform: none !important; opacity: 1 !important; visibility: visible !important; width: 100%; min-height: 38px; padding: 7px 8px; border-radius: 8px; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.favorites-grid .product-card .fav-cart-btn.in-cart { background: transparent; color: var(--fv-ok); border: 1.5px solid var(--fv-ok); box-shadow: none; }
.favorites-grid .product-card .fav-cart-btn.in-cart:hover { background: rgba(46, 204, 113, .1); }

/* празно състояние */
#favorites-modal .favorites-empty, #profile-modal #favorites-container .empty-state { text-align: center; padding: 34px 16px; color: var(--fv-mu); }
#favorites-modal .favorites-empty i, #profile-modal #favorites-container .empty-state i { font-size: 30px; color: var(--fv-ac); margin-bottom: 10px; }
#favorites-modal .favorites-empty h4, #profile-modal #favorites-container .empty-state h3 { margin: 0 0 4px; font-size: 16px; color: var(--fv-tx); }
#favorites-modal .favorites-empty p, #profile-modal #favorites-container .empty-state p { margin: 0; font-size: 13.5px; }

@media (max-width: 768px) {
    #favorites-modal .favorites-grid, #profile-modal .favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .favorites-grid .product-card .product-info { padding: 8px 8px 10px; gap: 6px; }
    .favorites-grid .product-card .product-name { font-size: 12.5px; }
    .favorites-grid .product-card .current-price { font-size: 14px; padding: 2px 7px; }
    .favorites-grid .product-card .fav-cart-btn { min-height: 36px; font-size: 12px; padding: 6px; gap: 5px; }
    .favorites-grid .product-card .favorite-btn { width: 30px; height: 30px; top: 6px; right: 6px; font-size: 13px; }
}
