/* =============================================
   MOBILE RESPONSIVE FIX
   Hamburger Menu & Layout Fixes
   ============================================= */

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1100;
    padding: 0;
    background: transparent;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary, #1e6b1e);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Slide Menu */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 1060;
    padding: 80px 24px 24px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    visibility: hidden;
}

.mobile-nav-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-nav-menu .mobile-nav-item {
    display: block;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 500;
    color: #212529;
    border-bottom: 1px solid #e9ecef;
    transition: color 0.2s ease;
}

.mobile-nav-menu .mobile-nav-item:hover,
.mobile-nav-menu .mobile-nav-item.active {
    color: #1e6b1e;
}

.mobile-nav-menu .mobile-nav-item:last-child {
    border-bottom: none;
}

/* Mobile Close Button */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: #f8f9fa;
    color: #212529;
}

/* =============================================
   MOBILE BREAKPOINT (768px and below)
   ============================================= */
@media (max-width: 768px) {
    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }

    /* Hide desktop nav menu */
    .nav-menu {
        display: none !important;
    }

    /* Navbar adjustments */
    .nav-container {
        padding: 0 16px;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .nav-actions {
        gap: 8px;
    }

    .lang-button {
        padding: 6px 10px;
        font-size: 12px;
    }

    .lang-text {
        display: none;
    }

    .cart-button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* About Section - Stack on mobile */
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .about-text {
        text-align: center;
    }

    .about-text .btn {
        margin: 1.5rem auto 0 !important;
        display: inline-block;
    }

    /* Features Grid */
    .features-grid {
        gap: 1rem !important;
    }

    .feature-item {
        padding: 1rem !important;
    }

    .feature-icon {
        font-size: 2rem !important;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Section padding */
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Container padding */
    .container {
        padding: 0 16px;
    }

    /* Plants Grid - 2 columns on mobile */
    .plants-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Categories Grid */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    .footer-section {
        align-items: center;
    }
}

/* =============================================
   SMALL MOBILE (480px and below)
   ============================================= */
@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.1rem;
    }

    /* Single column for very small screens */
    .plants-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .feature-item {
        flex-direction: column !important;
        text-align: center;
        gap: 0.75rem !important;
    }

    .contact-card {
        padding: 1.5rem !important;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Prevent horizontal scroll from off-screen menu */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
