
:root {
    --primary-color: #E2725B; /* Terracotta */
    --secondary-color: #8A9A5B; /* Sage Green */
    --background-color: #F8F4E9; /* Light Cream */
    --text-color: #333333;
    --light-text-color: #FFFFFF;
    --card-bg-color: #FFFFFF;
    --footer-bg-color: #2c2c2c;
    --font-family: 'Poppins', sans-serif;
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-right: env(safe-area-inset-right);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    scroll-behavior: smooth;
}


body {
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

section {
    padding: 6rem 8%;
}

h1, h2, h3 {
    font-weight: 600;
}

h1 { font-size: 3.2rem; line-height: 1.2; }
h2 { font-size: 2.4rem; margin-bottom: 2rem; text-align: center; }
p { font-size: 1rem; line-height: 1.6; }

/* --- Tombol --- */
.btn-primary, .btn-secondary, .btn-tertiary {
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
}
.btn-primary { background-color: var(--primary-color); color: var(--light-text-color); }
.btn-primary:hover { background-color: #c9614b; color: var(--light-text-color); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: var(--light-text-color); }
.btn-tertiary { color: var(--primary-color); font-weight: 600; padding: 0; border-radius: 0; }
.btn-tertiary i { vertical-align: middle; transition: transform 0.3s ease; }
.btn-tertiary:hover i { transform: translateX(5px); }


.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: rgba(248, 244, 233, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  
    padding-top: calc(1.5rem + var(--safe-area-inset-top));
    padding-left: calc(8% + var(--safe-area-inset-left));
    padding-right: calc(8% + var(--safe-area-inset-right));
}
.header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding-top: 1rem;
    padding-bottom: 1rem;

    padding-top: calc(1rem + var(--safe-area-inset-top));
}
.logo { font-size: 1.8rem; font-weight: 700; text-decoration: none; color: var(--text-color); }
.navbar a:not(.btn-primary):not(.btn-secondary) { text-decoration: none; color: var(--text-color); font-weight: 500; margin-left: 2.5rem; transition: color 0.3s ease; background: transparent; padding: 0; }
.navbar a:not(.btn-primary):not(.btn-secondary):hover, .navbar a:not(.btn-primary):not(.btn-secondary).active { color: var(--primary-color); }
.navbar .nav-auth-buttons { display: none; }
#menu-icon { font-size: 2.5rem; cursor: pointer; display: none; z-index: 1001; }


.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('image/foto2.jpg') no-repeat center center/cover;
    position: relative;
   
    padding-left: calc(8% + var(--safe-area-inset-left));
    padding-right: calc(8% + var(--safe-area-inset-right));
    padding-bottom: var(--safe-area-inset-bottom);
}
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.hero-content { position: relative; z-index: 1; color: var(--light-text-color); max-width: 600px; }
.hero-content h1 { font-size: 3.8rem; }
.hero-content p { font-size: 1.2rem; margin: 1rem 0 2rem; }
.hero-cta a { margin-right: 1rem; }


.collections-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.collection-card { position: relative; border-radius: 15px; overflow: hidden; height: 400px; cursor: pointer; }
.collection-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.collection-card:hover img { transform: scale(1.1); }
.card-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 3rem 1.5rem 1.5rem; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: var(--light-text-color); }
.card-overlay h3 { font-size: 1.8rem; }

.how-it-works { background-color: #e9e2d3; }
.steps-container { display: flex; justify-content: space-between; gap: 2rem; text-align: center; }
.step { flex: 1; }
.step-icon { font-size: 3rem; color: var(--secondary-color); margin-bottom: 1rem; }
.step h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }

