/* --- Global Reset & Variables --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #F58220;
    --primary-green: #2E8B57;
    --dark-green: #1E5631;
    --light-bg: #F8F9FA;
    --hero-bg: #EAF4E4;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4rem;
    background-color: var(--white);
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.brand-orange { color: var(--primary-orange); }
.brand-dark { color: var(--dark-green); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-green);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-bar {
    padding: 0.6rem 1rem;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    background-color: #F5F5F5;
    font-family: var(--font-family);
    font-size: 0.8rem;
    width: 200px;
    outline: none;
}

.cart-btn, .account-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    border: none;
    font-family: var(--font-family);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-btn {
    background-color: transparent;
    border: 1px solid #E0E0E0;
    color: var(--text-dark);
}

.account-btn {
    background-color: var(--dark-green);
    color: var(--white);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--hero-bg);
    margin: 1rem 4rem;
    padding: 3rem;
    border-radius: 20px;
}

.hero-content {
    max-width: 50%;
}

.tagline {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-green);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: var(--dark-green);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    max-width: 80%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background-color: var(--dark-green);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
}

.hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 45%;
}

.hero-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.hero-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.hero-card:hover .hero-card-img {
    transform: scale(1.06);
}

.hero-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    text-align: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.05rem;
}

.hero-card-overlay h3 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    line-height: 1.25;
}

.card-yellow { 
    height: 135px; 
}
.card-yellow .hero-card-overlay {
    background: linear-gradient(180deg, rgba(245, 176, 65, 0.4) 0%, rgba(214, 107, 10, 0.75) 100%);
}

.card-green { 
    height: 135px; 
}
.card-green .hero-card-overlay {
    background: linear-gradient(180deg, rgba(46, 139, 87, 0.45) 0%, rgba(20, 80, 48, 0.8) 100%);
}

.card-orange { 
    grid-column: span 2; 
    height: 125px;
}
.card-orange .hero-card-overlay {
    background: linear-gradient(180deg, rgba(230, 126, 34, 0.4) 0%, rgba(160, 50, 5, 0.8) 100%);
    font-size: 1.15rem;
}

/* --- Products Section --- */
.products-section {
    padding: 3rem 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.view-all {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 220px));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.product-img {
    height: 180px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.product-img h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #4A7C59;
    text-transform: uppercase;
    margin: 0;
}

.product-info {
    padding: 1rem;
}

.product-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.product-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    font-size: 1.1rem;
}

.add-btn {
    background-color: var(--dark-green);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.1s;
}

.add-btn:active {
    transform: scale(0.95);
}

/* --- Features Banner --- */
.features-banner {
    background-color: #EAF4E4;
    margin: 0 4rem 3rem 4rem;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-num {
    font-weight: 700;
    color: var(--primary-orange);
    font-size: 1.2rem;
}

.feature-item h4 {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.feature-item p {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* --- Combos Section --- */
.combos-section {
    padding: 0 4rem 4rem 4rem;
}

.combo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.combo-card {
    padding: 2rem;
    border-radius: 15px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.orange-bg { background-color: #E67E22; }
.green-bg { background-color: #2E8B57; }

.combo-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.combo-info p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.combo-price {
    align-self: flex-end;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .navbar, .hero, .products-section, .features-banner, .combos-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content { max-width: 100%; }
    .hero-content p { max-width: 100%; margin: 0 auto 2rem auto; }
    .hero-buttons { justify-content: center; }
    .hero-visual { width: 100%; margin-top: 2rem; }
    
    .features-banner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .nav-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .search-bar {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .combo-grid {
        grid-template-columns: 1fr;
    }
    
    .features-banner {
        grid-template-columns: 1fr;
        margin: 0 1rem 3rem 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .navbar, .hero, .products-section, .features-banner, .combos-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .auth-modal, .addr-modal {
        padding: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .view-all {
        align-self: flex-start;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.8rem;
    }
}

/* ============================================================
   AUTH MODAL
   ============================================================ */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
    z-index: 1100;
}
.auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 2.2rem 2.2rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.auth-overlay.active .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: #F2F2F2;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.auth-close:hover {
    background: #FDECEA;
    color: #B71C1C;
}

.auth-brand {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-bottom: 1.4rem;
}

.auth-tabs {
    display: flex;
    background: #F2F2F2;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.4rem;
}
.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 0;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    border-radius: 9px;
    transition: background 0.2s, color 0.2s;
}
.auth-tab.active {
    background: #fff;
    color: #1E5631;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.auth-message {
    display: none;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.auth-message.error {
    display: block;
    background: #FDECEA;
    color: #B71C1C;
}
.auth-message.success {
    display: block;
    background: #E6F4EA;
    color: #1E5631;
}

.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}
.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: #444;
}
.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: #FAFAFA;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-form input:focus {
    border-color: #2E8B57;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.auth-submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: #1E5631;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0.4rem;
    transition: background 0.2s;
}
.auth-submit-btn:hover {
    background: #2E8B57;
}
.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 1rem;
}
.auth-switch a {
    color: #F58220;
    font-weight: 500;
    text-decoration: none;
}
.auth-switch a:hover {
    text-decoration: underline;
}

/* Logged-in user dropdown */
.user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #EAF4E4;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1E5631;
    position: relative;
    cursor: pointer;
}
.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1E5631;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    min-width: 180px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 0.5rem;
    display: none;
    z-index: 100;
}
.user-menu.open { display: block; }
.user-menu button {
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: transparent;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 0.85rem;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
}
.user-menu button:hover {
    background: #F5F5F5;
    color: #B71C1C;
}
.user-menu .menu-email {
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
    color: #888;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.3rem;
}

/* ============================================================
   ADDRESS MODAL
   ============================================================ */
.addr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
    z-index: 1150;
}
.addr-overlay.active { opacity: 1; visibility: visible; }

.addr-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 2rem 2.2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.addr-overlay.active .addr-modal { transform: translateY(0) scale(1); }

.addr-message {
    display: none;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.addr-message.error   { display:block; background:#FDECEA; color:#B71C1C; }
.addr-message.success { display:block; background:#E6F4EA; color:#1E5631; }

.addr-types {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.addr-types label {
    flex: 1;
    padding: 0.55rem;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    text-align: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.addr-types input { display: none; }
.addr-types label:has(input:checked) {
    border-color: #1E5631;
    background: #EAF4E4;
    font-weight: 500;
    color: #1E5631;
}

.addr-modal .form-group { margin-bottom: 1rem; }
.addr-modal label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.35rem; color: #444; }
.addr-modal input[type="text"] {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #FAFAFA;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.addr-modal input[type="text"]:focus {
    border-color: #2E8B57;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46,139,87,0.1);
}
.addr-modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.locate-btn {
    width: 100%;
    padding: 0.7rem;
    background: #EAF4E4;
    border: 1px dashed #1E5631;
    color: #1E5631;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.locate-btn:hover { background: #D6EBC9; }
.locate-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.loc-status {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #F5F5F5;
    border-radius: 8px;
    text-align: center;
}
.loc-status.ok { background: #E6F4EA; color: #1E5631; }
.loc-status.err{ background: #FDECEA; color: #B71C1C; }

.addr-map {
    margin-top: 0.75rem;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E0E0E0;
}