/* Products Page Styles */
.products-page {
    padding: 1px 2% 50px;
    min-height: 100vh;
}

/* Search and Filter Section */
.search-filter-section {
    margin-bottom: 2rem;
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.search-box button {
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #cc0000;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.filter-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-info button{
    padding: 0.5rem;
    
    
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.product-brand {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 1rem 0;
}

.product-button {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.product-button:hover {
    background-color: #333;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background-color: var(--light-gray);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-btn:hover {
    background-color: #ddd;
}

.pagination-btn:disabled {
    background-color: #eee;
    cursor: not-allowed;
}

#currentPage {
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-page {
        padding: 100px 3% 30px;
    }

    .search-filter-section {
        padding: 1rem;
    }

    .filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        min-width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.loading::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.product-details {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.product-details span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.product-details i {
    color: var(--secondary-color);
}



.product {
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    max-width: 400px;
    margin: auto;
}

.product-slider {
    position: relative;
    /* width: 100%; */
    max-width: 300px;
    margin: auto;
    overflow: hidden;
}

.product-slider-images {
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-slide {
    display: none;
    width: 100%;
    max-height: 300px;
    /* object-fit: cover; */
    border-radius: 10px;
    
}

.product-slide img{
    /* width: 100%!important; */
    /* height: 100%; */
    object-fit: cover!important;
}

.product-slide-active {
    display: block; 
    
}
.product-slide-delete {
    position: absolute;
    width: 100px;
    display: block;
    top:3px;
    right: 3px;
    z-index: 100;
}

.product-prev-btn, .product-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
    width: 40px;
}

.product-prev-btn {
    left: 10px;
}

.product-next-btn {
    right: 10px;
}

.product-prev-btn:hover, .product-next-btn:hover {
    background-color: black;
}
