/* Order page container */
.order-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 640px) {
    .order-page-container {
        padding: 0 0.75rem;
    }
}

/* Menu Layout */
.menu-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
    gap: 1rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .menu-layout {
        grid-template-columns: 1fr;
    }
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.category-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: #888;
}

.category-tab.active {
    color: #B71C1C;
    border-bottom-color: #B71C1C;
}

.category-tab:hover {
    color: #8b1515;
}

/* Menu Items */
.menu-items-container {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 0.5rem;
    padding: 1rem;
}

.menu-items-list {
    padding: 0.5rem 0;
}

.menu-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.menu-item-card {
    flex: 1;
    color: #333;
}

.menu-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-item-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #222;
}

.menu-item-price {
    font-size: 0.9rem;
    color: #666;
}

.menu-item-description {
    width: 100%;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.menu-item-size {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* Quantity Stepper */
.quantity-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid #9ca3af;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.stepper-btn:hover {
    background: #fee2e2;
}

.stepper-btn.plus:hover {
    background: #dcfce7;
}

.stepper-count {
    width: 2rem;
    text-align: center;
    font-weight: 700;
    color: #1c1917;
}

.stepper-input {
    width: 3.5rem;
    text-align: center;
    font-weight: 700;
    color: #1c1917;
    border: 1px solid #9ca3af;
    border-radius: 0.375rem;
    padding: 0.75rem 0.25rem;
    font-size: 1.1rem;
    box-sizing: border-box;
}

.stepper-input::-webkit-inner-spin-button,
.stepper-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper-input[type=number] {
    -moz-appearance: textfield;
}

.btn-add-item {
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #16a34a;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-add-item:hover {
    background: #15803d;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Cart */
.cart-container {
    background: #fff;
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 1rem;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #B71C1C;
    text-align: center;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 3px solid #B71C1C;
}

.cart-empty {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
    font-size: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.cart-item-name {
    font-weight: 500;
    color: #222;
    font-size: 0.9rem;
}

.cart-item-qty {
    font-size: 0.85rem;
    color: #666;
}

.cart-item-price {
    font-weight: 600;
    color: #222;
    font-size: 0.9rem;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 1rem 0 0.5rem;
    border-top: 2px solid #e5e7eb;
}

.cart-total-label {
    font-size: 1.1rem;
    color: #222;
}

.cart-total-value {
    font-size: 1.1rem;
    color: #B71C1C;
    font-weight: 700;
}

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.2rem;
    padding: 0 0.25rem;
}

.remove-btn:hover {
    color: #dc2626;
}

/* Submit Order Button */
.btn-red {
    width: 100%;
    background: #B71C1C;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-red:hover {
    background: #8b1515;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn-red:disabled {
    background: #e5e7eb;
    color: #888;
    cursor: not-allowed;
}

/* Order notes textarea */
.cart-notes {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    outline: none;
    resize: vertical;
    min-height: 60px;
    margin-top: 0.75rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cart-notes:focus {
    border-color: #B71C1C;
    box-shadow: 0 0 0 2px rgba(183, 28, 28, 0.15);
    background: #fff;
}

.cart-notes::placeholder {
    color: #aaa;
}

/* Skeleton loading */
.skeleton-block {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-category-tabs {
    display: flex;
    gap: 0;
    margin-top: 0.5rem;
}

.skeleton-tab {
    flex: 1;
    height: 48px;
    border-radius: 0;
}

.skeleton-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.skeleton-menu-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.skeleton-item-name { width: 60%; height: 18px; }
.skeleton-item-price { width: 30%; height: 14px; }
.skeleton-stepper { width: 96px; height: 32px; border-radius: 16px; flex-shrink: 0; }

.skeleton-cart-title {
    width: 50%;
    height: 20px;
    margin: 0 auto 1rem;
}

.skeleton-cart-empty {
    width: 70%;
    height: 14px;
    margin: 1.5rem auto;
}

/* Confirmation */
.confirmation-section {
    padding: 3rem 0;
    text-align: center;
}

.confirmation-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

.confirmation-message {
    color: #666;
    margin: 0 0 1.5rem;
}

.confirmation-order-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 2rem;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 320px;
    margin: 0 auto;
}

.btn-outline {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid #B71C1C;
    background: #fff;
    color: #B71C1C;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-outline:hover {
    background: #B71C1C;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Order History */
.order-history-page {
    min-height: 100%;
    background: #f7f7f8;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.order-history-header {
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.order-history-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.order-history-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-card {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.history-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.history-card-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-order-id {
    font-weight: 700;
    color: #222;
}

.history-date {
    font-size: 0.85rem;
    color: #888;
}

.history-card-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.history-total {
    font-weight: 700;
    color: #222;
}

.history-card-detail {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

.history-items-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.history-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.history-item-info {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.history-item-qty {
    font-size: 1rem;
    font-weight: 700;
    color: #B71C1C;
}

.history-item-name {
    color: #111;
    font-weight: 700;
    font-size: 1rem;
}

.history-item-unit-price {
    font-size: 0.85rem;
    color: #888;
}

.history-item-price {
    font-weight: 600;
    color: #222;
}

.history-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #555;
}

.history-rejection {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #991b1b;
}
