* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #d97706;
    --primary-dark: #b45309;
    --primary-light: #fff7ed;

    --text: #172033;
    --muted: #64748b;

    --border: #e2e8f0;
    --background: #f8fafc;
    --white: #ffffff;

    --danger: #e11d48;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}


/* =========================
   HEADER
========================= */

.top-header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-inner {
    max-width: 1400px;
    margin: auto;

    min-height: 78px;

    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;

    background: var(--primary);
    color: white;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 19px;
}

.brand h1 {
    font-size: 20px;
    font-weight: 800;
}

.brand span {
    display: block;

    margin-top: 2px;

    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.customer-info {
    text-align: right;
}

.customer-name-display {
    font-size: 12px;
    font-weight: 700;
}

.customer-table-display {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;

    margin-top: 3px;
}


/* =========================
   MAIN
========================= */

.main-container {
    max-width: 1400px;

    margin: auto;

    padding: 30px 24px;

    display: grid;

    grid-template-columns: minmax(0, 1fr) 380px;

    gap: 28px;
}


/* =========================
   MENU
========================= */

.section-heading h2 {
    font-size: 24px;
    font-weight: 800;
}

.section-heading p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 13px;
}

.category-container {
    display: flex;

    gap: 8px;

    margin: 22px 0;

    overflow-x: auto;

    padding-bottom: 5px;
}

.category-button {
    white-space: nowrap;

    border: 1px solid var(--border);

    background: white;

    color: var(--muted);

    padding: 10px 16px;

    border-radius: 12px;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.category-button:hover {
    border-color: var(--primary);
}

.category-button.active {
    background: var(--primary);

    color: white;

    border-color: var(--primary);
}


/* =========================
   PRODUCT
========================= */

.product-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.product-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 12px;

    transition: 0.2s;

    display: flex;

    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);

    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.product-image {
    width: 100%;

    height: 150px;

    object-fit: cover;

    border-radius: 13px;

    margin-bottom: 11px;
}

.product-name {
    font-size: 13px;

    font-weight: 800;

    color: var(--text);
}

.product-price {
    color: var(--primary);

    font-size: 13px;

    font-weight: 800;

    margin-top: 4px;
}

.product-stock {
    color: #94a3b8;

    font-size: 10px;

    margin-top: 3px;
}

.add-button {
    width: 100%;

    border: none;

    background: var(--primary-light);

    color: var(--primary-dark);

    border-radius: 11px;

    padding: 10px;

    margin-top: 12px;

    font-size: 11px;

    font-weight: 800;

    cursor: pointer;

    transition: 0.2s;
}

.add-button:hover {
    background: var(--primary);

    color: white;
}


/* =========================
   ORDER
========================= */

.order-section {
    position: relative;
}

.order-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 24px;

    padding: 20px;

    position: sticky;

    top: 100px;

    box-shadow: 0 5px 20px rgba(15, 23, 42, 0.03);
}

.order-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding-bottom: 15px;

    border-bottom: 1px solid #f1f5f9;
}

.order-header h3 {
    font-size: 15px;

    font-weight: 800;
}

.order-header h3 i {
    color: var(--primary);

    margin-right: 6px;
}

.order-header span {
    display: block;

    color: #94a3b8;

    font-size: 10px;

    margin-top: 3px;
}

.reset-button {
    border: none;

    background: none;

    color: var(--danger);

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;
}


/* =========================
   CART
========================= */

.cart-items {
    min-height: 180px;

    max-height: 350px;

    overflow-y: auto;

    padding: 12px 0;
}

.empty-cart {
    min-height: 180px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    color: #cbd5e1;
}

.empty-cart i {
    font-size: 30px;

    margin-bottom: 10px;
}

.empty-cart p {
    font-size: 12px;

    color: #64748b;

    font-weight: 700;
}

.empty-cart span {
    font-size: 10px;

    margin-top: 3px;
}

.cart-item {
    padding: 12px 0;

    border-bottom: 1px solid #f1f5f9;
}

.cart-item-top {
    display: flex;

    justify-content: space-between;

    gap: 10px;
}

.cart-item-name {
    font-size: 12px;

    font-weight: 700;
}

.cart-item-price {
    font-size: 12px;

    font-weight: 800;
}

.cart-controls {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 8px;
}

.quantity-controls {
    display: flex;

    align-items: center;

    gap: 8px;
}

.quantity-button {
    width: 25px;
    height: 25px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 7px;

    cursor: pointer;

    font-size: 11px;
}

.quantity-number {
    font-size: 11px;

    font-weight: 800;

    min-width: 15px;

    text-align: center;
}

.note-button {
    border: none;

    background: var(--primary-light);

    color: var(--primary-dark);

    border-radius: 8px;

    padding: 6px 8px;

    font-size: 9px;

    font-weight: 700;

    cursor: pointer;
}

.note-display {
    margin-top: 7px;

    background: #f8fafc;

    border-radius: 8px;

    padding: 7px;

    font-size: 9px;

    color: #64748b;
}


/* =========================
   PAYMENT
========================= */

