@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;800&display=swap');

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* prevent font size jumps on mobile */
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #ffffff;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    animation: fadeInUp 0.8s ease;
}

.section-subtitle {
    text-align: center;
    color: #7DA27E;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #7DA27E;
    border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 700;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Global responsive & mobile-friendly utilities */
img, video, iframe, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button, .cta-button, .details-btn, .add-to-cart-btn, .submit-btn, .login-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Inputs and form controls larger on touch devices */
input, textarea, select {
    font-size: 1rem;
    padding: 0.85rem;
}

/* Ensure container widths adapt */
.container, .hero-content, .shop-container, .product-detail-container, .cart-container, .delivery-container, .admin-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

/* Nav and header mobile adjustments - default mobile-first then scale up */
.navbar .nav-container {
    padding: 0.5rem 1rem;
    height: auto;
    align-items: center;
}

/* Make clickable areas larger */
.nav-links a, .nav-icon {
    padding: 0.5rem 0.6rem;
    display: inline-flex;
    align-items: center;
}

/* Utility to stack columns on small screens */
.stack-mobile {
    display: block;
}

/* Small screens: simplify layout and increase hit areas */
@media (max-width: 980px) {
    html { font-size: 15px; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 1rem; margin-bottom: 2rem; }

    /* Navbar: wrap links and center */
    .nav-container {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        align-items: stretch;
        height: auto;
    }
    .nav-links {
        display: flex;
        gap: 0.6rem;
        justify-content: center;
        flex-wrap: wrap;
        padding: 0.25rem 0;
    }
    .nav-icons {
        justify-content: center;
        gap: 0.6rem;
    }

    /* Hero scaling */
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    .hero-title { font-size: 2rem; }
    .hero-content { padding: 2rem 1rem; text-align: center; }

    /* Product grid adjustments */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    /* Shop filters collapse above product list */
    .shop-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    .filters {
        width: 100%;
        position: static;
        padding: 1rem;
    }

    /* Product detail: stack gallery and info vertically */
    .product-detail-content {
        flex-direction: column;
        gap: 1.25rem;
    }
    .product-detail-gallery, .product-detail-info {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .main-product-image { max-height: 420px; }

    /* Modals: full-screen on mobile */
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* Extra-small screens */
@media (max-width: 480px) {
    html { font-size: 14px; }
    body { font-size: 15px; }

    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.95rem; }

    .product-image { height: 180px; }
    .product-thumbnails img { width: 68px; height: 52px; }
    .thumbnail { width: 56px; height: 40px; }

    .cta-button, .submit-btn, .add-to-cart-large {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
    }

    /* Footer spacing */
    .footer-container { padding-left: 0.75rem; padding-right: 0.75rem; gap: 0.75rem; }

    /* Make forms full-width and easier to interact with */
    .form-row { flex-direction: column; gap: 0.5rem; }
    input, textarea, select { font-size: 1rem; padding: 0.8rem; }
}

/* Accessibility: focus outlines */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(125,162,126,0.18);
    outline-offset: 2px;
}

/* Ensure long text wraps inside cards */
.product-info h3, .admin-product-info h3, .product-detail-title {
    word-break: break-word;
    hyphens: auto;
}

