/* ===== GREENMALL STYLES ===== */
:root {
    --green: #1A8D3F;
    --green-dark: #0E662B;
    --green-darker: #0A4F21;
    --green-light: #E8F5EC;
    --green-pale: #F3F9F5;
    --white: #FFFFFF;
    --white-ribbon: #FCFCFC;
    --off-white: #FAFAFA;
    --text: #1A1A1A;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border: #E0E0E0;
    --border-light: #EEEEEE;
    --red: #E53E3E;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
    --radius: 8px;
    --radius-sm: 4px;
    --header-height: 72px;
    --cart-width: 420px;
    --transition: 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--green-pale);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: inherit;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white-ribbon);
    border-bottom: 1px solid var(--border-light);
    height: var(--header-height);
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.header-logo {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 10px;
    margin-right: auto;
}

.header-logo img {
    height: 48px;
    width: auto;
}

.header-logo span {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--green);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--green-light);
    color: var(--green);
}

.nav-cart-item {
    display: none;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.nav-links .nav-cart-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--green);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius);
    padding: 13px 16px;
}

.nav-links .nav-cart-item a:hover {
    background: var(--green-dark);
    color: #fff;
}

.nav-cart-count {
    background: #fff;
    color: var(--green);
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.cart-icon-btn {
    position: relative;
    background: none;
    padding: 8px;
    border-radius: 50%;
    transition: background var(--transition);
}

.cart-icon-btn:hover { background: var(--green-light); }

.cart-icon-btn svg {
    width: 28px;
    height: 28px;
    fill: var(--text-secondary);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.menu-toggle {
    display: none;
    background: var(--green-light);
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.menu-toggle svg {
    width: 26px;
    height: 26px;
    fill: var(--green);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 480px;
    overflow: hidden;
    background: var(--green-dark);
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .85;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 700px;
    padding: 0 24px;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 28px;
    opacity: .95;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    gap: 8px;
}

.btn-green {
    background: var(--green);
    color: white;
}

.btn-green:hover {
    background: var(--green-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,141,63,.35);
}

.btn-white {
    background: white;
    color: var(--green);
}

.btn-white:hover {
    background: var(--green-light);
    color: var(--green-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
}

.btn-outline:hover {
    background: var(--green);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 24px;
}

.section-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    text-align: center;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-white { background: var(--white); }
.section-light { background: var(--green-pale); }
.section-ribbon { background: var(--white-ribbon); }

/* ===== PRODUCT CONTROLS ===== */
.products-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: border-color var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--green);
}

.products-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-img-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--off-white);
    position: relative;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.04);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--green);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    flex: 1;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 12px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart,
.btn-order {
    flex: 1;
    border-radius: var(--radius-sm);
    padding: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.btn-add-cart {
    background: var(--green);
    color: white;
}

.btn-add-cart:hover {
    background: var(--green-dark);
}

.btn-order {
    background: var(--green-dark);
    color: white;
}

.btn-order:hover {
    background: var(--green-darker);
}

.btn-add-cart.added {
    background: var(--green-dark);
    pointer-events: none;
}

/* Load more */
.load-more-wrap {
    text-align: center;
    margin-top: 36px;
}

.load-more-wrap .btn {
    min-width: 200px;
}

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
}

.about-text h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.about-text h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--green);
    margin: 24px 0 8px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.mission-card,
