:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

/* Header & Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-login,
.btn-register {
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-login {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-register {
    background-color: var(--primary-color);
    color: white;
}

.btn-login:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-register:hover {
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 5%;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-bar {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 0;
}

.search-bar input {
    width: 100%;

    flex: 1;
    padding: 1rem;
    /* border: none; */
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-bar button {
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #5a08a3;
}

/* Filters Section */
.filters-section {
    padding: 3rem 1%;
    background-color: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    width: 20%;
    min-width: 270px;
    left: 0;
}

.filters-section h2 {
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--gray-color);
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-size: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: #d1d9e0;
}

/* Products Section */
.products-section {
    width: 100%;
    padding: 3rem 5%;
}

.products-section h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 360px;
}

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

.product-image {
    height: 200px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    /* width: 100%; */
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    display: inline-block;
    background-color: var(--light-gray);
    color: var(--gray-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-description {
    color: var(--gray-color);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.product-store {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-color);
    font-size: 0.875rem;
}

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

.btn-view-store {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.btn-view-store:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Stores Section */
.stores-section {
    margin-top: 50px;
    
    /* background-color: var(--light-gray); */
}

.stores-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.store-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.store-card:hover {
    transform: translateY(-5px);
}

.store-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.store-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.store-description {
    color: var(--gray-color);
    margin-bottom: 1rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray-color);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.cart-btn {
    position: relative;
    color: var(--gray-dark);
    text-decoration: none;
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f72585;
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
    .filters-section {
        display: none;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}