/* Restaurant Ordering */
.rord-menu,
.rord-picker,
.rord-modal {
	--rord-primary: #e4002b;
	--rord-text: #1f2328;
	--rord-muted: #6b7280;
	--rord-border: #e5e7eb;
	--rord-bg: #ffffff;
	--rord-soft: #f6f7f9;
	--rord-radius: 12px;
	--rord-sticky-top: 90px;
}

.rord-menu { color: var(--rord-text); position: relative; }
.rord-menu *, .rord-modal * { box-sizing: border-box; }

/* Buttons */
.rord-btn,
.rord-modal .single_add_to_cart_button {
	display: inline-flex; align-items: center; justify-content: center; gap: 4px;
	width: 100%; padding: 14px 18px; border: 0; border-radius: 999px;
	background: var(--rord-primary) !important; color: #fff !important;
	font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: filter .15s ease;
}
.rord-btn:hover, .rord-modal .single_add_to_cart_button:hover { filter: brightness(.92); color: #fff; }
.rord-btn.is-disabled, .rord-btn:disabled, .rord-modal .single_add_to_cart_button.disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* Top bar */
.rord-topbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.rord-service-bar {
	display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px;
	border: 1px solid var(--rord-border); border-radius: 999px; background: var(--rord-bg);
	color: var(--rord-text); font-size: 15px; cursor: pointer;
}
.rord-service-bar:hover { border-color: var(--rord-primary); }
.rord-service-icon { width: 10px; height: 10px; border-radius: 50%; background: var(--rord-primary); }
.rord-service-summary { font-weight: 600; }
.rord-service-change { color: var(--rord-primary); font-size: 13px; text-decoration: underline; }
.rord-search { flex: 1 1 240px; }
.rord-search-input {
	width: 100%; padding: 11px 16px !important; border: 1px solid var(--rord-border) !important;
	border-radius: 999px !important; background: var(--rord-soft) !important; font-size: 15px; height: auto !important;
}
.rord-closed-banner {
	margin-bottom: 20px; padding: 12px 16px; border-radius: var(--rord-radius);
	background: #fff4e5; color: #8a4b00; border: 1px solid #ffd8a8;
}
.rord-closed-banner[hidden] { display: none; }

/* Layout */
.rord-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.rord-catalog .rord-layout { grid-template-columns: 200px minmax(0, 1fr); }

/* Categories */
.rord-cats { position: sticky; top: var(--rord-sticky-top); }
.rord-cats ul { list-style: none; margin: 0; padding: 0; }
.rord-cats li { margin: 0; padding: 0; }
.rord-cats a {
	display: flex; justify-content: space-between; align-items: center; gap: 8px;
	padding: 9px 12px; border-radius: 8px; color: var(--rord-text); text-decoration: none; font-size: 15px;
}
.rord-cats a:hover { background: var(--rord-soft); }
.rord-cats a.is-active { background: var(--rord-primary); color: #fff; }
.rord-count { font-size: 12px; opacity: .65; }

/* Products */
.rord-category { margin-bottom: 36px; scroll-margin-top: var(--rord-sticky-top); }
.rord-category-title { margin: 0 0 6px; font-size: 24px; }
.rord-category-desc { margin: 0 0 14px; color: var(--rord-muted); }
.rord-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.rord-cols-2 .rord-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rord-item {
	position: relative; display: flex; gap: 14px; justify-content: space-between;
	padding: 14px; border: 1px solid var(--rord-border); border-radius: var(--rord-radius);
	background: var(--rord-bg); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.rord-catalog .rord-item { cursor: default; }
.rord-item:hover, .rord-item:focus-visible { border-color: #cfd4da; box-shadow: 0 4px 16px rgba(0,0,0,.06); outline: none; }
.rord-item-body { flex: 1; min-width: 0; padding-right: 36px; }
.rord-item-title { margin: 0 0 4px !important; font-size: 16px !important; line-height: 1.3 !important; }
.rord-item-desc { margin: 0 0 8px; color: var(--rord-muted); font-size: 14px; line-height: 1.45; }
.rord-item-price { font-weight: 600; }
.rord-item-price del { opacity: .5; font-weight: 400; margin-right: 4px; }
.rord-item-media { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--rord-soft); }
.rord-item-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rord-add {
	position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; padding: 0;
	border: 0; border-radius: 50%; background: var(--rord-primary); color: #fff;
	font-size: 22px; line-height: 34px; text-align: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.rord-add.is-loading { opacity: .5; pointer-events: none; }
.rord-soldout { opacity: .6; }
.rord-soldout-label { position: absolute; right: 12px; bottom: 12px; font-size: 12px; font-weight: 600; color: var(--rord-muted); text-transform: uppercase; }
.rord-no-results, .rord-empty-menu { color: var(--rord-muted); }
.rord-no-results[hidden] { display: none; }

/* Side cart */
.rord-cart {
	position: sticky; top: var(--rord-sticky-top); max-height: calc(100vh - var(--rord-sticky-top) - 20px);
	overflow-y: auto; padding: 18px; border: 1px solid var(--rord-border); border-radius: var(--rord-radius); background: var(--rord-bg);
}
.rord-cart.is-loading { opacity: .6; pointer-events: none; }
.rord-cart-close { display: none; }
.rord-cart-head h3 { margin: 0 0 12px !important; font-size: 18px !important; }
.rord-cart-empty, .rord-cart-loading { color: var(--rord-muted); margin: 0; }
.rord-cart-items { list-style: none; margin: 0 0 12px; padding: 0; }
.rord-cart-item { padding: 12px 0; border-bottom: 1px solid var(--rord-border); margin: 0; }
.rord-cart-item-main { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14px; }
.rord-cart-item .variation { margin: 4px 0 0; font-size: 12px; color: var(--rord-muted); display: grid; grid-template-columns: auto 1fr; gap: 0 6px; }
.rord-cart-item .variation dt, .rord-cart-item .variation dd { margin: 0; padding: 0; float: none; }
.rord-cart-item .variation dd p { margin: 0; }
.rord-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rord-qty-btn {
	width: 28px; height: 28px; padding: 0; border: 1px solid var(--rord-border); border-radius: 50%;
	background: var(--rord-bg); color: var(--rord-text); font-size: 16px; line-height: 26px; cursor: pointer;
}
.rord-qty-btn:hover { border-color: var(--rord-primary); color: var(--rord-primary); }
.rord-qty-value { min-width: 18px; text-align: center; font-weight: 600; }
.rord-remove { margin-left: auto; padding: 0; border: 0; background: none; color: var(--rord-muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.rord-cart-totals { display: flex; justify-content: space-between; margin: 4px 0 14px; font-size: 16px; }
.rord-cart-notice { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #fff4e5; color: #8a4b00; font-size: 13px; }

/* Floating cart button (mobile) */
.rord-cart-fab { display: none; }

/* Modals */
.rord-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rord-modal[hidden] { display: none; }
.rord-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 17, 20, .55); opacity: 0; transition: opacity .2s ease; }
.rord-modal-box {
	position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto;
	background: var(--rord-bg); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
	transform: translateY(16px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.rord-modal.is-open .rord-modal-backdrop { opacity: 1; }
.rord-modal.is-open .rord-modal-box { transform: none; opacity: 1; }
.rord-modal-small { max-width: 420px; padding: 24px; }
.rord-modal-close {
	position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; padding: 0;
	border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--rord-text);
	font-size: 24px; line-height: 36px; cursor: pointer; box-shadow: 0 1px 6px rgba(0,0,0,.15);
}
.rord-modal-loading { padding: 40px 24px; text-align: center; color: var(--rord-muted); }
.rord-modal-image img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.rord-modal-body { padding: 20px 24px 24px; }
.rord-modal-title { margin: 0 0 4px !important; font-size: 22px !important; }
.rord-modal-price { font-weight: 600; margin-bottom: 10px; }
.rord-modal-desc { color: var(--rord-muted); font-size: 14px; }
.rord-modal-desc p { margin: 0 0 8px; }
.rord-modal form.cart { margin: 16px 0 0 !important; display: block !important; }
.rord-modal form.cart .variations { width: 100%; margin-bottom: 12px; border: 0; }
.rord-modal form.cart .variations th, .rord-modal form.cart .variations td { display: block; padding: 0 0 6px; border: 0; text-align: left; }
.rord-modal form.cart .variations select { width: 100%; }
.rord-modal .single_variation_wrap .woocommerce-variation-price { display: none; }
.rord-modal .woocommerce-variation-add-to-cart,
.rord-modal form.cart:not(.variations_form) { display: flex !important; flex-wrap: wrap; gap: 10px; align-items: center; }
.rord-modal .rord-addons, .rord-modal .rord-item-note { flex: 1 1 100%; width: 100%; }
.rord-modal .quantity { flex: 0 0 auto; margin: 0 !important; }
.rord-modal .single_add_to_cart_button { flex: 1 1 auto; width: auto; }

/* Add-ons */
.rord-addons { margin: 0 0 8px; }
.rord-addon-group { margin: 0 0 16px; padding: 0; border: 0; }
.rord-addon-group legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; margin-bottom: 8px; padding: 0; font-weight: 600; }
.rord-addon-badge { padding: 2px 8px; border-radius: 999px; background: var(--rord-soft); color: var(--rord-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.rord-addon-hint { color: var(--rord-muted); font-size: 12px; font-weight: 400; }
.rord-addon-group.has-error legend .rord-addon-title { color: #c62828; }
.rord-addon-group.has-error .rord-addon-badge { background: #fdecea; color: #c62828; }
.rord-addon-option {
	display: flex !important; align-items: center; gap: 10px; margin: 0 !important; padding: 10px 2px;
	border-bottom: 1px solid var(--rord-border); cursor: pointer; font-weight: 400;
}
.rord-addon-option input { margin: 0 !important; accent-color: var(--rord-primary); width: 18px; height: 18px; }
.rord-addon-name { flex: 1; }
.rord-addon-price { color: var(--rord-muted); font-size: 14px; }
.rord-item-note label { display: block; font-weight: 600; margin-bottom: 6px; }
.rord-item-note textarea { width: 100%; border-radius: 8px; }

/* Pickup / delivery picker */
.rord-picker h3 { margin: 0 0 16px !important; font-size: 20px !important; }
.rord-service-toggle { display: flex; gap: 6px; padding: 4px; margin-bottom: 16px; border-radius: 999px; background: var(--rord-soft); }
.rord-service-option { flex: 1; margin: 0 !important; cursor: pointer; }
.rord-service-option input { position: absolute; opacity: 0; pointer-events: none; }
.rord-service-option span { display: block; padding: 10px 12px; border-radius: 999px; text-align: center; font-weight: 600; transition: background .15s ease; }
.rord-service-option input:checked + span { background: var(--rord-primary); color: #fff; }
.rord-service-option input:focus-visible + span { outline: 2px solid var(--rord-primary); outline-offset: 2px; }
.rord-modal .rord-time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.rord-modal .rord-time-fields label { display: block; font-weight: 600; font-size: 13px; }
.rord-modal .rord-time-fields select { display: block; width: 100%; margin-top: 6px; padding: 10px; border-radius: 8px; }
.rord-closed-note, .rord-picker-error { margin: 0 0 14px; color: #8a4b00; }
.rord-picker-error { color: #c62828; }
.rord-closed-note[hidden], .rord-picker-error[hidden] { display: none; }

/* Checkout */
.rord-checkout-service { margin-bottom: 28px; padding: 20px; border: 1px solid var(--rord-border); border-radius: var(--rord-radius); }
.rord-checkout-service .rord-service-toggle { max-width: 420px; }
.rord-checkout-service select { width: 100%; }
form.checkout.rord-is-pickup #billing_address_1_field,
form.checkout.rord-is-pickup #billing_address_2_field,
form.checkout.rord-is-pickup #billing_city_field,
form.checkout.rord-is-pickup #billing_state_field,
form.checkout.rord-is-pickup #billing_postcode_field,
form.checkout.rord-is-pickup #billing_country_field,
form.checkout.rord-is-pickup #billing_company_field,
form.checkout.rord-is-pickup .woocommerce-shipping-fields { display: none !important; }
.rord-order-details { padding: 12px 16px; border-radius: 8px; background: #f6f7f9; }

/* Toast */
.rord-toast {
	position: fixed; left: 50%; bottom: 90px; z-index: 100001; max-width: calc(100vw - 32px);
	padding: 12px 18px; border-radius: 999px; background: #1f2328; color: #fff; font-size: 14px;
	transform: translate(-50%, 20px); opacity: 0; transition: all .25s ease; pointer-events: none;
}
.rord-toast.is-error { background: #c62828; border-radius: 12px; }
.rord-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

body.rord-noscroll { overflow: hidden; }

/* Tablet: cart becomes a drawer */
@media (max-width: 1100px) {
	.rord-layout { grid-template-columns: 180px minmax(0, 1fr); }
	.rord-cart {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 99999; width: min(400px, 100%); max-height: none;
		border-radius: 0; border: 0; box-shadow: none; visibility: hidden;
		transform: translateX(100%); transition: transform .25s ease, visibility .25s; padding-top: 56px;
	}
	.rord-cart-open .rord-cart { transform: none; visibility: visible; box-shadow: -10px 0 40px rgba(0,0,0,.2); }
	.rord-cart-close {
		display: block; position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; padding: 0;
		border: 0; background: none; font-size: 28px; line-height: 36px; color: var(--rord-text); cursor: pointer;
	}
	.rord-cart-fab:not([hidden]) {
		position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999;
		display: flex; align-items: center; gap: 12px; padding: 14px 20px; border: 0; border-radius: 999px;
		background: var(--rord-primary); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
		box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 560px; margin: 0 auto;
	}
	.rord-fab-count { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.25); line-height: 26px; text-align: center; font-size: 14px; }
	.rord-fab-label { flex: 1; text-align: left; }
}

/* Phone: categories become a horizontal sticky bar */
@media (max-width: 900px) {
	.rord-layout, .rord-catalog .rord-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.rord-cats { top: 0; z-index: 50; margin: 0 -16px; padding: 8px 16px; background: var(--rord-bg); border-bottom: 1px solid var(--rord-border); }
	.rord-cats ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
	.rord-cats ul::-webkit-scrollbar { display: none; }
	.rord-cats a { white-space: nowrap; padding: 8px 14px; border: 1px solid var(--rord-border); border-radius: 999px; }
	.rord-count { display: none; }
	.rord-cols-2 .rord-grid { grid-template-columns: 1fr; }
	.rord-category { scroll-margin-top: 70px; }
	.rord-item-media { flex-basis: 84px; width: 84px; height: 84px; }
	.rord-modal { padding: 0; align-items: flex-end; }
	.rord-modal-box { max-height: 92vh; border-radius: 16px 16px 0 0; }
	.rord-menu { padding-bottom: 80px; }
}
