/* --- 1. MAIN GRID LAYOUT --- */
#products-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* grid-auto-rows allows multiple rows to grow naturally */
    grid-auto-rows: 335px; 
    justify-items: center;
    max-width: 1350px;
    margin: 0px auto;
    justify-content: center;
    padding: 0px 30px 10px 30px;
    gap: 20px;
}

/* Switches from grid to block when empty to center the flexbox message perfectly */
#products-list:has(.empty-wishlist-container) {
    display: block; 
}

/* --- 2. THE PRODUCT CARD (WISHLIST ITEM) --- */
.wishlist-item {
    position: relative;
    /* Removed all hover animations/scaling from the card itself */
}

.product-holder {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 230px;
    height: 330px;
    padding: 23px;
}

.product-holder img {
    display: flex;
    flex-direction: row;
    align-self: center;
    width: 190px;
    height: 190px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 19px;
}

.product-name {
    font-weight: 700;
}

.product-price {
    font-weight: 700;
    align-self: flex-start;
    margin-top: 2px;
}

/* --- 3. THE "X" BUTTON (SIMPLE FADE) --- */
.remove-btn {
    position: absolute;
    top: 13px;
    right: 10px;
    z-index: 10;
    background: black;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); */
    /* opacity: 0.5; */
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.remove-btn span {
    color: white;
    font-size: 20px;
}

.remove-btn:hover {
    opacity: 1 !important; /* Simple fade in */
    background-color: rgb(61, 61, 61) !important;
    transform: none !important; /* Ensures no scaling/rotation occurs */
}

/* --- 4. EMPTY STATE (UNIFORM FOR WISHLIST & CART) --- */
.empty-wishlist-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px;
    width: 100%;
}

.empty-wishlist-container span {
    margin-bottom: 10px;
    opacity: 0.4;
    font-size: 64px;
}

.empty-wishlist-container p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

/* Boutique-Style Button */
.empty-wishlist-container a {
    display: inline-block;
    padding: 12px 25px;
    background-color: #cbcbcb; /* Your requested light grey */
    color: #6b6b6b !important;
    text-decoration: none !important;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.empty-wishlist-container a:hover {
    background-color: #b0b0b0;
}

#products-title {
    max-width: 1350px;
    margin: 20px auto 0px auto;
    padding: 50px 40px 10px 50px;
    background: linear-gradient(to bottom, #f7f7f7, white);
    border-radius: 30px 30px 0px 0px;
}

/* --- 5. MOBILE REFINEMENT --- */
@media (max-width: 600px) {
    #products-list {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        grid-auto-rows: 260px;
        gap: 10px;
        min-width: 370px;
    }
    
    .product-holder {
        width: 180px;
        height: 260px;
        padding: 15px; /* Slightly reduced padding for mobile */
    }

    .product-holder img {
        width: 140px;
        height: 140px;
        margin-bottom: 10px;
    }
    
    .remove-btn {
        top: 8px !important;
        right: 14px !important;
        width: 26px !important;
        height: 26px !important;
    }
}