/* style.css */

/* Root variables */
:root {
    --primary: #3a7d44;
    --secondary: #5b8c5a;
    --accent: #ff7b25;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --text: #495057;
    --text-light: #6c757d;
    --header-bg: #ffffff;
    --footer-bg: #2c3e50;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

/* Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

/* Header */
.header-main {
    background-color: var(--header-bg);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
}

.logo span {
    color: var(--accent);
}

.search-user-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 2;
    justify-content: flex-end;
}

.search-bar {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.search-bar input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding-right: 50px;
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-actions a {
    color: var(--dark);
    font-size: 1.2rem;
}

/* Navigation */
.main-nav {
    background-color: var(--primary);
    position: sticky;
    top: 80px;
    z-index: 999;
}

.main-nav .container {
    position: relative;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.main-nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Dropdown */
.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    background-color: var(--primary);
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.submenu a {
    padding: 0.8rem 1.5rem;
}

/* Responsive Menu */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 1rem;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .main-nav ul.show {
        display: flex;
    }

    .main-nav > ul > li {
        width: 100%;
    }

    .submenu {
        position: static;
        display: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: rgba(0,0,0,0.1);
    }

    .has-submenu:hover .submenu,
    .submenu.show {
        display: block;
    }
}

/* Hero */
.hero {
    position: relative;
    height: 45vh;
    min-height: 300px;
    overflow: hidden;
}

.hero video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* Products */
.products-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent);
    margin: 0.5rem auto 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-width: 1400px;
    margin: 0 auto;
    gap: 1.5rem;
    padding: 0 2rem;
	justify-content: center;
    justify-items: center;
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        max-width: calc(5 * 220px + 4 * 1.5rem + 4rem);
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        max-width: calc(4 * 220px + 3 * 1.5rem + 4rem);
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        max-width: calc(3 * 220px + 2 * 1.5rem + 4rem);
    }
}

@media (max-width: 767px) and (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        max-width: calc(2 * 220px + 1 * 1.5rem + 4rem);
    }
}

@media (max-width: 575px) {
    .product-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        max-width: calc(220px + 2rem);
    }
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.product-price .old-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.product-rating {
    color: #ffc107;
    margin-bottom: 1rem;
}

.btn-add-to-cart {
    display: block;
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-to-cart:hover {
    background: var(--secondary);
}

/* About */
.about-section {
    background: linear-gradient(to right, rgba(58,125,68,0.9), rgba(91,140,90,0.9)), url('pattern.png') center/cover;
    color: white;
    padding: 5rem 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    border-radius: 10px;
}

/* Footer */
.footer {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #1a252f, #2c3e50);
    color: #e0e0e0;
    padding: 4rem 2rem;
}

.footer h3 {
    font-weight: 600;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent);
}

.footer-bottom {
    background: #1a252f;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
}
