:root {
    --primary: #FF6B35;
    --secondary: #F7C59F;
    --bg: #FFF8F0;
    --text: #2D2D2D;
    --accent: #FF8C42;
    --card-bg: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Prompt', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 80px;
    -webkit-tap-highlight-color: transparent;
}

/* Header */
.app-header {
    background: var(--primary);
    color: #fff;
    padding: 20px 16px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.store-info h1 { font-size: 1.3em; font-weight: 700; }
.store-status { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 5px; font-size: 0.85em; opacity: 0.9; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4CAF50; }
.status-dot.closed { background: #ff4444; }

/* GPS Banner */
.gps-banner {
    background: #fff3e0; color: #e65100; text-align: center; padding: 12px 16px;
    font-size: 0.9em; display: flex; align-items: center; justify-content: center; gap: 8px;
    flex-wrap: wrap;
}
.gps-banner.gps-success {
    background: #e8f5e9; color: #2e7d32;
}
.gps-banner.gps-error {
    background: #ffebee; color: #c62828;
}
.btn-gps-allow {
    background: var(--accent); color: #fff; border: none; padding: 6px 14px;
    border-radius: 20px; font-size: 0.85em; cursor: pointer; display: inline-flex;
    align-items: center; gap: 5px; font-weight: 600;
}
.btn-gps-allow:active { transform: scale(0.95); }

/* Closed Banner */
.closed-banner {
    background: #ffebee; color: #c62828; text-align: center; padding: 15px;
    font-size: 0.95em; display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.closed-banner i { font-size: 1.5em; }
.store-hours-info { font-size: 0.8em; color: #999; margin-top: 5px; }

/* Coupon Banner */
.coupon-banner {
    padding: 10px 16px;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 10px;
    scrollbar-width: none;
}
.coupon-banner::-webkit-scrollbar { display: none; }
.coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 0.8em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
    border: 1px solid var(--secondary);
}
.coupon-tag i { color: var(--primary); }
.coupon-tag .value { font-weight: 600; color: var(--primary); }

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    position: sticky;
    top: 75px;
    z-index: 40;
    background: var(--bg);
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85em;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cat-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Menu List */
.menu-list { padding: 0 16px 20px; }
.menu-category-title {
    font-size: 1.1em; font-weight: 600; margin: 20px 0 10px;
    padding-bottom: 5px; border-bottom: 2px solid var(--secondary);
}
.menu-item {
    display: flex;
    gap: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s;
}
.menu-item:active { transform: scale(0.98); }
.menu-item-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    flex-shrink: 0;
}
.menu-item-img.no-img { display: flex; align-items: center; justify-content: center; background: #f5f5f5; color: #ddd; font-size: 2em; }
.menu-item-body { flex: 1; padding: 12px 12px 12px 0; display: flex; flex-direction: column; justify-content: center; }
.menu-item-name { font-weight: 600; font-size: 0.95em; margin-bottom: 4px; }
.menu-item-price { color: var(--primary); font-weight: 700; font-size: 1.1em; }
.menu-item-addons-info { font-size: 0.75em; color: #999; margin-top: 4px; }
.menu-item-add {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
    color: #fff; border: none; font-size: 1.2em; cursor: pointer; margin: auto 12px auto 0; flex-shrink: 0;
}

/* Addon Selection Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
}
.addon-sheet {
    background: var(--card-bg); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 85vh; display: flex; flex-direction: column;
    animation: slideUpSheet 0.3s ease;
}
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
.addon-sheet-header {
    display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid #eee; align-items: center;
}
.addon-sheet-header img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; }
.addon-item-info h3 { font-size: 1em; }
.addon-item-price { color: var(--primary); font-weight: 600; }
.close-btn { background: none; border: none; font-size: 1.5em; color: #999; cursor: pointer; margin-left: auto; }
.addon-sheet-body { flex: 1; overflow-y: auto; padding: 16px; }
.addon-group-section { margin-bottom: 20px; }
.addon-group-title {
    font-weight: 600; font-size: 0.95em; margin-bottom: 8px;
    display: flex; align-items: center; justify-content: space-between;
}
.addon-required { font-size: 0.75em; color: #ff5722; background: #fff3e0; padding: 2px 8px; border-radius: 10px; }
.addon-option {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #f5f5f5;
}
.addon-option label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.addon-option-price { font-size: 0.85em; color: var(--primary); font-weight: 500; white-space: nowrap; }
.addon-sheet-footer {
    display: flex; gap: 12px; padding: 16px; border-top: 1px solid #eee; align-items: center;
}
.qty-control { display: flex; align-items: center; gap: 0; border: 1px solid #ddd; border-radius: 25px; overflow: hidden; }
.qty-control button {
    width: 36px; height: 36px; border: none; background: #f5f5f5;
    font-size: 1.1em; cursor: pointer; color: var(--text);
}
.qty-control span { width: 36px; text-align: center; font-weight: 600; }
.btn-add-order {
    flex: 1; padding: 12px; background: var(--primary); color: #fff; border: none;
    border-radius: 25px; font-family: inherit; font-size: 0.95em; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* Floating Order Button */
.floating-order-btn {
    position: fixed; bottom: 16px; left: 16px; right: 16px;
    background: var(--primary); color: #fff; border-radius: 16px;
    padding: 14px 20px; display: flex; align-items: center; gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25); cursor: pointer; z-index: 60;
    transition: transform 0.2s; max-width: 500px; margin: 0 auto;
}
.floating-order-btn:active { transform: scale(0.97); }
.order-count {
    background: #fff; color: var(--primary); font-weight: 700;
    width: 24px; height: 24px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 0.8em;
}
.order-total { margin-left: auto; font-weight: 700; font-size: 1.1em; }

/* Order Sheet */
.order-sheet-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
}
.order-sheet {
    background: var(--bg); border-radius: 20px 20px 0 0; width: 100%; max-width: 500px;
    max-height: 92vh; display: flex; flex-direction: column; animation: slideUpSheet 0.3s ease;
}
.order-sheet-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: var(--card-bg); border-radius: 20px 20px 0 0;
    border-bottom: 1px solid #eee;
}
.order-sheet-header h3 { font-size: 1.1em; display: flex; align-items: center; gap: 8px; }
.order-sheet-body { flex: 1; overflow-y: auto; padding: 16px; }

/* Order Items in Sheet */
.order-item-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--card-bg); border-radius: 12px; padding: 12px; margin-bottom: 8px;
}
.order-item-details { flex: 1; }
.order-item-name { font-weight: 600; font-size: 0.9em; }
.order-item-addons-text { font-size: 0.75em; color: #999; }
.order-item-price { font-weight: 600; color: var(--primary); font-size: 0.95em; white-space: nowrap; }
.order-item-qty {
    display: flex; align-items: center; gap: 0; border: 1px solid #eee; border-radius: 20px; overflow: hidden;
}
.order-item-qty button {
    width: 28px; height: 28px; border: none; background: #f5f5f5; font-size: 0.9em; cursor: pointer;
}
.order-item-qty span { width: 28px; text-align: center; font-size: 0.85em; font-weight: 600; }
.order-item-remove { color: #ff4444; cursor: pointer; font-size: 0.85em; }

/* Coupon & Suggestion Sections */
.coupon-section, .suggestion-section {
    margin-top: 12px; padding: 12px; background: var(--card-bg); border-radius: 12px;
}
.coupon-applied {
    display: flex; align-items: center; gap: 8px; padding: 8px 0;
    font-size: 0.9em; color: #2e7d32;
}
.coupon-applied i { color: #4CAF50; }
.coupon-applied .discount { font-weight: 700; color: #2e7d32; margin-left: auto; }
.suggestion-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 0;
    font-size: 0.85em; color: #e65100; border-bottom: 1px solid #f5f5f5;
}
.suggestion-item:last-child { border: none; }
.suggestion-item i { color: #FF9800; flex-shrink: 0; }

/* Order Summary */
.order-summary-section {
    margin-top: 12px; padding: 16px; background: var(--card-bg); border-radius: 12px;
}
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.9em; }
.summary-row.discount { color: #2e7d32; }
.summary-row.total { font-size: 1.15em; font-weight: 700; padding-top: 10px; margin-top: 8px; border-top: 2px solid var(--primary); }
.summary-row .free-tag { background: #4CAF50; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 0.75em; }
.gps-notice {
    margin-top: 10px; padding: 8px 12px; background: #fff3e0; color: #e65100;
    border-radius: 8px; font-size: 0.78em; line-height: 1.5;
}
.payment-notice {
    margin-top: 12px; padding: 10px 14px; background: #e3f2fd; color: #1565c0;
    border-radius: 10px; font-size: 0.85em; line-height: 1.7;
}

/* Customer Form */
.customer-form {
    padding: 16px 20px; background: var(--card-bg); border-top: 1px solid #eee;
}
.customer-form h4 { margin-bottom: 12px; font-size: 0.95em; display: flex; align-items: center; gap: 6px; }
.customer-form .form-group { margin-bottom: 10px; }
.customer-form label { display: block; font-size: 0.8em; color: #777; margin-bottom: 4px; font-weight: 500; }
.customer-form input, .customer-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px;
    font-family: inherit; font-size: 0.9em; transition: border-color 0.2s;
}
.customer-form input:focus, .customer-form textarea:focus { outline: none; border-color: var(--primary); }
.customer-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gps-display {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: #f8f9fa; border-radius: 10px; font-size: 0.85em;
}
.gps-display span { flex: 1; }
.btn-gps {
    background: none; border: none; color: var(--primary); cursor: pointer; font-size: 1.1em;
}
.btn-confirm-order {
    width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none;
    border-radius: 14px; font-family: inherit; font-size: 1em; font-weight: 600;
    cursor: pointer; margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-confirm-order:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status Page */
.status-page {
    position: fixed; inset: 0; background: var(--bg); z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.status-content { text-align: center; max-width: 400px; width: 100%; }
.status-header { margin-bottom: 30px; }
.status-header i { font-size: 3em; color: var(--primary); margin-bottom: 10px; }
.status-header h2 { font-size: 1.3em; }
.status-header p { color: #999; font-size: 0.9em; }

/* Status Tracker */
.status-tracker { display: flex; align-items: center; justify-content: center; margin: 30px 0; flex-wrap: wrap; gap: 0; }
.track-step { display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0.3; transition: 0.3s; }
.track-step.active { opacity: 1; }
.track-step.active .track-icon { background: var(--primary); color: #fff; transform: scale(1.1); }
.track-icon {
    width: 45px; height: 45px; border-radius: 50%; background: #e0e0e0; color: #999;
    display: flex; align-items: center; justify-content: center; font-size: 1em; transition: 0.3s;
}
.track-label { font-size: 0.7em; font-weight: 500; max-width: 70px; }
.track-line { width: 30px; height: 3px; background: #e0e0e0; margin: 0 2px; margin-bottom: 20px; }
.track-step.active ~ .track-line { background: #e0e0e0; }

.status-detail {
    background: var(--card-bg); padding: 16px; border-radius: 12px; text-align: left;
    font-size: 0.85em; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.used-coupons {
    background: #e8f5e9; padding: 12px; border-radius: 12px; text-align: left;
    font-size: 0.85em; margin-bottom: 20px;
}
.btn-new-order {
    padding: 12px 30px; background: var(--primary); color: #fff; border: none;
    border-radius: 25px; font-family: inherit; font-size: 0.95em; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}

/* Recommended Popup */
.popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 300;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.popup-content { position: relative; max-width: 350px; width: 100%; animation: popIn 0.3s; }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-content img { width: 100%; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.popup-close {
    display: block; margin: 15px auto 0; padding: 8px 30px;
    background: rgba(255,255,255,0.3); color: #ccc; border: 1px solid #666;
    border-radius: 20px; font-family: inherit; font-size: 0.9em; cursor: pointer;
}

/* Empty State */
.empty-state { text-align: center; padding: 40px 20px; color: #ccc; }
.empty-state i { font-size: 3em; margin-bottom: 10px; }

/* Utility */
.text-muted { color: #999; }
.hidden { display: none !important; }

/* Responsive adjustments */
@media (min-width: 500px) {
    .menu-list { max-width: 500px; margin: 0 auto; }
    .coupon-banner { max-width: 500px; margin: 0 auto; }
    .category-tabs { max-width: 500px; margin: 0 auto; }
}
