/* ===== Brasa Eats Order Page ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold: #c9a050;
    --gold-dark: #b8893a;
    --gold-light: #f5e6c8;
    --dark: #1a1a1a;
    --dark-2: #222;
    --grey-100: #f7f7f7;
    --grey-200: #eee;
    --grey-300: #ddd;
    --grey-400: #aaa;
    --grey-600: #666;
    --grey-800: #333;
    --white: #fff;
    --green: #27ae60;
    --red: #e74c3c;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--grey-100);
    color: var(--grey-800);
    min-height: 100vh;
}

/* ─── Nav ─── */
.order-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dark);
    color: var(--white);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.order-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.order-nav-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.order-nav-name {
    font-size: 18px;
    font-weight: 700;
    display: block;
    letter-spacing: .3px;
}

.order-nav-tag {
    font-size: 11px;
    color: var(--gold);
    font-weight: 500;
    display: block;
}

.cart-toggle {
    position: relative;
    background: rgba(255,255,255,.1);
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s;
}

.cart-toggle:hover { background: rgba(255,255,255,.2); }

.cart-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Specials Banner ─── */
.specials-banner {
    background: linear-gradient(135deg, var(--dark) 0%, #2a1f0a 100%);
    color: var(--white);
    padding: 16px 24px;
    overflow-x: auto;
}

.specials-inner {
    display: flex;
    gap: 16px;
    min-width: max-content;
}

.special-card {
    background: rgba(201,160,80,.15);
    border: 1px solid rgba(201,160,80,.3);
    border-radius: 10px;
    padding: 12px 20px;
    min-width: 220px;
    flex-shrink: 0;
}

.special-card .special-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 4px;
}

.special-card .special-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.special-card .special-prices {
    font-size: 12px;
    color: var(--grey-400);
}

.special-card .special-prices .new-price {
    color: var(--gold);
    font-weight: 700;
    font-size: 15px;
}

.special-card .special-prices .old-price {
    text-decoration: line-through;
    margin-left: 6px;
}

/* ─── Category Tabs ─── */
.category-tabs-wrapper {
    background: var(--white);
    border-bottom: 1px solid var(--grey-200);
    position: sticky;
    top: 60px;
    z-index: 90;
    overflow-x: auto;
}

.category-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 24px;
    min-width: max-content;
}

.cat-tab {
    padding: 8px 18px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--grey-600);
    cursor: pointer;
    border-radius: 20px;
    transition: all .2s;
    white-space: nowrap;
    font-family: inherit;
}

.cat-tab:hover { background: var(--grey-100); color: var(--grey-800); }
.cat-tab.active { background: var(--dark); color: var(--white); }

/* ─── Main Layout ─── */
.order-main {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    gap: 24px;
}

.menu-grid {
    flex: 1;
    min-width: 0;
}

.loading-spinner {
    text-align: center;
    padding: 60px;
    color: var(--grey-400);
    font-size: 15px;
}

/* ─── Category Section ─── */
.cat-section {
    margin-bottom: 32px;
}

.cat-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-section-desc {
    font-size: 13px;
    color: var(--grey-600);
    margin-bottom: 16px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ─── Menu Item Card ─── */
.item-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.item-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.item-card-desc {
    font-size: 12px;
    color: var(--grey-600);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-dark);
}

.item-card-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    background: #cce5ff;
    color: #004085;
}

.item-card-add {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s, box-shadow .2s;
    flex-shrink: 0;
}

.item-card-add:hover {
    transform: scale(1.12);
    box-shadow: 0 3px 10px rgba(201,160,80,.4);
}

.item-card-sides-info {
    font-size: 11px;
    color: var(--grey-400);
    margin-top: 4px;
}

/* ─── Cart Sidebar ─── */
.cart-sidebar {
    width: 360px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 136px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 160px);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--grey-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.cart-sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--grey-600);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--grey-400);
    font-size: 13px;
    line-height: 1.7;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--grey-200);
    align-items: flex-start;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.cart-item-details {
    font-size: 11px;
    color: var(--grey-400);
    margin-bottom: 6px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--grey-300);
    background: var(--white);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-weight: 600;
}

