/* City Pizza — order.html: categories / products / delivery+cart+checkout */

.order-layout { display: flex; gap: 28px; align-items: flex-start; }

/* --- Category nav (left) --- */
.category-nav-wrap { flex: 0 0 210px; }
.category-nav { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 20px; }
.category-item {
    display: flex; align-items: center; gap: 10px;
    text-align: left; padding: 13px 16px; border-radius: 12px;
    border: 1px solid #eee; background: #fff; font-weight: 600; font-size: 14px; color: #0e1318;
    transition: all .2s ease; cursor: pointer;
}
.category-item:hover { border-color: #ff8e28; color: #ff8e28; }
.category-item.active { background: #ff8e28; color: #fff; border-color: #ff8e28; box-shadow: 0 10px 20px rgba(255,142,40,.25); }
.category-item .count {
    margin-left: auto; font-size: 11px; background: rgba(0,0,0,.08); border-radius: 20px; padding: 2px 8px;
}
.category-item.active .count { background: rgba(255,255,255,.25); }

/* --- Product grid (center) --- */
.product-grid-wrap { flex: 1 1 auto; min-width: 0; }
.product-grid-heading { font-size: 20px; font-weight: 700; color: #0e1318; margin: 0 0 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.product-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(14,19,24,.06); display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(14,19,24,.1); }
.product-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.product-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card h4 { margin: 0; font-size: 15.5px; font-weight: 700; color: #0e1318; }
.product-card .subtitle { font-size: 12px; color: #8a8f94; margin-bottom: 4px; }
.product-card .price { margin-top: auto; font-weight: 700; color: #ff8e28; font-size: 15px; }
.product-add-btn {
    margin-top: 10px; height: 42px; border-radius: 10px; background: #0e1318; color: #fff;
    border: none; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: background .2s ease;
}
.product-add-btn:hover { background: #ff8e28; }
.product-add-btn .las { font-size: 15px; }

/* --- Right sidebar: delivery card + cart --- */
.order-sidebar { flex: 0 0 320px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.order-sidebar .default-btn { width: 100%; text-align: center; }

.cart-panel { background: #fff; border-radius: 16px; box-shadow: 0 15px 40px rgba(14,19,24,.08); padding: 22px; }
.cart-panel h4 { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: #0e1318; }
.cart-empty { color: #8a8f94; font-size: 13px; text-align: center; padding: 24px 0; }
.cart-empty i { font-size: 26px; color: #d7dadd; display: block; margin-bottom: 8px; }

.cart-item-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.cart-item-row:last-child { border-bottom: none; }
.cart-item-row .name { flex: 1; font-size: 13.5px; font-weight: 600; color: #0e1318; }
.cart-item-row .qty-controls { display: flex; align-items: center; gap: 6px; }
.cart-item-row .qty-controls button {
    width: 24px; height: 24px; border-radius: 50%; border: 1px solid #eee; background: #f5f6f7;
    font-weight: 700; line-height: 1; color: #0e1318; display: flex; align-items: center; justify-content: center;
}
.cart-item-row .qty-controls .qty-val { min-width: 16px; text-align: center; font-size: 13px; font-weight: 700; }
.cart-item-row .line-price { font-size: 13.5px; font-weight: 700; width: 62px; text-align: right; color: #0e1318; }

.cart-totals { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #e0e0e0; display: flex; flex-direction: column; gap: 6px; }
.cart-totals .row { display: flex; justify-content: space-between; font-size: 13px; color: #666; }
.cart-totals .row.grand { font-size: 16.5px; font-weight: 700; color: #0e1318; margin-top: 6px; padding-top: 10px; border-top: 1px solid #eee; }

.cart-checkout-btn {
    margin-top: 16px; width: 100%; height: 52px; border-radius: 12px; background: #ff8e28; color: #fff;
    font-weight: 700; font-size: 14.5px; border: none; transition: background .2s ease;
}
.cart-checkout-btn:hover:not(:disabled) { background: #e87c15; }
.cart-checkout-btn:disabled { background: #f0d8bb; cursor: not-allowed; }

/* --- Mobile sticky cart bar --- */
.mobile-cart-bar {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
    background: #0e1318; color: #fff; padding: 14px 18px; align-items: center; justify-content: space-between;
    box-shadow: 0 -10px 30px rgba(0,0,0,.25);
}
.mobile-cart-bar .info { font-size: 13.5px; }
.mobile-cart-bar .info strong { display: block; font-size: 15px; }
.mobile-cart-bar button {
    background: #ff8e28; color: #fff; border: none; border-radius: 10px; padding: 12px 20px; font-weight: 700; font-size: 13.5px;
}

/* --- Checkout modal (extends .order-modal-overlay/.order-modal-box) --- */
.checkout-modal-box { max-width: 560px; max-height: 88vh; overflow-y: auto; text-align: left; }
.checkout-mode-pill {
    display: inline-block; background: #fff3e6; color: #ff8e28; font-weight: 700; font-size: 12px;
    padding: 4px 12px; border-radius: 20px; margin-bottom: 14px;
}
.checkout-summary { background: #f5f6f7; border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.checkout-summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: #333; }
.checkout-summary-totals { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d7dadd; }
.checkout-summary-totals .row { display: flex; justify-content: space-between; font-size: 12.5px; color: #666; padding: 2px 0; }
.checkout-summary-totals .row.grand { font-size: 15px; font-weight: 700; color: #0e1318; margin-top: 4px; }

.checkout-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.checkout-form-grid .full-width { grid-column: 1 / -1; }
.checkout-input {
    height: 48px; border-radius: 10px; border: 1px solid #eee; background: #f5f6f7;
    padding: 0 14px; font-size: 13.5px; width: 100%; color: #0e1318;
}
.checkout-input::placeholder { color: #8a8f94; }
textarea.checkout-input { height: 80px; padding: 12px 14px; resize: vertical; }
.checkout-field-label { font-size: 11.5px; font-weight: 700; color: #8a8f94; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; display: block; }

.payment-options { display: flex; gap: 10px; margin-bottom: 16px; }
.payment-option {
    flex: 1; border: 1px solid #eee; border-radius: 12px; padding: 14px 10px; text-align: center;
    cursor: pointer; font-weight: 700; font-size: 13.5px; color: #0e1318; transition: all .2s ease;
}
.payment-option i { display: block; font-size: 20px; margin-bottom: 6px; color: #8a8f94; }
.payment-option.active { border-color: #ff8e28; background: #fff3e6; color: #ff8e28; }
.payment-option.active i { color: #ff8e28; }

.checkout-privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #666; margin-bottom: 18px; line-height: 1.5; }
.checkout-privacy input { margin-top: 3px; flex: 0 0 auto; }

.checkout-submit-btn {
    width: 100%; height: 52px; border-radius: 12px; background: #ff8e28; color: #fff;
    font-weight: 700; font-size: 14.5px; border: none; transition: background .2s ease;
}
.checkout-submit-btn:hover:not(:disabled) { background: #e87c15; }
.checkout-submit-btn:disabled { background: #f0d8bb; cursor: not-allowed; }

/* --- Responsive --- */
@media (max-width: 991px) {
    .order-layout { flex-direction: column; }
    .category-nav-wrap { flex: none; width: 100%; }
    .category-nav {
        flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 6px;
        position: static; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .category-nav::-webkit-scrollbar { display: none; }
    .category-item { flex: 0 0 auto; white-space: nowrap; }
    .order-sidebar { flex: none; width: 100%; position: static; padding-bottom: 90px; }
    .mobile-cart-bar.active { display: flex; }
}

@media (max-width: 767px) {
    .order-layout { gap: 20px; }
    .checkout-form-grid { grid-template-columns: 1fr; }
    .checkout-modal-box { max-height: 100vh; height: 100%; border-radius: 0; width: 100%; max-width: 100%; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .product-card img { height: 120px; }
}
