﻿/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    background: linear-gradient(90deg, #2ecc71, #27ae60); /* Greenish gradient */
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}


    .main-header .logo img {
        height: 130px; /* Controls the height */
        width: auto; /* Maintains aspect ratio */
        max-width: 100%; /* Ensures it doesn't overflow on smaller screens */
        object-fit: contain; /* Keeps image sharp and properly scaled */
        image-rendering: auto; /* Ensures clarity on modern browsers */
    }


/* Navbar */
.navbar ul {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

    .navbar ul li {
        position: relative;
    }

        .navbar ul li a {
            text-decoration: none;
            font-size: 16px;
            color: #fff;
            font-weight: 600;
            padding: 8px 12px;
            border-radius: 6px;
            transition: background 0.3s ease;
        }

            .navbar ul li a:hover {
                background: rgba(255,255,255,0.15);
            }

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    min-width: 180px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 2000;
    overflow: hidden;
}

    .dropdown-menu li a {
        display: block;
        padding: 10px;
        font-size: 15px;
        font-weight: 500;
        color: #fff !important;
    }

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* Product Colors */
.dropdown-menu .p1 {
    background: #28a745;
}
/* Fertilizers */
.dropdown-menu .p2 {
    background: #007bff;
}
/* Seeds */
.dropdown-menu .p3 {
    background: #ff4757;
}
/* Pesticides */
.dropdown-menu .p4 {
    background: #ffb703;
}
/* Bio Products */
.dropdown-menu .p5 {
    background: #6f42c1;
}
/* Machinery */

/* Keep same background color on hover */
.dropdown-menu li a:hover {
    background: inherit;
    color: #fff !important;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
    }

/* Mobile Responsive */
@media(max-width: 768px) {
    .navbar {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        width: 230px;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        border-radius: 8px;
        overflow: hidden;
    }

        .navbar.active {
            display: flex;
        }

        .navbar ul {
            flex-direction: column;
            gap: 0;
        }

            .navbar ul li a {
                color: #333;
                width: 100%;
            }

    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }
}
