:root {
    --primary: #ff5200;
    --primary-light: #fff0e8;
    --dark: #282c3f;
    --text-muted: #686b78;
    --bg-color: #f4f5f7;
    --white: #ffffff;
    --border: #e9ecee;
    --success: #118a2e;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-heavy: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    font-family: system-ui, -apple-system, sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    background-color: var(--bg-color); 
    color: var(--dark); 
    padding-top: 70px; 
    padding-bottom: 90px; 
}

.app-header { 
    position: fixed; top: 0; left: 0; width: 100%; height: 64px; 
    background: var(--white); display: flex; justify-content: space-between; 
    align-items: center; padding: 0 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); 
    z-index: 100; 
}

.brand { display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 32px; height: 32px; background: var(--primary-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 22px; height: 22px; }
.brand h1 { font-size: 1.25rem; font-weight: 800; color: var(--dark); }

.header-actions { display: flex; gap: 16px; align-items: center; }
.icon-btn { position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--dark); }
.icon-btn svg { width: 24px; height: 24px; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--primary); color: var(--white); font-size: 0.7rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 2px; }

.hero { background: var(--white); padding: 16px; margin-bottom: 12px; }
.input-group { display: flex; align-items: center; background: var(--bg-color); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; border: 1px solid var(--border); cursor: pointer; }
.input-group svg { width: 20px; height: 20px; margin-right: 12px; flex-shrink: 0; }
.input-group input { border: none; background: transparent; width: 100%; font-size: 0.95rem; outline: none; color: var(--dark); font-weight: 600; cursor: pointer; }
.search-group { margin-bottom: 0; background: var(--white); }
.search-group input { pointer-events: auto; font-weight: 500; cursor: text; }

.category-section { padding: 0 16px; margin-bottom: 16px; }
.category-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.category-btn { background: var(--white); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 18px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow-soft); transition: 0.2s; height: 38px; display: flex; align-items: center; }
.category-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.menu-section { padding: 0 16px; }

.grid-container { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
}
@media (min-width: 768px) { 
    .grid-container { grid-template-columns: repeat(3, 1fr); gap: 16px; } 
}

.card { 
    background: var(--white); 
    border-radius: 12px; 
    padding: 10px; 
    box-shadow: var(--shadow-soft); 
    display: flex; 
    flex-direction: column; 
    border: 1px solid var(--border); 
    overflow: hidden;
}
.card-img { 
    width: 100%; 
    height: 120px; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    background: var(--bg-color); 
}
.card-info { 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    justify-content: space-between; 
    gap: 10px;
}
.card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card-title { 
    font-size: 0.85rem; 
    font-weight: 700; 
    color: var(--dark); 
    line-height: 1.3; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden;
}
.card-price { 
    font-size: 0.95rem; 
    color: var(--dark); 
    font-weight: 800; 
}

.btn-wrapper { 
    height: 36px; 
    width: 100%; 
}
.btn-add { 
    width: 100%; 
    height: 100%; 
    background: var(--primary-light); 
    color: var(--primary); 
    border: 1px solid var(--primary); 
    border-radius: 8px; 
    font-weight: 800; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    cursor: pointer; 
}
.btn-qty { 
    width: 100%; 
    height: 100%; 
    background: var(--primary); 
    color: var(--white); 
    border-radius: 8px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-weight: 800; 
}
.btn-qty button { 
    width: 35px; 
    height: 100%; 
    background: transparent; 
    border: none; 
    color: var(--white); 
    font-size: 1.2rem; 
    cursor: pointer; 
}
.btn-qty span { 
    flex-grow: 1; 
    text-align: center; 
    font-size: 0.9rem; 
}

.bottom-cart { 
    position: fixed; bottom: 0; left: 0; width: 100%; 
    background: var(--white); padding: 16px; display: flex; 
    justify-content: space-between; align-items: center; 
    box-shadow: var(--shadow-heavy); border-radius: 20px 20px 0 0; 
    transform: translateY(120%); transition: transform 0.3s ease; 
    z-index: 999; border-top: 1px solid var(--border); 
}
.bottom-cart.visible { transform: translateY(0); }
.cart-info { display: flex; flex-direction: column; }
#bottom-cart-items { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
#bottom-cart-total { font-size: 1.2rem; font-weight: 800; color: var(--dark); }

.order-btn { 
    background: var(--primary); color: var(--white); 
    border: none; border-radius: 12px; padding: 0 20px; 
    height: 48px; font-size: 1rem; font-weight: 800; 
    display: flex; align-items: center; gap: 8px; cursor: pointer; 
    box-shadow: 0 4px 12px rgba(255, 82, 0, 0.3);
}

.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); 
    display: flex; align-items: flex-end; justify-content: center; 
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; 
    z-index: 2000; 
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { 
    background: var(--bg-color); width: 100%; max-width: 500px; 
    border-radius: 24px 24px 0 0; padding: 24px 20px; 
    transform: translateY(100%); transition: transform 0.3s ease; 
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.2rem; font-weight: 800; }
.close-btn { font-size: 1.8rem; line-height: 1; color: var(--text-muted); cursor: pointer; }

.amount-card { background: var(--white); padding: 16px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border: 1px solid var(--border); }
.amount-card span { font-size: 0.95rem; color: var(--text-muted); font-weight: 600; }
.amount-card strong { font-size: 1.4rem; color: var(--dark); font-weight: 800; }

.payment-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.pay-option { display: flex; align-items: center; padding: 16px; border: 2px solid var(--primary); border-radius: 12px; background: var(--primary-light); cursor: pointer;}
.pay-option input { display: none; }
.pay-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-right: 16px; }
.pay-label { font-weight: 700; font-size: 1rem; color: var(--dark); }

.action-btn { width: 100%; justify-content: center; height: 54px; font-size: 1.1rem; }

.success-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: var(--success); z-index: 9999; display: flex; 
    flex-direction: column; align-items: center; justify-content: center; 
    color: var(--white); text-align: center; transform: translateY(100%); 
    transition: transform 0.4s ease; 
}
.success-overlay.active { transform: translateY(0); }
.success-overlay .checkmark { font-size: 5rem; margin-bottom: 20px; }
.success-overlay h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; }
.success-overlay p { font-size: 1rem; opacity: 0.9; }

.tap-effect:active { transform: scale(0.96); }
