/* =============================================
   WISHLIST - FULL SCREEN PAGE
   Premium wishlist page with beautiful layout
   ============================================= */

/* Full Screen Overlay */
#wishlist-modal {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Override modal-overlay centering */
#wishlist-modal.modal-overlay {
    align-items: stretch !important;
    justify-content: stretch !important;
    background: var(--bg-primary) !important;
    padding: 0 !important;
}

/* Full Screen Page Content */
#wishlist-modal .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: var(--bg-primary);
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

/* Wishlist Header */
#wishlist-modal .modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

#wishlist-modal .modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Items Grid Area */
#wishlist-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

/* Wishlist Item Card */
.wishlist-item-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.wishlist-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

/* Remove Button */
.wishlist-remove-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 0.75rem;
}

.wishlist-remove-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--danger);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Product Image */
.wishlist-product-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wishlist-item-card:hover .wishlist-product-image img {
    transform: scale(1.05);
}

/* No image fallback */
.wishlist-product-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    gap: 0.5rem;
}

.wishlist-product-image-placeholder i {
    font-size: 3rem;
    opacity: 0.3;
}

/* Product Details */
.wishlist-product-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wishlist-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Order Button */
.wishlist-order-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.wishlist-order-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Empty State */
#wishlist-empty {
    text-align: center;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

#wishlist-empty i {
    font-size: 5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.4;
    display: block;
}

#wishlist-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#wishlist-empty p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Scrollbar Styling */
#wishlist-items::-webkit-scrollbar {
    width: 6px;
}

#wishlist-items::-webkit-scrollbar-track {
    background: transparent;
}

#wishlist-items::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

#wishlist-items::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Light Theme */
[data-theme="light"] .wishlist-item-card {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .wishlist-product-image {
    background: #f8f9fa;
}

[data-theme="light"] #wishlist-modal .modal-content {
    background: #f8f9fa;
}

[data-theme="light"] #wishlist-modal .modal-header {
    background: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #wishlist-items {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

    .wishlist-product-image {
        height: 140px;
    }

    #wishlist-modal .modal-header {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 480px) {
    #wishlist-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .wishlist-product-details {
        padding: 0.75rem;
    }
}