:root {
    --order-bg: #0a0a0a;
    --order-panel: #141414;
    --order-card: #1a1a1a;
    --order-border: #2a2a2a;
    --order-text: #f5f5f5;
    --order-muted: #a3a3a3;
    --order-accent: #ff7a00;
    --order-accent-soft: rgba(255, 122, 0, 0.15);
    --order-danger: #ef4444;
}

* {
    box-sizing: border-box;
}

body.order-body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--order-bg);
    color: var(--order-text);
    min-height: 100vh;
}

.order-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.order-header-bg {
    position: absolute;
    inset: 0;
    background-image: url("../img/hero-banner.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 72% center;
    z-index: 0;
}

.order-header-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 8, 8, 0.55) 0%, rgba(8, 8, 8, 0.18) 38%, rgba(8, 8, 8, 0.72) 100%),
        linear-gradient(90deg, rgba(8, 8, 8, 0.35) 0%, rgba(8, 8, 8, 0.05) 45%, rgba(8, 8, 8, 0.45) 100%);
}

.order-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 10px 8px;
}

.order-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.order-icon-btn,
.order-cart-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(20, 20, 20, 0.72);
    backdrop-filter: blur(10px);
    color: var(--order-text);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.order-cart-btn {
    position: relative;
    width: auto;
    padding: 0 10px;
    gap: 6px;
}

.order-brand {
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.order-brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-bottom: 0;
}

.order-brand h1 {
    margin: 0;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.order-tagline {
    display: none;
}

.order-delivery-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(18, 12, 8, 0.72);
    border: 1px solid rgba(255, 122, 0, 0.45);
    border-radius: 10px;
    padding: 5px 10px;
    margin-bottom: 0;
    backdrop-filter: blur(8px);
    font-size: 0.78rem;
}

.order-delivery-banner small {
    display: none;
}

.order-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 0.75rem;
}

.order-logout-btn {
    border: 0;
    background: transparent;
    color: var(--order-accent);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.order-login-gate {
    padding: 24px 16px 32px;
}

.order-login-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--order-panel);
    border: 1px solid var(--order-border);
    border-radius: 20px;
    padding: 24px;
}

.order-login-card h2 {
    margin: 0 0 8px;
}

.order-login-sub {
    margin: 0 0 16px;
    color: var(--order-muted);
}

.order-customer-summary {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    background: var(--order-card);
    border: 1px solid var(--order-border);
}

.order-customer-summary span {
    color: var(--order-muted);
    font-size: 0.92rem;
}

.order-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--order-accent);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.order-delivery-banner strong {
    display: block;
    color: var(--order-accent);
}

.order-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px 12px;
    scrollbar-width: none;
}

.order-tabs::-webkit-scrollbar {
    display: none;
}

.order-tab {
    flex: 0 0 auto;
    border: 1px solid var(--order-border);
    background: var(--order-panel);
    color: var(--order-text);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    white-space: nowrap;
}

.order-tab.active {
    background: var(--order-accent);
    border-color: var(--order-accent);
    color: #111;
    font-weight: 700;
}

.order-main {
    padding: 0 16px 32px;
}

.order-section h2,
.order-summary h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.order-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.order-product-card {
    background: var(--order-card);
    border: 1px solid var(--order-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.order-product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #222;
}

.order-product-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.order-product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.order-product-body h3 {
    margin: 0;
    font-size: 0.98rem;
}

.order-product-body p {
    margin: 0;
    color: var(--order-muted);
    font-size: 0.82rem;
    line-height: 1.35;
    flex: 1;
}

.order-product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.order-product-price {
    color: var(--order-accent);
    font-weight: 700;
}

.order-add-btn {
    border: 1px solid var(--order-accent);
    background: transparent;
    color: var(--order-accent);
    border-radius: 12px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    cursor: pointer;
}

.order-summary {
    margin-top: 24px;
    background: var(--order-panel);
    border: 1px solid var(--order-border);
    border-radius: 18px;
    padding: 16px;
}

.order-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--order-border);
}

.order-summary-item:last-child {
    border-bottom: 0;
}

.order-summary-item-main {
    flex: 1;
}

.order-summary-item-main strong {
    display: block;
}

.order-summary-item-main small {
    color: var(--order-muted);
}

.order-remove-btn {
    border: 0;
    background: transparent;
    color: var(--order-danger);
    cursor: pointer;
    font-size: 1rem;
}

.order-summary-total,
.order-checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 1.05rem;
}

.order-summary-total strong,
.order-checkout-total strong {
    color: var(--order-accent);
    font-size: 1.2rem;
}

.order-checkout-btn {
    width: 100%;
    margin-top: 14px;
    border: 0;
    border-radius: 14px;
    background: var(--order-accent);
    color: #111;
    font-weight: 700;
    padding: 14px 16px;
    cursor: pointer;
}

.order-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.order-info-cards article {
    background: var(--order-panel);
    border: 1px solid var(--order-border);
    border-radius: 16px;
    padding: 14px;
}

.order-info-cards span {
    font-size: 1.4rem;
}

.order-info-cards strong,
.order-info-cards small {
    display: block;
}

.order-info-cards small {
    color: var(--order-muted);
    margin-top: 4px;
}

.order-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.order-modal.hidden {
    display: none;
}

.order-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.order-modal-panel {
    position: relative;
    width: min(100%, 520px);
    max-height: 88vh;
    overflow: auto;
    background: var(--order-panel);
    border-radius: 20px 20px 0 0;
    padding: 16px;
    border-top: 1px solid var(--order-border);
}

.order-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-modal-head h3 {
    margin: 0;
}

.order-modal-sub {
    color: var(--order-muted);
    margin: 8px 0 12px;
}

.order-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 42vh;
    overflow: auto;
    margin-bottom: 12px;
}

.order-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--order-border);
    background: var(--order-card);
    cursor: pointer;
}

.order-option-row.selected {
    border-color: var(--order-accent);
    background: var(--order-accent-soft);
}

.order-option-row input {
    accent-color: var(--order-accent);
}

.order-modal-foot {
    display: grid;
    gap: 12px;
}

.order-qty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.order-qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--order-border);
    background: var(--order-card);
    color: var(--order-text);
    font-size: 1.2rem;
    cursor: pointer;
}

.order-form {
    display: grid;
    gap: 12px;
}

.order-form label {
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
}

.order-form input,
.order-form textarea {
    width: 100%;
    border: 1px solid var(--order-border);
    background: var(--order-card);
    color: var(--order-text);
    border-radius: 12px;
    padding: 12px;
    font: inherit;
}

.order-info-text {
    color: var(--order-muted);
    line-height: 1.5;
}

.order-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--order-border);
    z-index: 60;
    max-width: calc(100% - 32px);
}

.order-toast.success {
    border-color: #22c55e;
}

.order-toast.error {
    border-color: var(--order-danger);
}

.hidden {
    display: none !important;
}

@media (min-width: 768px) {
    .order-header-bg {
        background-position: center center;
        background-size: cover;
    }

    .order-header-inner {
        max-width: 960px;
        margin: 0 auto;
        width: 100%;
        padding: 6px 16px 8px;
    }

    .order-brand-logo {
        width: 32px;
        height: 32px;
    }

    .order-brand h1 {
        font-size: 1rem;
    }

    .order-tabs,
    .order-main {
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
    }

    .order-modal {
        align-items: center;
    }

    .order-modal-panel {
        border-radius: 20px;
    }
}
