/* ================================================ */
/* Restaurant Ordering System - Modern & Professional */
/* ================================================ */

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.12);
    --success: #22c55e;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 110px;
}

/* ======================== */
/* CONTAINER (Desktop)      */
/* ======================== */
.container {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-card);
    min-height: 100vh;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.06);
    position: relative;
}

/* ======================== */
/* HEADER & SEARCH          */
/* ======================== */
.main-header {
    background: var(--bg-card);
    padding: 16px 16px 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.store-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding-bottom: 4px;
}

.store-logo {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

.store-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    text-align: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

#searchInput {
    width: 100%;
    padding: 11px 16px 11px 42px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg-main);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#searchInput::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ======================== */
/* PROMO BANNER             */
/* ======================== */
.promo-banner-container {
    padding: 10px 16px 6px;
    background: var(--bg-card);
}

.promo-banner {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-main);
    display: block;
}

/* ======================== */
/* FILTER CHIPS             */
/* ======================== */
.filter-container {
    padding: 12px 0 8px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}

.filter-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 16px;
    gap: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 9px 22px;
    border-radius: 99px;
    background: var(--bg-main);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    scroll-snap-align: start;
    font-family: inherit;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.filter-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #eef2ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.filter-chip:hover::before {
    opacity: 1;
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.filter-chip.active::before {
    opacity: 0;
}

.filter-chip:active {
    transform: scale(0.96);
}

/* ======================== */
/* CATEGORY SECTIONS        */
/* ======================== */
.category-section {
    grid-column: 1 / -1;
    margin-top: 8px;
    margin-bottom: 4px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ======================== */
/* MENU GRID                */
/* ======================== */
.menu-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: var(--bg-main);
}

/* ======================== */
/* MENU CARD                */
/* ======================== */
.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xs);
    position: relative;
}

.menu-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.15);
}

.menu-card:active {
    transform: scale(0.98) translateY(0);
    box-shadow: var(--shadow-xs);
}

.menu-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-main);
    position: relative;
    overflow: hidden;
}

.menu-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-card:hover .menu-image {
    transform: scale(1.03);
}

.menu-content {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.menu-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-top: auto;
}

/* ======================== */
/* QUANTITY CONTROLS         */
/* ======================== */
.card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
}

.qty-controls {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--border);
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--bg-card);
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: inherit;
}

.qty-btn:hover:not(:disabled) {
    background: var(--accent);
    color: white;
}

.qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.qty-display {
    width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
}

/* ======================== */
/* CART SUMMARY (BOTTOM)    */
/* ======================== */
.cart-summary {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    background: var(--primary);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 200;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.cart-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-count-badge {
    background: var(--accent);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.cart-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.7;
}

.cart-right {
    text-align: right;
}

.total-label-small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    margin-bottom: 1px;
}

.total-price {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.checkout-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

.checkout-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.checkout-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ======================== */
/* NOTIFICATIONS            */
/* ======================== */
.notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: var(--primary);
    color: white;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.4s 2.6s forwards;
    pointer-events: auto;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
}

.notif-desc {
    font-size: 12px;
    opacity: 0.7;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ======================== */
/* NO RESULTS               */
/* ======================== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ================================================ */
/* CHECKOUT PAGE                                    */
/* ================================================ */
.checkout-container {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-card);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.06);
}

.checkout-header {
    background: var(--bg-card);
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 0;
}

.back-btn:hover {
    background: var(--bg-main);
    border-color: var(--text-muted);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

.checkout-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.checkout-content {
    padding: 20px;
}

.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.item-quantity {
    font-size: 13px;
    color: var(--text-muted);
}

.item-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
}

.total-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label-large {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 14px;
}

.total-price-large {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}

/* ======================== */
/* PAYMENT METHODS          */
/* ======================== */
.payment-methods {
    display: grid;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.03);
}

.payment-option.selected {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

.payment-radio {
    margin-right: 14px;
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
}

.payment-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
}

.payment-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.confirm-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
    font-family: inherit;
}

.confirm-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.25);
}

.confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ======================== */
/* FORM (Checkout)          */
/* ======================== */
.form-group {
    margin-bottom: 14px;
}

.form-label-small {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input-minimal {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
}

.form-input-minimal:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input-minimal::placeholder {
    color: var(--text-muted);
}

/* ======================== */
/* LABEL HINT               */
/* ======================== */
.label-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-size: 11px;
}

/* ======================== */
/* ORDER TYPE SELECTOR      */
/* ======================== */
.order-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.order-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    background: var(--bg-card);
}

.order-type-option:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.03);
}

.order-type-option.selected {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.07);
}

.order-type-option.selected .order-type-icon {
    color: var(--accent);
}

.order-type-option.selected .order-type-label {
    color: var(--accent);
}

.order-type-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.order-type-icon {
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-type-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
}

.order-type-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ======================== */
/* TABLE NUMBER BUTTONS     */
/* ======================== */
.table-number-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.table-btn {
    padding: 10px 4px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.table-btn:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.05);
    color: var(--accent);
}

