/* ==========================================================================
   CSS Variables & Reset — Mộc Nhật Minh "Ươm Mầm" Theme
   ========================================================================== */
   @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

   :root {
    /* === Primary: Xanh Lá Mạ Non (Fresh Spring Green) === */
    --primary: #2e7d32;
    --primary-light: #4caf50;
    --primary-hover: #1b5e20;
    --primary-glow: rgba(46, 125, 50, 0.18);

    /* === Secondary: Nâu Gỗ (Warm Wood Brown) === */
    --wood: #795548;
    --wood-light: #a1887f;
    
    /* === Accent: Vàng Nắng (Warm Sunlight Gold) === */
    --gold: #f9a825;
    --gold-light: #ffd54f;

    /* === Neutral Palette === */
    --text-main: #1b2a1c;
    --text-muted: #6b7280;
    --bg-main: #fafdf9;
    --bg-light: #f1f8f1;
    --border-color: #d8ead8;

    --font-main: 'Plus Jakarta Sans', sans-serif;

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 3px 0 rgba(46, 125, 50, 0.06);
    --shadow-md: 0 4px 12px -1px rgba(46, 125, 50, 0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 28px -3px rgba(46, 125, 50, 0.12), 0 4px 8px -2px rgba(0,0,0,0.06);
    --shadow-hover: 0 22px 35px -10px rgba(46, 125, 50, 0.2);
}

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

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* === Scroll Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

/* ==========================================================================
   Header Modernization
   ========================================================================== */
.header {
    background-color: rgba(250, 253, 249, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(46, 125, 50, 0.06);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 50px;
    transition: var(--transition);
}

.logo a:hover img {
    opacity: 0.8;
}

.search-bar form {
    display: flex;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50px; /* Pill shape */
    overflow: hidden;
    width: 450px;
    transition: var(--transition);
}

.search-bar form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: #fff;
}

.search-bar input {
    flex-grow: 1;
    border: none;
    padding: 12px 20px;
    outline: none;
    font-size: 14px;
    background: transparent;
    font-family: var(--font-main);
}

.search-bar button {
    background: transparent;
    border: none;
    padding: 0 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 35px;
}

.contact-box, .cart-box, .language-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-box i {
    font-size: 22px;
    color: var(--primary);
}

.contact-text {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: var(--text-muted);
}

.contact-text strong {
    font-size: 16px;
    color: var(--text-main);
    font-weight: 700;
}

.cart-box {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.cart-box:hover {
    transform: translateY(-2px);
}

.cart-box i {
    font-size: 24px;
    color: var(--text-main);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--primary);
    color: #fff;
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    border: 2px solid #fff;
}

.language-box {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Nav Bar */
.nav-bar {
    border-top: 1px solid var(--border-color);
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-menu > li > a {
    display: block;
    padding: 18px 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--text-main);
    position: relative;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 2px;
    transition: var(--transition);
}

.nav-menu > li > a:hover, .nav-menu > li > a.active {
    color: var(--primary);
}

.nav-menu > li > a:hover::after, .nav-menu > li > a.active::after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 240px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition);
    z-index: 100;
    padding: 10px 0;
    border: 1px solid var(--border-color);
}

.dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 25px;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.dropdown-menu li a:hover {
    color: var(--primary);
    background-color: var(--bg-light);
    padding-left: 30px; /* Slight slide effect */
}

/* Multi-level dropdown */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > a::after {
    content: '\f054'; /* FontAwesome chevron-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text-muted);
}

.dropdown-submenu:hover > a::after {
    color: var(--primary);
}

.dropdown-submenu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dropdown-submenu:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==========================================================================
   Banner
   ========================================================================== */
.banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.banner-slider {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    width: 100%;
}

.slide {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    position: relative;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-img {
    display: block;
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center;
}

.slide-content-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding-bottom: 50px;
    z-index: 3;
    animation: slideUp 0.8s ease forwards;
}

.slide::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}



@media (max-width: 768px) {
    .slide-img {
        height: 300px;
    }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-content-bottom h1 {
    font-size: 42px;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    color: var(--text-main);
    box-shadow: var(--shadow-md);
}

.slider-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev { left: 30px; }
.slider-btn.next { right: 30px; }

/* ==========================================================================
   Features
   ========================================================================== */
.features {
    display: flex;
    justify-content: space-between;
    padding: 50px 20px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    flex: 1;
    cursor: pointer;
}

.feature-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 8px 20px var(--primary-glow);
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    transform: translateY(-5px) rotate(-5deg);
    box-shadow: 0 14px 28px rgba(46, 125, 50, 0.35);
    background: linear-gradient(135deg, var(--gold), var(--primary));
}

.feature-item span {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    text-transform: uppercase;
    transition: var(--transition);
}

.feature-item:hover span {
    color: var(--primary);
}

