:root {
    --primary: #ff9800;
    --primary-dark: #f57c00;
    --success: #4caf50;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #222;
    --text-secondary: #666;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 80px;
    overflow-x: hidden;
}

/* ============ HEADER ============ */
.header {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
}

.info-banner {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 8px 16px;
    margin-top: 12px;
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ============ MENU CONTAINER ============ */
.container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.category-title {
    font-size: 18px;
    font-weight: 800;
    margin: 24px 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    color: var(--text);
}

/* ============ PRODUCT CARD ============ */
.item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.item:active {
    transform: scale(0.98);
}

.item.stopped {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none;
}

.clickable-area {
    display: flex;
    align-items: center;
    flex: 1;
}

.item-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
    color: var(--text);
}

.item-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 6px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.btn-add, .btn-remove {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add {
    background: var(--primary);
    color: white;
}

.btn-add:active {
    background: var(--primary-dark);
    transform: scale(0.9);
}

.btn-remove {
    background: #f0f0f0;
    color: #666;
}

.btn-remove:active {
    background: #e0e0e0;
    transform: scale(0.9);
}

.count {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

/* ============ PRODUCT MODAL ============ */
.modal-product {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    margin-right: 12px;
}

.modal-title-small {
    font-size: 18px;
    font-weight: 700;
}

.product-cover {
    width: 100%;
    height: 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
}

.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.p-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.p-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

.p-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.product-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: white;
    display: flex;
    gap: 12px;
    align-items: center;
}

.stepper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
}

.step-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: white;
    border: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-val {
    min-width: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

.add-cart-btn {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.add-cart-btn:active {
    background: var(--primary-dark);
}

/* ============ CHECKOUT MODAL ============ */
.modal-checkout {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 2000;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.checkout-header {
    background: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 18px;
    font-weight: 700;
}

.close-x {
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.block {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.block-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

#cart-list {
    margin-bottom: 12px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-name {
    flex: 1;
    font-size: 15px;
}

.cart-item-qty {
    color: var(--primary);
    font-weight: 700;
    margin: 0 8px;
}

.cart-item-price {
    font-weight: 700;
    min-width: 70px;
    text-align: right;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--border);
    font-size: 18px;
    font-weight: 800;
}

.total-price {
    color: var(--primary);
    font-size: 20px;
}

/* FORM ELEMENTS */
.form-select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: none;
}

.hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
}

/* DELIVERY TOGGLE */
.delivery-toggle {
    display: flex;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 12px;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.toggle-btn.active {
    background: white;
    color: var(--text);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.delivery-hint {
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.hint-pickup {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.hint-delivery {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

/* PAYMENT OPTIONS */
.payment-option {
    display: flex;
    align-items: center;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option.selected {
    border-color: var(--primary);
    background: #fff8e1;
}

.radio-dot {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s;
}

.payment-option.selected .radio-dot {
    border-color: var(--primary);
}

.payment-option.selected .radio-dot::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.payment-label {
    font-size: 15px;
    font-weight: 600;
}

/* CHECKOUT FOOTER */
.checkout-footer {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border);
}

.submit-btn {
    width: 100%;
    background: var(--success);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.submit-btn:active {
    background: #43a047;
    transform: scale(0.98);
}