/* JNXPC Limited - User Dashboard - Wishlist CSS */
/* ============================================= */

.wishlist-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wishlist-item {
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.wishlist-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 32px;
}

.item-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.price-drop {
    background: #d4edda;
    color: #155724;
}

.badge.back-in-stock {
    background: #d1ecf1;
    color: #0c5460;
}

.badge.high-demand {
    background: #fff3cd;
    color: #856404;
}

.subcontainer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 6px;
    line-height: 1.3;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: fit-content;
    align-items: stretch;
}

.item-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
}

.item-actions .remove-item {
    color: #dc3545;
    border-color: #dc3545;
}

.item-actions .remove-item:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.wishlist-item.removing {
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.3s ease;
}

.wishlist-item:hover .item-image img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.wishlist-item .item-image {
    overflow: hidden;
}

.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* --- Global Responsiveness Start --- */
@media (max-width: 1400px) {
    .wishlist-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .wishlist-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .price-section {
        margin-bottom: 0;
    }

    .subcontainer {
        flex-direction: column;
        gap: 6px;
    }

    .item-actions {
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .item-image {
        width: 78px;
        height: 78px;
    }

    .item-name {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .current-price {
        font-size: 14px;
    }

    .item-actions {
        gap: 6px;
    }

    .item-actions .btn {
        font-size: 9px;
        padding: 4px 8px;
        border-radius: 8px;
        gap: 4px;
    }

    .wishlist-item {
        padding: 12px;
        gap: 10px;
    }
}

/* --- Global Responsiveness End --- */