.qty-btn:hover { border-color: var(--gold); color: var(--gold); }
.qty-btn.remove:hover { border-color: var(--red); color: var(--red); }

.qty-num {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-dark);
    white-space: nowrap;
}

.cart-footer {
    border-top: 1px solid var(--grey-200);
    padding: 16px 20px;
}

.cart-totals { margin-bottom: 14px; }

.cart-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--grey-600);
}

.cart-total-row {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    padding-top: 8px;
    border-top: 1px solid var(--grey-200);
    margin-top: 8px;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.btn-checkout:hover { box-shadow: 0 4px 15px rgba(201,160,80,.4); transform: translateY(-1px); }
.btn-checkout:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ─── Modals ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-box-lg { max-width: 600px; }

.modal-box-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--grey-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-box-header h3 { font-size: 16px; font-weight: 700; }

.modal-box-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--grey-600);
    line-height: 1;
}

.modal-box-body { padding: 20px; }

.modal-box-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--grey-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    padding: 10px 20px;
    border: 1px solid var(--grey-300);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
}

.btn-add-to-cart {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    transition: all .2s;
}

.btn-add-to-cart:hover { box-shadow: 0 3px 10px rgba(201,160,80,.4); }

/* Sides modal sections */
.sides-section { margin-bottom: 20px; }
.sides-section h4 { font-size: 13px; font-weight: 600; color: var(--grey-600); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }

.side-option, .sauce-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
    margin-bottom: 4px;
}

.side-option:hover, .sauce-option:hover { background: var(--grey-100); }

.side-option input, .sauce-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
}

.side-option label, .sauce-option label {
    flex: 1;
    font-size: 13px;
    cursor: pointer;
}

.side-option .side-price {
    font-size: 12px;
    color: var(--grey-400);
    font-weight: 500;
}

.side-option .side-price.free {
    color: var(--green);
    font-weight: 600;
}

/* ─── Checkout ─── */
.checkout-step h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.fg { margin-bottom: 14px; }
.fg label { display: block; font-size: 12px; font-weight: 600; color: var(--grey-600); margin-bottom: 5px; }

.fi {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--grey-300);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color .2s;
}

.fi:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,160,80,.1); }

textarea.fi { resize: vertical; }

.pickup-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.pickup-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--grey-300);
    background: var(--white);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.pickup-btn.active { border-color: var(--gold); background: var(--gold-light); color: var(--dark); }

.btn-apply-coupon {
    padding: 10px 18px;
    background: var(--dark);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-back {
    width: 100%;
    padding: 10px;
    background: none;
    border: 1px solid var(--grey-300);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
    font-family: inherit;
}

.payment-summary {
    background: var(--grey-100);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 13px;
}

.payment-summary .ps-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.payment-summary .ps-total { font-size: 18px; font-weight: 700; color: var(--dark); border-top: 1px solid var(--grey-300); padding-top: 8px; margin-top: 8px; }

/* ─── Confirmation ─── */
.confirmation-screen {
    text-align: center;
    padding: 20px 0;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.confirmation-screen h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.confirm-order-num {
    font-size: 16px;
    color: var(--gold-dark);
    font-weight: 600;
    margin-bottom: 16px;
}

#confirm-details {
    text-align: left;
    background: var(--grey-100);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 13px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .cart-sidebar {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 100%;
        max-width: 400px;
        border-radius: 0;
        z-index: 150;
        max-height: 100vh;
        transform: translateX(100%);
        transition: transform .3s ease;
    }
    .cart-sidebar.open { transform: translateX(0); }
    .cart-sidebar-close { display: block; }
    .order-main { padding: 16px; }
}

@media (max-width: 600px) {
    .order-nav { padding: 0 16px; }
    .items-grid { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
    .modal-box { max-height: 95vh; }
    .category-tabs { padding: 8px 16px; }
}
