:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
}

.main-content {
    padding: 20px;
    margin-left: 90px;
    min-height: 100vh;
}


/* Hero Section */
.products-hero {
    background-color: #110c6e;
    color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 50px;
    background: var(--accent-color);
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Category Section */
.category-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.category-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.category-pill {
    padding: 10px 20px;
    border-radius: 50px;
    background: white;
    border: 1px solid #ddd;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.category-pill:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.category-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Products Grid */
.products-section {
    margin-top: 30px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.quick-view {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 8px;
    transition: var(--transition);
    opacity: 0;
}

.product-card:hover .quick-view {
    bottom: 0;
    opacity: 1;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1rem;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-category {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.add-to-cart, .add-to-wishlist {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark-color);
}

.add-to-cart:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.add-to-wishlist:hover {
    color: var(--warning-color);
    border-color: var(--warning-color);
}

/* No Products Found */
.no-products {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 20px;
}

.no-products i {
    color: #6c757d;
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.no-products p {
    color: #6c757d;
    margin-bottom: 20px;
}

.reset-filters {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.reset-filters:hover {
    background: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .products-hero {
        padding: 30px 15px;
    }
    
    .category-container {
        justify-content: center;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Out of Stock Styles */
.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(128, 128, 128, 0.7);
    color: white;
    font-weight: bold;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    z-index: 2;
}

.out-of-stock-image {
    filter: grayscale(30%);
}

.product-actions button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-actions button[disabled]:hover {
    background: white;
    color: var(--dark-color);
    border-color: #ddd;
}

.product-price-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-price.discounted-price  {
    text-decoration: line-through;
    color: #888;
    font-size: 20px;
    margin: 0;
}

.product-price.original-price {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

.discount-badge {
    background-color: #e74c3c;
    color: white;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}