:root {
    --bg-light: #f4f6f8;
    --bg-card: #ffffff;
    --primary: #f26a2e; /* Orange minimarket */
    --primary-hover: #d95e28;
    --accent: #27ae60; /* Green fresh */
    --text-main: #2d3436;
    --text-muted: #636e72;
    --border: #e2e8f0;
}

* {
    margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent;
}
body { background: var(--bg-light); color: var(--text-main); }
#app { display: flex; flex-direction: column; height: 100vh; max-width: 500px; margin: 0 auto; position: relative; background: var(--bg-light); box-shadow: 0 0 20px rgba(0,0,0,0.1); }

header {
    display: flex; justify-content: space-between; align-items: center; padding: 20px;
    background: var(--bg-card); z-index: 10; border-bottom: 2px solid var(--border);
}
.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--primary); }
.logo i { color: var(--accent); margin-right: 5px; }

.cart-pill {
    background: var(--bg-light); padding: 8px 16px; border-radius: 20px;
    font-size: 1rem; font-weight: 700; color: var(--primary); border: 1px solid var(--border);
    transition: transform 0.2s; cursor: pointer;
}
.cart-pill.bump { transform: scale(1.1); }

main { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 100px; }
.view { display: none; animation: fadeIn 0.4s ease-out; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-title { font-size: 1.6rem; margin-bottom: 20px; font-weight: 800; color: var(--text-main); }

.products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.prod-card {
    background: var(--bg-card); border-radius: 16px; overflow: hidden; padding: 15px;
    border: 1px solid var(--border); text-align: center; display: flex; flex-direction: column;
}
.prod-img { height: 120px; width: 100%; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.prod-title { font-size: 1rem; font-weight: 700; margin-bottom: 5px; flex: 1; }
.prod-price { color: var(--primary); font-size: 1.1rem; font-weight: 800; margin-bottom: 15px; }
.prod-actions { display: flex; gap: 5px; justify-content: center; align-items: center; }
.btn-circle {
    width: 35px; height: 35px; border-radius: 50%; border: none; font-weight: 800; font-size: 1.2rem;
    cursor: pointer; background: var(--bg-light); color: var(--text-main);
}
.btn-circle.add { background: var(--primary); color: white; }
.prod-count { font-weight: 700; width: 30px; }

.modal {
    display: none; position: fixed; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5); z-index: 100; align-items: flex-end;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-card); width: 100%; padding: 25px; border-radius: 24px 24px 0 0;
    animation: slideUp 0.3s;
}
@keyframes slideUp { from {transform: translateY(100%);} to {transform: translateY(0);} }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }

.cart-summary { margin-bottom: 20px; max-height: 200px; overflow-y: auto; }
.cart-item { display: flex; justify-content: space-between; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); font-weight: 600;}
.cart-total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 800; margin-top: 15px; color: var(--primary);}

.btn-primary {
    width: 100%; padding: 15px; border-radius: 12px; background: var(--accent); color: white;
    font-weight: 800; font-size: 1.1rem; border: none; cursor: pointer; transition: 0.3s;
}
.btn-primary:active { transform: scale(0.98); }

/* Cashier */
.order-card {
    background: var(--bg-card); padding: 20px; border-radius: 16px; margin-bottom: 15px;
    border: 1px solid var(--border); border-left: 5px solid var(--primary);
}
.order-id { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; display: flex; justify-content: space-between; }
.order-id span { color: var(--text-muted); font-size: 0.9rem; font-weight: 400; }
.order-list { margin-bottom: 15px; color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }

/* Bottom Nav */
.bottom-nav {
    position: absolute; bottom: 0; left: 0; right: 0; background: var(--bg-card);
    display: flex; justify-content: space-around; padding: 10px; border-top: 1px solid var(--border);
}
.nav-item {
    background: none; border: none; color: var(--text-muted); display: flex; flex-direction: column;
    align-items: center; gap: 5px; font-size: 0.8rem; padding: 10px; cursor: pointer; font-weight: 600;
}
.nav-item.active { color: var(--primary); }
.nav-item i { font-size: 1.4rem; }