.table-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

@media (max-width: 360px) {
    .order-type-grid {
        gap: 8px;
    }

    .order-type-option {
        padding: 12px 6px;
    }

    .order-type-label {
        font-size: 12px;
    }

    .order-type-desc {
        display: none;
    }

    .table-number-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
}

/* ======================== */
/* MODAL UI                 */
/* ======================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    padding: 28px;
    text-align: center;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.modal-footer-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 20px;
    font-family: inherit;
    transition: var(--transition);
}

.modal-footer-btn:hover {
    background: var(--accent-hover);
}

/* ======================== */
/* RESPONSIVE - DESKTOP     */
/* ======================== */
@media (min-width: 768px) {
    body {
        background: #e8ecf1;
    }

    .container,
    .checkout-container {
        border-radius: 0 0 16px 16px;
        margin-top: 0;
    }

    .menu-grid {
        gap: 14px;
        padding: 20px;
    }

    .menu-name {
        font-size: 14px;
    }
}

/* ======================== */
/* RESPONSIVE - SMALL MOBILE */
/* ======================== */
@media (max-width: 380px) {
    .menu-grid {
        padding: 12px;
        gap: 8px;
    }

    .menu-content {
        padding: 8px;
    }

    .menu-name {
        font-size: 12px;
    }

    .menu-price {
        font-size: 12px;
    }

    .cart-summary {
        padding: 12px 16px;
    }

    .total-price {
        font-size: 14px;
    }

    .checkout-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .cart-count-badge {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .qty-display {
        width: 22px;
        font-size: 12px;
    }
}

/* Category Divider */
.category-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0 10px;
    margin-top: 8px;
}

.category-divider span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
    padding: 6px 14px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.category-divider::after {
    content: "";
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
    flex-grow: 1;
}

.category-divider:first-child {
    margin-top: 0;
    padding-top: 6px;
}

/* ======================== */
/* DELIVERY SECTION         */
/* ======================== */
.delivery-section textarea {
    resize: vertical;
    min-height: 70px;
}

.location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 10px;
    border: 1.5px solid var(--accent);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.location-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.location-btn:hover:not(:disabled) svg {
    stroke: white;
}

.location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.delivery-info-card {
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 10px;
    padding: 14px 16px;
}

.delivery-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.delivery-info-row+.delivery-info-row {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed rgba(37, 99, 235, 0.15);
}

.delivery-info-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.delivery-info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.delivery-fee-highlight {
    color: var(--accent);
}

.delivery-status {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 0 2px;
    min-height: 18px;
}

.delivery-status-loading {
    color: var(--text-muted);
}

.delivery-status-success {
    color: var(--success);
}

.delivery-status-error {
    color: #ef4444;
}

/* ======================== */
/* SUBTOTAL / DELIVERY ROW  */
/* ======================== */
.subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px dashed var(--border);
}

.subtotal-row span:last-child {
    font-weight: 600;
    color: var(--text-main);
}

.delivery-fee-row span:last-child {
    color: var(--accent);
    font-weight: 700;
}

/* Topping Modal Styles */
.topping-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.topping-modal.active {
    display: flex;
}

.topping-modal-content {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.topping-modal-header {
    margin-bottom: 20px;
}

.topping-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.topping-modal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.topping-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.topping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.topping-option.selected {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.04);
}

.topping-option-info {
    display: flex;
    flex-direction: column;
}

.topping-option-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.topping-option-price {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

.topping-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.topping-option.selected .topping-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.topping-checkbox svg {
    color: white;
    display: none;
}

.topping-option.selected .topping-checkbox svg {
    display: block;
}

.topping-modal-footer {
    display: flex;
    gap: 12px;
}

.topping-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.topping-btn-cancel {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.topping-btn-confirm {
    background: var(--primary);
    color: white;
}

.item-toppings {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
    font-style: italic;
}

/* ================================================ */
/* CHECKOUT V2 - MODERN REDESIGN                    */
/* ================================================ */

/* Body override for checkout */
.checkout-body {
    background: #f0f4f8;
    padding-bottom: 0;
}

/* ── Wrapper ── */
.checkout-wrapper {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f0f4f8;
}

/* ── Header ── */
.co-header {
    background: var(--bg-card);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.co-back-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.co-back-btn:hover {
    background: var(--border);
    border-color: var(--text-muted);
}

.co-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.co-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ── Main scroll area ── */
.co-main {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

/* ── Card / Section ── */
.co-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.co-card-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.co-step-badge {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: white;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.co-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.co-optional-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 2px 8px;
    letter-spacing: 0.02em;
}

/* ── Form Fields ── */
.co-field {
    margin-bottom: 14px;
}

.co-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}

.co-required {
    color: #ef4444;
    font-size: 13px;
    line-height: 1;
    margin-left: 1px;
}

.co-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 2px;
}

.co-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.co-input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.co-input::placeholder {
    color: var(--text-muted);
}

.co-textarea {
    resize: none;
    line-height: 1.6;
}

/* ── Order Type Grid ── */
.co-order-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.co-order-opt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-main);
    text-align: center;
    user-select: none;
}