.partner-showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; }
.partner-card { background-color: var(--card-bg-color); border-radius: 15px; padding: 2rem; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.partner-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 4px solid var(--secondary-color); }
.partner-card h3 { font-size: 1.5rem; }
.partner-card p { margin: 1rem 0 1.5rem; font-style: italic; color: #666; }

.b2b-cta { background-color: var(--secondary-color); color: var(--light-text-color); display: flex; align-items: center; gap: 3rem; border-radius: 20px; }
.b2b-content { flex: 1; }
.b2b-content h2 { text-align: left; margin-bottom: 1rem; }
.b2b-content .btn-primary { background-color: var(--light-text-color); color: var(--secondary-color); margin-top: 1rem; }
.b2b-image { flex: 1; max-width: 450px; }
.b2b-image img { width: 100%; border-radius: 15px; object-fit: cover; }

/* --- Footer --- */
.footer {
    background-color: var(--footer-bg-color);
    color: #ccc;
    padding: 4rem 8% 1rem;
  
    padding-left: calc(8% + var(--safe-area-inset-left));
    padding-right: calc(8% + var(--safe-area-inset-right));
    padding-bottom: calc(1rem + var(--safe-area-inset-bottom));
}
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-about h3 { color: var(--light-text-color); }
.footer-links h4, .footer-social h4 { color: var(--light-text-color); margin-bottom: 1rem;}
.footer-links ul { list-style: none; }
.footer-links ul li a { text-decoration: none; color: #ccc; display: block; margin-bottom: 0.5rem; transition: color 0.3s ease; }
.footer-links ul li a:hover { color: var(--primary-color); }
.footer-social a { color: #ccc; font-size: 1.8rem; margin-right: 1rem; transition: color 0.3s ease; }
.footer-social a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; border-top: 1px solid #444; padding-top: 1rem; font-size: 0.9rem; }


.splash-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--background-color); display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.8s ease-out, visibility 0.8s ease-out; }
.splash-loader.hidden { opacity: 0; visibility: hidden; }
.splash-loader img { max-width: 200px; width: 50%; height: auto; animation: fadeInScaleUp 1.5s ease-out forwards; }
@keyframes fadeInScaleUp { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; padding: 1rem; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content { background-color: var(--card-bg-color); padding: 3rem; border-radius: 20px; text-align: center; max-width: 500px; width: 100%; position: relative; transform: scale(0.9); transition: transform 0.3s ease; }
.modal-overlay.show .modal-content { transform: scale(1); }
.close-modal { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; cursor: pointer; color: #aaa; }
.modal-icon { font-size: 4rem; color: #FF9800; margin-bottom: 1rem; }
.modal-content h2 { color: var(--secondary-color); }
.streak-info { margin: 1.5rem 0; background-color: #f4f4f4; padding: 1rem; border-radius: 10px; }
.streak-counter { display: flex; justify-content: center; gap: 0.5rem; font-size: 2.5rem; margin: 0.5rem 0; }
.streak-counter i { color: #ddd; }
.streak-counter i.active { color: #FF9800; animation: pop-in 0.5s ease; }
@keyframes pop-in { 0% { transform: scale(0.5); opacity: 0; } 80% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
.streak-info h3 { font-size: 1.6rem; color: var(--text-color); }
.streak-motivation { font-weight: 500; color: var(--primary-color); }


.auth-container { display: flex; min-height: 100vh; width: 100%; overflow: hidden; }
.auth-visual { flex: 1; background: url('image/grid2.jpeg') no-repeat center center/cover; position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 4rem; color: var(--light-text-color); /* PERBAIKAN iPHONE: Padding safe area */ padding-left: calc(4rem + var(--safe-area-inset-left)); padding-top: calc(4rem + var(--safe-area-inset-top)); padding-bottom: calc(4rem + var(--safe-area-inset-bottom)); }
.auth-visual::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3)); z-index: 1; }
.auth-visual .logo { font-size: 2rem; font-weight: 700; text-decoration: none; color: var(--light-text-color); position: relative; z-index: 2; }
.visual-text { position: relative; z-index: 2; }
.visual-text h1 { font-size: 2.8rem; line-height: 1.3; margin-bottom: 1rem; }
.visual-text p { font-size: 1.1rem; max-width: 400px; }
.auth-form-container { flex: 1; display: flex; justify-content: center; align-items: center; padding: 2rem; background-color: var(--card-bg-color); position: relative; /* PERBAIKAN iPHONE: Padding safe area */ padding-left: calc(2rem + var(--safe-area-inset-left)); padding-right: calc(2rem + var(--safe-area-inset-right)); padding-top: calc(2rem + var(--safe-area-inset-top)); padding-bottom: calc(2rem + var(--safe-area-inset-bottom)); }
.auth-form { max-width: 400px; width: 100%; }
.auth-form h2 { font-size: 2.2rem; margin-bottom: 1rem; }
.auth-form .form-subtitle { font-size: 1rem; color: #666; margin-bottom: 2.5rem; }
.form-subtitle a { color: var(--primary-color); text-decoration: none; font-weight: 600; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.5rem; }
.form-group input { width: 100%; padding: 1rem; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; }
.btn-full { width: 100%; padding: 1rem; font-size: 1.1rem; border-radius: 8px; border: none; cursor: pointer; }
.divider { display: flex; align-items: center; text-align: center; color: #aaa; margin: 2rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #ddd; }
.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: 0.8rem; background-color: #f5f5f5; color: var(--text-color); border: 1px solid #ddd; }
.btn-social:hover { background-color: #eee; }
.btn-social i { font-size: 1.5rem; }
a.back-to-home { position: absolute; top: 2.5rem; left: 2.5rem; text-decoration: none; color: var(--text-color); font-weight: 500; display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.3s ease; z-index: 10; /* PERBAIKAN iPHONE: Posisi dari safe area */ top: calc(2.5rem + var(--safe-area-inset-top)); left: calc(2.5rem + var(--safe-area-inset-left)); }
a.back-to-home:hover { color: var(--primary-color); }
a.back-to-home i { font-size: 1.2rem; }


.page-main { padding-top: 80px; padding-bottom: 80px; }
.is-hidden { display: none !important; }


.store-directory { padding: 4rem 8%; }
.directory-header { text-align: center; margin-bottom: 3rem; }
.directory-header h1 { font-size: 2.8rem; }
.directory-header p { font-size: 1.1rem; color: #666; margin-top: 0.5rem; }
.search-filter-bar { margin-top: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.search-box { position: relative; width: 100%; max-width: 600px; }
.search-box i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: #999; }
.search-box input { width: 100%; padding: 1rem 1rem 1rem 3.5rem; border-radius: 50px; border: 1px solid #ddd; font-size: 1rem; }
.filter-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.filter-btn { padding: 0.6rem 1.5rem; border-radius: 50px; border: 1px solid #ddd; background: transparent; cursor: pointer; font-weight: 500; transition: all 0.3s ease; }
.filter-btn.active, .filter-btn:hover { background-color: var(--secondary-color); color: var(--light-text-color); border-color: var(--secondary-color); }

.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; justify-content: center; }
.store-card-link { text-decoration: none; color: var(--text-color); display: block; opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; max-width: 360px; margin: 0 auto; }
.store-card-link.is-visible { opacity: 1; transform: translateY(0); }
.store-grid.grid-single .store-card-link { max-width: 600px; }
.store-grid.grid-double { grid-template-columns: repeat(2, minmax(300px, 360px)); }
.store-card { background: var(--card-bg-color); border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; }
.store-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.store-card-image img { width: 100%; height: 180px; object-fit: cover; }
.store-card-content { padding: 1.5rem; }
.store-card-content h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.store-tags { font-size: 0.9rem; color: #777; margin-bottom: 1rem; }
.store-info { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; font-weight: 500; }
.store-info .rating i { color: #FFC107; }


.store-hero { position: relative; text-align: center; padding-bottom: 4rem; background: #ffffff; }
.store-hero-banner { width: 100%; height: auto; max-height: 400px; object-fit: cover; }
.store-hero-content { background: var(--card-bg-color); padding: 1rem; position: relative; margin: -100px auto 0; max-width: 90%; width: 800px; border-radius: 15px; box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.store-logo { width: 150px; height: 150px; border-radius: 50%; border: 5px solid var(--card-bg-color); object-fit: cover; margin-top: -95px; margin-bottom: 1rem; box-shadow: 0 0 10px rgba(0,0,0,0.1); }
.store-hero-content h2 { margin-bottom: 0.5rem; }
.store-hero-content p { color: #666; }
.store-info-detail { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 1rem; font-weight: 500; }
.store-info-detail span, .store-info-detail a { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; }
.store-info-detail .rating i { color: #FFC107; }
.store-info-detail .status.open { color: var(--secondary-color); }

.menu-list { padding: 4rem 8%; }
.menu-list h3 { font-size: 1.8rem; margin-bottom: 2rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; display: inline-block; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; align-items: start; }
.menu-item-card { display: flex; gap: 1.5rem; background: var(--card-bg-color); border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; border: 3px solid transparent; transition: border-color 0.4s ease; align-items: stretch; }
.menu-item-card.recommended { border-color: var(--secondary-color); box-shadow: 0 8px 30px rgba(138,154,91,0.2); }
.menu-item-card img { width: 200px; height: 200px; object-fit: cover; flex-shrink: 0; }
.menu-item-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.menu-item-content h4 { font-size: 1.3rem; }
.menu-item-desc { font-size: 0.9rem; color: #666; margin: 0.2rem 0 1rem; }
.nutrition-header { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.nutrition-header::after { content: '\\ea4a'; font-family: 'Boxicons'; font-size: 1.2rem; transition: transform 0.4s ease; }
.nutrition-header.expanded::after { transform: rotate(180deg); }
.nutrition-details { background-color: #fafafa; border-radius: 8px; font-size: 0.9rem; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out, padding 0.5s ease; padding: 0 1rem; }
.nutrition-details.expanded { max-height: 220px; padding: 1rem; }
.nutrition-details ul { list-style: none; padding-left: 0; }
.nutrition-details ul li { margin-bottom: 0.2rem; }
.menu-item-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 1rem; border-top: 1px solid #eee; flex-wrap: nowrap; margin-top: auto; }
.menu-item-price { font-size: 1.2rem; font-weight: 600; color: var(--primary-color); white-space: nowrap; line-height: 1; flex-shrink: 0; }
.menu-item-footer .btn-primary { flex-shrink: 0; }


.floating-cart { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: var(--primary-color); color: var(--light-text-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.8rem; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 1500; transition: transform 0.3s ease; /* PERBAIKAN iPHONE: Posisi dari safe area */ right: calc(30px + var(--safe-area-inset-right)); bottom: calc(30px + var(--safe-area-inset-bottom)); }
.floating-cart:hover { transform: scale(1.1); }
.cart-item-count { position: absolute; top: -5px; right: -5px; background: var(--secondary-color); color: var(--light-text-color); width: 25px; height: 25px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 0.8rem; font-weight: 600; border: 2px solid var(--light-text-color); }
.checkout-modal-content { max-width: 600px; padding: 2rem; text-align: left; display: flex; flex-direction: column; max-height: 85vh; width: 100%; }
#cart-items-container { overflow-y: auto; margin: 1.5rem 0; padding-right: 10px; flex-shrink: 1; min-height: 50px; flex-grow: 1; }
.checkout-footer { overflow-y: auto; padding-right: 10px; flex-shrink: 1; }
.checkout-modal-content h2 { text-align: center; }
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
.cart-item-details { flex-grow: 1; }
.cart-item-details h5 { font-size: 1rem; }
.cart-item-details p { font-size: 0.9rem; font-weight: 600; color: var(--primary-color); }
.cart-item-controls { display: flex; align-items: center; gap: 0.8rem; }
.qty-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--primary-color); background-color: transparent; color: var(--primary-color); font-size: 1.2rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.qty-btn:hover { background-color: var(--primary-color); color: white; }
.floating-cart.shake { animation: shake 0.5s ease; }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

.impact-calculator { background-color: #f4f9f0; border: 1px solid var(--secondary-color); border-radius: 10px; padding: 1rem; margin: 1.5rem 0; font-size: 0.9rem; }
.checkout-summary { margin: 1.5rem 0; border-top: 1px solid #ddd; padding-top: 1rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.summary-row.total { font-weight: 600; font-size: 1.2rem; margin-top: 1rem; }
.checkout-form { margin: 1.5rem 0; }
.checkout-form h3, .payment-options h3 { margin-bottom: 1rem; }
.checkout-form input, .checkout-form textarea { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 1rem; font-size: 1rem; }
.payment-options .options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.payment-options .options-grid .payment-btn:last-child { grid-column: 1 / -1; }
.payment-btn { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 500; transition: all 0.3s ease; }
.payment-btn.active, .payment-btn:hover { background: var(--secondary-color); color: var(--light-text-color); border-color: var(--secondary-color); }
.btn-full { width: 100%; margin-top: 2rem; padding: 1rem; font-size: 1.1rem; flex-shrink: 0; }


#nutrition-float { position: fixed; bottom: 30px; left: 30px; background: var(--secondary-color); color: var(--light-text-color); padding: 10px 20px; border-radius: 50px; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; z-index: 1500; box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.3s ease; /* PERBAIKAN iPHONE: Posisi dari safe area */ left: calc(30px + var(--safe-area-inset-left)); bottom: calc(30px + var(--safe-area-inset-bottom)); }
#nutrition-float:hover { transform: scale(1.05); }
#nutrition-float i { font-size: 1.4rem; }
#nutrition-modal .modal-content { max-width: 400px; }
#nutrition-modal .modal-content h2 { color: var(--secondary-color); }
.nutrition-form { margin: 1.5rem 0; }
.nutrition-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.nutrition-form input { width: 100%; padding: 0.8rem; border-radius: 8px; border: 1px solid #ddd; font-size: 1rem; text-align: center; }




@media (max-width: 1024px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    section { padding: 5rem 6%; }
    .header { padding-left: 6%; padding-right: 6%; }
    .navbar a:not(.btn-primary):not(.btn-secondary) { margin-left: 2rem; }
    .b2b-cta { flex-direction: column; text-align: center; }
    .b2b-content h2 { text-align: center; }
}


@media (max-width: 768px) {
    #menu-icon { display: block; }
    .auth-buttons { display: none; }

    .navbar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--background-color);
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
        transition: left 0.4s ease;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
       
        padding: calc(6rem + var(--safe-area-inset-top)) 2rem calc(2rem + var(--safe-area-inset-bottom));
    }

    .navbar.active { left: 0; }
    .navbar a:not(.btn-primary):not(.btn-secondary) { display: block; font-size: 1.4rem; margin: 1rem 0; padding: 0.5rem 0; }
    .navbar .nav-auth-buttons { display: flex; flex-direction: column; width: 100%; gap: 1rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #ddd; }
    .navbar .nav-auth-buttons .btn-primary, .navbar .nav-auth-buttons .btn-secondary { width: 100%; text-align: center; font-size: 1.1rem; margin-left: 0; }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1rem; }
    
    .steps-container { flex-direction: column; gap: 3rem; }
    .partner-showcase { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-social { margin-top: 1rem; }

    
    .menu-list, .store-directory { padding-left: 6%; padding-right: 6%; }
    .store-hero-content { margin-top: -80px; }
    .store-logo { width: 120px; height: 120px; margin-top: -75px; }

    
    .auth-container { flex-direction: column; background: url('image/grid2.jpeg') no-repeat center center/cover; }
    .auth-visual { flex: 0 0 auto; min-height: 25vh; justify-content: center; text-align: center; padding: 2rem; background: transparent; }
    .auth-visual::before { background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.3)); }
    .visual-text h1 { font-size: 1.8rem; }
    .visual-text p { display: none; }

    .auth-form-container {
        flex: 1;
        border-radius: 30px 30px 0 0;
        margin-top: -40px;
        position: relative;
        z-index: 5;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
       
        padding: 5rem 1.5rem calc(2.5rem + var(--safe-area-inset-bottom)) 1.5rem;
    }
    .auth-form { overflow-y: auto; text-align: left; }
    .auth-form h2 { text-align: center; font-size: 1.8rem; margin-bottom: 0.5rem; }
    .auth-form .form-subtitle { text-align: center; margin-bottom: 2rem; }
}


@media (max-width: 520px) {
    html { font-size: 90%; }
    section {
        padding-left: 5%;
        padding-right: 5%;
    }
    .header {
        
        padding-left: calc(5% + var(--safe-area-inset-left));
        padding-right: calc(5% + var(--safe-area-inset-right));
    }
    .hero-cta { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; text-align: center; }
    .hero-cta a { margin-right: 0; }
    .collections-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 2rem 1.5rem; }

    
    .store-grid, .store-grid.grid-double { grid-template-columns: 1fr; }
    .menu-grid { grid-template-columns: 1fr; }
    .menu-item-card { flex-direction: column; align-items: stretch; text-align: left; }
    .menu-item-card img { width: 100%; height: 220px; flex-shrink: 0; border-bottom: 1px solid #eee; }
    .menu-item-footer { flex-wrap: nowrap; }
    .menu-item-content { padding: 1rem; }
    
    #nutrition-float, #floating-cart { transform: scale(0.9); }
    #nutrition-float {
        left: calc(15px + var(--safe-area-inset-left));
        bottom: calc(15px + var(--safe-area-inset-bottom));
    }
    #floating-cart {
        right: calc(15px + var(--safe-area-inset-right));
        bottom: calc(15px + var(--safe-area-inset-bottom));
    }
    
    .checkout-modal-content {
        padding: 1.5rem;
        max-height: 90vh;
       
        padding-bottom: calc(1.5rem + var(--safe-area-inset-bottom));
    }
    .payment-options .options-grid { grid-template-columns: 1fr; }
     .modal-content {
        
        padding: 2.5rem 1rem;
    }
    .close-modal {
       
        top: 10px;
        right: 10px;
    }
    .streak-info {
     
        padding: 0.75rem;
    }
     .streak-counter {
        font-size: 1.7rem; 
        gap: 0.25rem;   
        flex-wrap: nowrap; 
    }
     .streak-info h3 {
        
        font-size: 1.2rem;
        line-height: 1.4;
    }
}

.checkout-simulator {
    text-align: center; 
    padding: 2rem 0;   
}