/* Global styles remain unchanged */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Arial', sans-serif;
    background-color: #eaf2f8;
    color: #333;
    line-height: 1.6;
}


h1 {
    text-align: center;
    margin-top: 20px;
    font-size: 2.5rem;
    color: #2c3e50;
}


.wishlist-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}


.section-header {
    margin: 20px 0 10px;
    font-size: 1.8rem;
    color: #2980b9;
    text-align: left;
    border-bottom: 2px solid #2980b9;
    padding-bottom: 5px;
}


/* Responsive grid setup */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Default: 6 items per row */
    gap: 15px;
    margin-bottom: 2rem;
}


/* Responsive breakpoints */
@media (max-width: 1200px) {
    .wishlist-grid {
        grid-template-columns: repeat(5, 1fr); /* 5 items on medium screens */
    }
}


@media (max-width: 992px) {
    .wishlist-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 items on smaller screens */
    }
}


@media (max-width: 768px) {
    .wishlist-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 items on tablets */
    }
}


@media (max-width: 576px) {
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 items on mobile */
    }
}


@media (max-width: 400px) {
    .wishlist-grid {
        grid-template-columns: 1fr; /* 1 item on very small screens */
    }
}


.item-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}


.item-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}
.img-container {
    display: flex;
    min-height: 140px;
    align-items: center;
}


.item-card h3 {
    font-size: 1.2rem;
    margin: 10px 0;
    text-align: center;
    color: #2c3e50;
}


.item-card p {
    font-size: 1rem;
    margin: 5px 0;
    color: #7f8c8d;
    margin-top: auto;
}


.item-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #2980b9;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}


.item-card a:hover {
    background-color: #1a5276;
}


.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}


.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #2980b9;
}


.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #2980b9;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.sort-options {
    margin: 10px 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}


#sort-select {
    margin-left: 1rem;  
    padding-right: 1.5rem;
}


.sort-options select {
    padding: 5px 10px;
    font-size: 1rem;
    border: 2px solid #2980b9;
    border-radius: 5px;
    background-color: #fff;
    color: #2c3e50;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"%3E%3Cpolygon points="0,0 10,0 5,5" fill="%232c3e50"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}


.star {
    color: #d3d3d3;
    font-size: 20px;
    margin: 0 2px;
}

.star.filled {
    color: #f39c12;
}