.co-order-opt:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.04);
}

.co-order-opt.selected {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.co-order-icon {
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 2px;
}

.co-order-opt.selected .co-order-icon {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 1px 6px rgba(37, 99, 235, 0.15);
}

.co-order-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.2s;
}

.co-order-opt.selected .co-order-name {
    color: var(--accent);
}

.co-order-desc {
    font-size: 10px;
    color: var(--text-muted);
}

.co-order-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.co-order-opt.selected .co-order-check {
    opacity: 1;
    transform: scale(1);
}

.co-radio-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* ── Sub-section (table / delivery) ── */
.co-sub-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

/* ── Price Summary ── */
.co-price-summary {
    margin-top: 8px;
    border-top: 1px solid var(--border-light);
    padding-top: 4px;
}

.co-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px dashed var(--border);
}

.co-price-row span:last-child {
    font-weight: 600;
    color: var(--text-main);
}

.co-total-row {
    margin-top: 10px;
    padding-top: 12px !important;
    border-top: 1.5px solid var(--border) !important;
}

/* ── Notes Area ── */
.co-notes-wrap {
    position: relative;
}

.co-notes-input {
    padding-bottom: 10px;
}

.co-notes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding: 0 2px;
}

.co-notes-tip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.co-notes-counter {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.co-notes-counter--near {
    color: #f59e0b;
}

.co-notes-counter--full {
    color: #ef4444;
}

/* ── Payment Options ── */
.co-payment-list {
    display: grid;
    gap: 10px;
}

.co-payment-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-main);
    user-select: none;
}

.co-payment-opt:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.03);
}

.co-payment-opt.selected {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.co-payment-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.co-payment-icon--qris {
    background: linear-gradient(135deg, #eef2ff, #dbeafe);
    color: var(--accent);
}

.co-payment-icon--cash {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #16a34a;
}

.co-payment-opt.selected .co-payment-icon--qris {
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: white;
}

.co-payment-opt.selected .co-payment-icon--cash {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
}

.co-payment-text {
    flex: 1;
}

.co-payment-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.co-payment-opt.selected .co-payment-check {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ── Confirm Footer ── */
.co-footer {
    background: var(--bg-card);
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.co-confirm-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: white;
    border: none;
    padding: 15px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.co-confirm-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-hover), #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45);
}

.co-confirm-btn:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.co-confirm-btn:disabled {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.75;
}

/* ── Variant / Topping Button (in order items) ── */
.co-variant-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 13px;
    border: 1.5px solid var(--accent);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.05);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.co-variant-btn:hover {
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.co-variant-btn:active {
    transform: scale(0.97) translateY(0);
}

/* ── Topping Modal ── */
.topping-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.topping-modal.active {
    display: flex;
}

.topping-modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 520px;
    border-radius: 24px 24px 0 0;
    padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.topping-modal-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.topping-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
}

.topping-modal-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.topping-list {
    max-height: 45vh;
    overflow-y: auto;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.topping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-main);
}

.topping-option:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.03);
}

.topping-option.selected {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

.topping-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topping-option-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.topping-option-price {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

.topping-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.topping-option.selected .topping-checkbox {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.topping-checkbox svg {
    color: white;
    display: none;
}

.topping-option.selected .topping-checkbox svg {
    display: block;
}

.topping-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 10px;
}

.topping-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    letter-spacing: 0.01em;
}

.topping-btn-cancel {
    background: var(--bg-main);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.topping-btn-cancel:hover {
    background: var(--border);
    color: var(--primary);
}

.topping-btn-confirm {
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.topping-btn-confirm:hover {
    background: linear-gradient(135deg, var(--accent-hover), #2563eb);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

/* ── Order items in checkout ── */
.co-order-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.co-order-item:last-child {
    border-bottom: none;
}

/* ── Desktop responsive ── */
@media (min-width: 768px) {
    .checkout-wrapper {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
        border-radius: 0 0 20px 20px;
    }

    .topping-modal {
        align-items: center;
        padding: 24px;
    }

    .topping-modal-content {
        max-width: 440px;
        border-radius: 20px;
        padding: 32px;
        animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* ── Small mobile ── */
@media (max-width: 380px) {
    .co-main {
        padding: 12px;
        gap: 10px;
    }

    .co-card {
        padding: 16px;
        border-radius: 14px;
    }

    .co-order-type-grid {
        gap: 8px;
    }

    .co-order-opt {
        padding: 12px 6px 10px;
    }

    .co-order-icon {
        width: 34px;
        height: 34px;
    }

    .co-order-name {
        font-size: 11px;
    }

    .co-order-desc {
        display: none;
    }

    .co-confirm-btn {
        font-size: 14px;
        padding: 14px 20px;
    }
}