.payment-section {
    border-top: 1px solid #f1f5f9;

    padding-top: 15px;
}

.section-label {
    color: #64748b;

    font-size: 10px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.05em;

    margin-bottom: 9px;
}

.payment-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 8px;
}

.payment-option {
    border: 1px solid var(--border);

    border-radius: 11px;

    padding: 10px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    font-size: 10px;

    font-weight: 800;

    transition: 0.2s;
}

.payment-option input {
    display: none;
}

.payment-option i {
    color: #94a3b8;
}

.payment-option.selected,
.payment-option:has(input:checked) {
    border-color: var(--primary);

    background: var(--primary-light);

    color: var(--primary-dark);
}

.payment-option:has(input:checked) i {
    color: var(--primary);
}


/* =========================
   TOTAL
========================= */

.total-section {
    border-top: 1px solid #f1f5f9;

    margin-top: 15px;

    padding-top: 15px;
}

.total-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 12px;
}

.total-row span {
    font-size: 12px;

    font-weight: 700;
}

.total-row strong {
    color: var(--primary);

    font-size: 17px;

    font-weight: 800;
}

.checkout-button {
    width: 100%;

    border: none;

    border-radius: 12px;

    padding: 13px;

    background: var(--primary);

    color: white;

    font-size: 12px;

    font-weight: 800;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 8px;

    cursor: pointer;

    transition: 0.2s;
}

.checkout-button:hover:not(:disabled) {
    background: var(--primary-dark);
}

.checkout-button:disabled {
    background: #cbd5e1;

    cursor: not-allowed;
}


/* =========================
   MODAL
========================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 100;

    background: rgba(15, 23, 42, 0.65);

    backdrop-filter: blur(6px);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;
}

.hidden {
    display: none !important;
}

.customer-box,
.receipt-box {
    width: 100%;

    max-width: 430px;

    background: white;

    border-radius: 25px;

    padding: 28px;

    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.brand-icon,
.success-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 16px;

    border-radius: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;
}

.brand-icon {
    background: var(--primary-light);

    color: var(--primary);
}

.success-icon {
    background: #dcfce7;

    color: #16a34a;
}

.customer-box h2,
.receipt-success h2 {
    text-align: center;

    font-size: 21px;

    font-weight: 800;
}

.modal-description,
.receipt-success p {
    text-align: center;

    color: var(--muted);

    font-size: 11px;

    margin-top: 6px;
}

.form-group {
    margin-top: 18px;
}

.form-group label {
    display: block;

    font-size: 10px;

    font-weight: 800;

    color: #475569;

    margin-bottom: 7px;
}

.form-group input {
    width: 100%;

    border: 1px solid var(--border);

    background: #f8fafc;

    border-radius: 11px;

    padding: 12px;

    outline: none;

    font-family: inherit;

    font-size: 12px;
}

.form-group input:focus {
    border-color: var(--primary);

    background: white;
}


/* =========================
   BUTTONS
========================= */

.primary-button,
.secondary-button {
    border: none;

    border-radius: 11px;

    padding: 12px 16px;

    font-family: inherit;

    font-size: 11px;

    font-weight: 800;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;
}

.primary-button {
    background: var(--primary);

    color: white;
}

.primary-button:hover {
    background: var(--primary-dark);
}

.secondary-button {
    background: #f1f5f9;

    color: #475569;
}


/* =========================
   RECEIPT
========================= */

.receipt-success {
    margin-bottom: 22px;
}

.receipt-content {
    background: #f8fafc;

    border-radius: 15px;

    padding: 15px;
}

.receipt-title {
    text-align: center;

    font-size: 15px;

    font-weight: 800;

    margin-bottom: 12px;
}

.receipt-info {
    display: flex;

    justify-content: space-between;

    font-size: 10px;

    margin-bottom: 7px;
}

.receipt-items {
    border-top: 1px dashed #cbd5e1;

    border-bottom: 1px dashed #cbd5e1;

    padding: 10px 0;

    margin: 10px 0;
}

.receipt-item {
    display: flex;

    justify-content: space-between;

    font-size: 10px;

    margin-bottom: 6px;
}

.receipt-item:last-child {
    margin-bottom: 0;
}

.receipt-total {
    display: flex;

    justify-content: space-between;

    font-size: 13px;

    font-weight: 800;
}

.receipt-status {
    text-align: center;

    margin-top: 12px;

    padding: 8px;

    border-radius: 8px;

    background: #dcfce7;

    color: #15803d;

    font-size: 10px;

    font-weight: 800;
}

.receipt-actions {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;

    margin-top: 15px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .main-container {
        grid-template-columns: 1fr;
    }

    .order-card {
        position: static;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 650px) {

    .header-inner {
        padding: 0 15px;
    }

    .main-container {
        padding: 20px 15px;
    }

    .brand span {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);

        gap: 10px;
    }

    .product-image {
        height: 125px;
    }

    .order-card {
        padding: 16px;
    }

    .customer-box,
    .receipt-box {
        padding: 22px;
    }
}