/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f8f9fa;
    line-height: 1.6;
    min-height: 100vh; /* Ensures minimum full viewport height */
    overflow-x: hidden; /* Prevents horizontal scroll */
}

/* Header Styles */
header {
    background: #2c5530;
    color: white;
    text-align: center;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease; /* Smooth transition for header movement */
}

/* Navigation Styles */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-size: 1rem;
    display: inline-block; /* Ensures proper padding behavior */
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content Styles */
main {
    padding-top: 120px; /* Increased to account for fixed header */
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Creates new stacking context */
}

/* Section Styles */
section {
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem; /* Adds spacing between sections */
}

.section-title {
    color: #2c5530;
    font-size: clamp(1.5rem, 4vw, 2rem); /* Responsive font size */
    margin-bottom: 2rem;
}

/* Grid Layouts */
.product-grid,
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 0 auto;
    padding: 1rem; /* Adds padding around grid */
}

/* Card Styles */
.product-card,
.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover,
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Product Image Styles */
.product-image {
    width: 100%;
    height: 200px; /* Fixed height */
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

/* WhatsApp Button Styles */
.whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
    margin-top: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* About Section Styles */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #444;
    padding: 0 1rem;
}

/* Footer Styles */
footer {
    background: #2c5530;
    color: white;
    text-align: center;
    padding: 2rem;
    font-size: 1rem;
    margin-top: 3rem;
    width: 100%;
}

/* Popup Styles */
#discountPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffcc00;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: bold;
    z-index: 2000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
}

#closePopup {
    background: #d9534f;
    color: white;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

#closePopup:hover {
    background: #c9302c;
    transform: scale(1.05);
}

/* Media Queries */
@media (min-width: 769px) {
    header {
        top: 0;
    }
}

@media (max-width: 768px) {
    header {
        top: -90px; /* Hidden by default on mobile */
    }
    
    nav {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .product-grid,
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .product-card,
    .feature-card {
        padding: 1rem;
    }
    
    section {
        padding: 3rem 1rem;
    }
}

/* Print Styles */
@media print {
    header {
        position: static;
    }
    
    main {
        padding-top: 2rem;
    }
    
    .whatsapp-btn,
    #discountPopup {
        display: none;
    }
}