/* ==========================================================================
   Section Title
   ========================================================================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.section-title h2 {
    color: var(--text-main);
    font-size: 28px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.section-title::before, .section-title::after {
    content: '';
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 2px;
}

/* ==========================================================================
   Categories
   ========================================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.category-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Products
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-item {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.product-item:hover {
    box-shadow: var(--shadow-hover);
    border-color: transparent;
    transform: translateY(-5px);
}

.product-img {
    height: 220px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-img img {
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-item:hover .product-img img {
    transform: scale(1.1);
}

.product-title {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    height: 42px;
    overflow: hidden;
    line-height: 1.5;
    transition: var(--transition);
}

.product-item:hover .product-title {
    color: var(--primary);
}

.product-price {
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 13px;
}

.new-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 18px;
}

.contact-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 18px;
}

.btn-buy {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 30px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
    width: 100%;
}

.product-item:hover .btn-buy {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 6px 18px var(--primary-glow);
}

/* ==========================================================================
   News
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.news-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.news-img-wrap {
    overflow: hidden;
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-main);
    transition: var(--transition);
}

.news-card:hover .news-title {
    color: var(--primary);
}

.news-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.news-date i {
    color: var(--primary);
}

.news-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   Certificates
   ========================================================================== */
.certificate-slider {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.cert-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    padding: 15px;
    background: #fff;
    transition: var(--transition);
}

.cert-item:hover {
    box-shadow: 0 8px 20px var(--primary-glow);
    transform: translateY(-4px) scale(1.02);
    border-color: var(--primary-light);
}

.cert-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ==========================================================================
   Footer
   ========================================================================== */
/* Newsletter */
.newsletter-bar {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #1a3a1a 100%);
    padding: 22px 0;
    position: relative;
    overflow: hidden;
}

.newsletter-bar::before {
    content: '\1F331'; /* 🌱 seedling emoji as decorative element */
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.06;
    pointer-events: none;
}

.newsletter-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.newsletter-text {
    color: #fff;
}

.newsletter-text h3 {
    font-size: 18px;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 700;
}

.newsletter-text p {
    font-size: 13px;
    color: #9ca3af;
}

.newsletter-form {
    display: flex;
    width: 400px;
    background: #374151;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #4b5563;
}

.newsletter-form input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 10px 20px;
    color: #fff;
    outline: none;
    font-family: var(--font-main);
}

.newsletter-form button {
    background: linear-gradient(135deg, var(--gold), #e65100);
    border: none;
    color: #fff;
    padding: 0 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
}

.newsletter-form button:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: 0 4px 12px rgba(249, 168, 37, 0.4);
}

/* Main Footer */
.footer-main {
    background: linear-gradient(180deg, #0d1f0d 0%, #111827 100%);
    padding: 40px 0;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
}

.footer-logo {
    margin-bottom: 20px;
    max-height: 60px;
    width: auto;
    object-fit: contain;
    background: #fff; /* Ensures visibility if the image has transparent areas but mostly helps the JPG blend */
    padding: 5px;
    border-radius: 4px;
}

.footer-col p {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 15px;
    line-height: 1.8;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul a {
    font-size: 14px;
    color: #9ca3af;
    display: inline-block;
}

.footer-col ul a:hover {
    color: #fff;
    transform: translateX(5px);
}

.fb-widget {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
}

.fb-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fb-header strong {
    font-size: 15px;
}

/* Footer Bottom */
.footer-bottom {
    background-color: #030712;
    padding: 20px 0;
    color: #6b7280;
}

.bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    border-radius: 50%;
    font-size: 15px;
    transition: var(--transition);
}

.social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

.copyright {
    font-size: 13px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .category-grid, .product-grid, .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features {
        flex-wrap: wrap;
    }
    .feature-item {
        width: 33.33%;
        margin-bottom: 30px;
    }
    .certificate-slider {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 20px;
    }
    .search-bar form {
        width: 100%;
    }
    .header-right {
        width: 100%;
        justify-content: center;
    }
    .nav-menu {
        flex-wrap: wrap;
        gap: 15px;
        padding: 10px 0;
    }
    .newsletter-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .newsletter-form {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .category-grid, .product-grid, .news-grid {
        grid-template-columns: 1fr;
    }
    .feature-item {
        width: 50%;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .certificate-slider {
        grid-template-columns: repeat(2, 1fr);
    }
    .bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Floating Contact Bar */
.floating-contact-bar {
    position: fixed;
    bottom: 40px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.floating-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.floating-btn:hover {
    transform: scale(1.12) translateY(-4px);
    box-shadow: 0 10px 28px rgba(46, 125, 50, 0.4);
}

.floating-btn.hotline-btn {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.45);
    animation: quick-shake 2.5s infinite;
}

.floating-btn.zalo-btn {
    background-color: #0068ff;
    font-family: Arial, sans-serif;
    font-weight: 900;
    font-size: 14px;
    text-transform: uppercase;
}

@keyframes quick-shake {
    0%, 100% { transform: scale(1) rotate(0deg); }
    10% { transform: scale(1.1) rotate(-10deg); }
    20% { transform: scale(1.1) rotate(10deg); }
    30% { transform: scale(1.1) rotate(-10deg); }
    40% { transform: scale(1.1) rotate(10deg); }
    50% { transform: scale(1) rotate(0deg); }
}