.vision-card {
    background: var(--green-light);
    border-left: 4px solid var(--green);
    padding: 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.mission-card h3,
.vision-card h3 {
    margin-top: 0;
    color: var(--green-dark);
}

.mission-card p,
.vision-card p {
    margin-bottom: 0;
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 20px;
    box-shadow: var(--shadow);
}

.contact-card svg {
    width: 40px;
    height: 40px;
    fill: var(--green);
    margin-bottom: 12px;
}

.contact-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-card a {
    color: var(--green);
    font-weight: 500;
}

/* ===== CART DRAWER ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    transition: visibility .3s, opacity .3s;
}

.cart-overlay.open {
    visibility: visible;
    opacity: 1;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: var(--cart-width);
    height: 100vh;
    background: var(--white);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-lg);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--white-ribbon);
}

.cart-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-header h3 svg {
    width: 24px;
    height: 24px;
    fill: var(--green);
}

.cart-close {
    background: none;
    padding: 8px;
    border-radius: 50%;
}

.cart-close svg {
    width: 24px;
    height: 24px;
    fill: var(--text-muted);
}

.cart-close:hover { background: var(--green-light); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.cart-empty svg {
    width: 64px;
    height: 64px;
    fill: var(--border);
    margin-bottom: 16px;
}

.cart-empty p {
    font-size: 1rem;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
}

.cart-item-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--off-white);
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.cart-item-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-dark);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-qty button:hover {
    background: var(--green);
    color: white;
}

.cart-item-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-item-remove {
    background: none;
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.cart-item-remove:hover {
    color: var(--red);
    background: #FFF0F0;
}

.cart-item-remove svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.cart-footer {
    border-top: 2px solid var(--green-light);
    padding: 20px;
    background: var(--white-ribbon);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.cart-total .amount {
    color: var(--green-dark);
    font-size: 1.3rem;
}

.cart-footer .btn {
    width: 100%;
    font-size: 1rem;
}

.cart-footer-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.toast {
    background: var(--green-dark);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn .35s ease, toastOut .35s ease 2.5s forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(20px); }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--white-ribbon);
    border-top: 1px solid var(--border-light);
    padding: 48px 24px 24px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-logo img {
    height: 40px;
    width: auto;
}

.footer-logo span {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--green);
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--green);
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 22px;
    height: 22px;
    fill: white;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 960px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px 16px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-light);
        transform: translateY(-120%);
        transition: transform .3s ease;
        z-index: 99;
    }
    .nav-links.mobile-open {
        transform: translateY(0);
    }
    .nav-links a {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius);
    }
    .menu-toggle { display: block; }
    .nav-cart-item { display: block; }

    /* larger touch targets */
    .cart-item-qty button {
        width: 40px;
        height: 40px;
    }
    .cart-item-remove {
        padding: 10px;
    }
    .cart-item-remove svg {
        width: 22px;
        height: 22px;
    }
}

/* ===== RESPONSIVE ===== */
/* Tablet / small laptop */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Mobile & small tablet portrait */
@media (max-width: 768px) {
    .hero { height: 340px; }
    .hero-content { padding: 0 16px; }
    .hero-content h1 { font-size: 1.9rem; }
    .hero-content p { font-size: 0.95rem; }
    .section { padding: 44px 16px; }
    .section-title { font-size: 1.5rem; }
    .section-subtitle { font-size: 0.95rem; margin-bottom: 32px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-info { padding: 12px; }
    .product-name { font-size: 0.85rem; }
    .btn-add-cart, .btn-order { padding: 12px 10px; min-height: 44px; }
    .about-grid { grid-template-columns: 1fr; gap: 24px; }
    .mission-vision-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 16px; }
    .cart-drawer { max-width: 100%; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .footer { padding: 36px 20px 24px; }
    .products-controls { gap: 10px; margin-bottom: 24px; }
    .load-more-wrap .btn { width: 100%; max-width: 340px; }
}

/* Small phones */
@media (max-width: 560px) {
    :root { --header-height: 60px; }
    .header-inner { padding: 0 12px; }
    .header-logo img { height: 38px; }
    .header-logo span { font-size: 1.05rem; }
    .cart-icon-btn svg, .menu-toggle svg { width: 26px; height: 26px; }
    .hero { height: 300px; }
    .hero-content h1 { font-size: 1.6rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 280px; }
    .btn { padding: 12px 22px; }
}

/* Very small phones */
@media (max-width: 400px) {
    .product-grid { gap: 8px; }
    .product-name { font-size: 0.78rem; }
    .product-price { font-size: 0.95rem; }
    .hero-content h1 { font-size: 1.45rem; }
}

/* One column on tiny devices */
@media (max-width: 340px) {
    .product-grid { grid-template-columns: 1fr; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



