:root {
    --primary-color: #2c3e50;
    --secondary-color: #c0392b;
    --text-color: #333;
    --light-gray: #f5f6fa;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)),
                url('https://images.unsplash.com/photo-1621605815971-fbc98d665033?auto=format&fit=crop&q=80&w=2070');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    margin-top: 60px;
    color: white;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 1rem;
}

.search-container input {
    width: 70%;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

.search-container button {
    width: 30%;
    padding: 1rem;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.search-container button:hover {
    background-color: #a93122;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
}

.filters select {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: white;
    cursor: pointer;
}


/* Quotes Section */
#quote-of-the-day {
    margin-top: 1rem;
    text-align: center;
}




/* Listings Section */
.listings {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.listings h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

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

.listing-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.listing-content {
    padding: 1.5rem;
}

.listing-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.listing-info {
    color: #666;
    margin-bottom: 1rem;
}

.listing-rating {
    color: #f1c40f;
    margin-bottom: 1rem;
}

.listing-price {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Products Section */
.products {
    background-color: var(--light-gray);
    padding: 4rem 1rem;
}

.products h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* Grid Layout */
/* Ensure consistent grid layout for product cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem; /* Reduced from 2rem */
    padding: 0 1rem;
    margin: 0 auto;
    max-width: 1200px;
    justify-items: center;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 280px; /* Added max-width constraint */
}

.product-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0.5rem 0;
    min-height: 60px; /* Consistent description height */
}

.product-price {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

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

.product-image {
    width: 100%;
    height: 150px; /* Reduced height for better alignment */
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}



/* Buy Button */
/* Update .buy-now-button to match other button styles */
.buy-now-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
    text-align: center;
}

.buy-now-button:hover {
    background-color: #a93122;
}



/* Hair Loss Section */
.hair-loss {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.hair-loss h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.solution-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.learn-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.learn-more:hover {
    background-color: #a93122;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 1rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .search-container {
        flex-direction: column;
    }

    .search-container input,
    .search-container button {
        width: 100%;
        border-radius: var(--border-radius);
    }

    .filters {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}