.products-container {
    min-height: 100vh;
    height: auto;
    margin: 0 auto;
    padding: 2.5rem 1rem;
    color: #333;
    background: linear-gradient(135deg, #fff 50%, rgba(199, 21, 133, 0.45));
    /* background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%); */
    background-attachment: fixed;
}

.collection-title {
    font-size: 2.3rem;
    text-align: center;
    margin: 1rem 0;
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.collection-description {
    font-size: 1.15rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #7f8c8d;
    padding: 0 0.75rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Search Bar */
.search-bar {
    display: flex;
    margin: 0 auto 2rem;
    max-width: 600px;
    padding: 0 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 0.4px solid #fff;
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
    font-size: 1rem;
    outline: none !important;
    transition: border-color 0.3s;

}

.search-input:focus {
    border-color: var(--barbie-pink);
}

.search-button {
    padding: 0 1.5rem;
    background-color: var(--barbie-pink);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: var(--fandango-pink);
}

/* Filters Container */
.filters-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0.25rem;
    justify-content: center;
}

.filters .filter-icon {
    height: 20px;
    width: 20px;
    display: inline-block;
    margin-right: 1rem;
}

.filters .filter-btns {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    padding: 0.25rem 1rem;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.filter-button {
    background-color: #efefef;
    border: 2px solid #ddd;
    color: #000;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-button.active,
.filter-button:hover {
    background-color: #ddd;
}

/* Sort Container */
.sort-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sort-label {
    font-size: 0.9rem;
    color: #555;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: var(--barbie-pink);
}

/* Loading and Error States */
.loading-container,
.error-message,
.no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.spinner {
    animation: spin 1s linear infinite;
    font-size: 2rem;
    color: var(--barbie-pink);
    margin-bottom: 1rem;
}

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

.error-message {
    color: #dc3545;
}

.retry-button {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.retry-button:hover {
    background-color: #c82333;
}

.no-products {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Product Category */
.product-category {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0.25rem 0 0.75rem;
    text-transform: capitalize;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .filters-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 2rem;
    }
    
    .filters {
        margin-bottom: 0;
    }
    
    .sort-container {
        margin-top: 0;
    }
    
    .products-container {
        padding: 2rem 2rem;
    }

    .collection-title {
        font-size: 2.6rem;
    }
}

@media (min-width: 800px) {
    .products-container {
        padding: 2rem 1rem;
    }

    .collection-title {
        font-size: 2.8rem;
    }

    .collection-description {
        padding: 0 8rem;
    }
}

@media (min-width: 1200px) {
    .products-container {
        padding: 2rem 7rem;
    }

    .collection-title {
        font-size: 3rem;
    }

    .collection-description {
        padding: 0 12rem;
    }
}






/* Product Styles */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.product-card {
    position: relative;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
    max-width: 100%;
    animation: float 6s ease-in-out infinite;
    animation-play-state: paused;
}

.btn-wishlist-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.btn-wishlist-icon i {
    color: var(--barbie-pink);
    font-size: 1.1rem;
}

.btn-wishlist-icon:hover {
    background: rgba(255, 105, 180, 0.35);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(31, 38, 135, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-wishlist-icon:hover i {
    color: white;
}

.btn-wishlist-icon i.bi-heart-fill {
    color: var(--barbie-pink);
    text-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(31, 38, 135, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation-play-state: running;
}

.product-card .image-wrapper {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.product-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

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

.product-card .product-info {
    margin: 0;
    background: rgba(255, 255, 255, 0.35);
    padding: 0.75rem;
    font-family: 'Playfair Display', serif;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.product-info .product-name {
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 0 0.35rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.product-card:hover .product-name {
    color: var(--fandango-pink);
}

.product-rating {
    margin: 0.35rem 0;
    font-size: 0.75rem;
    color: #ffc107;
}

.product-price-and-add-to-cart {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0 0 0;
    gap: 0.5rem;
}

.product-price {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--fandango-pink);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.add-to-cart {
    background-color: var(--barbie-pink);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.15);
}

.add-to-cart:hover {
    background: rgba(199, 21, 133, 0.95);
    box-shadow: 0 6px 20px rgba(31, 38, 135, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateY(-2px);
}

@media (min-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 850px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1020px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 2rem;
    }
}