/* Restaurant Menu for WooCommerce  — by Evening Xpert
 * -------------------------------------------------- */
:root {
	--rmw-primary: #1ba672;
	--rmw-text: #1c1c1c;
	--rmw-muted: #6b6b6b;
	--rmw-radius: 10px;      /* product image radius (overridden from settings) */
	--rmw-card-radius: 10px; /* card box radius */
}

/* Menu wrapper: responsive grid (column count set via .rmw-cols-N) */
ul.products.rmw-menu-list,
.rmw-shortcode-wrap ul.products {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 20px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

/* Desktop columns (applies at all widths, overridden below for tablet/mobile) */
ul.products.rmw-cols-1 { grid-template-columns: 1fr !important; }
ul.products.rmw-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
ul.products.rmw-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
ul.products.rmw-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

/* Tablet columns (768px – 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
	ul.products.rmw-cols-t-1 { grid-template-columns: 1fr !important; }
	ul.products.rmw-cols-t-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	ul.products.rmw-cols-t-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
	ul.products.rmw-cols-t-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* Mobile columns (≤767px) */
@media (max-width: 767px) {
	ul.products.rmw-cols-m-1 { grid-template-columns: 1fr !important; }
	ul.products.rmw-cols-m-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	ul.products.rmw-cols-m-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
	ul.products.rmw-cols-m-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

ul.products.rmw-menu-list::before,
ul.products.rmw-menu-list::after,
.rmw-shortcode-wrap ul.products::before,
.rmw-shortcode-wrap ul.products::after {
	display: none !important;
	content: none !important;
}

/* ---- Card (white box) ---- */
li.product.rmw-card {
	display: flex !important;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	clear: both !important;
	margin: 0 !important;
	padding: 16px !important;
	background: #fff;
	border: 1px solid #eee;
	border-radius: var(--rmw-card-radius);
	box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
	box-sizing: border-box;
	color: var(--rmw-text);
	text-align: left;
	transition: box-shadow .15s ease, transform .15s ease;
}
li.product.rmw-card::before { display: none !important; }
li.product.rmw-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
	transform: translateY(-1px);
}

/* ---- Left column: text ---- */
.rmw-card-info {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 2px;
}

.rmw-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 600;
	color: var(--rmw-muted);
	margin-bottom: 8px;
}
.rmw-badge-bar {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 6px;
	border-radius: 6px;
	background: #e6e6e6;
	overflow: hidden;
}
.rmw-badge-bar::after {
	content: "";
	position: absolute;
	inset: 0 35% 0 0;
	background: var(--rmw-primary);
	border-radius: 6px;
}

.rmw-title {
	margin: 0 0 8px !important;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 9px;
}
.rmw-title a {
	color: var(--rmw-text);
	text-decoration: none;
	box-shadow: none;
}
.rmw-title a:hover { color: var(--rmw-primary); }

/* Veg / Non-veg mark */
.rmw-food-mark {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}
.rmw-food-mark::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
}
.rmw-food-veg { border: 1.5px solid #0f8a3c; }
.rmw-food-veg::before { background: #0f8a3c; }
.rmw-food-nonveg { border: 1.5px solid #c0392b; }
.rmw-food-nonveg::before { background: #c0392b; }

.rmw-price {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 8px;
	color: var(--rmw-text);
	display: block;
	white-space: normal;
}
.rmw-price del,
.rmw-price ins,
.rmw-price bdi,
.rmw-price .woocommerce-Price-amount { display: inline !important; float: none !important; }
.rmw-price del { color: var(--rmw-muted); font-weight: 400; margin-right: 6px; text-decoration: line-through; }
.rmw-price ins { text-decoration: none; background: transparent; }

.rmw-desc {
	font-size: 14px;
	line-height: 1.5;
	color: var(--rmw-muted);
	margin: 0;
}

/* ---- Right column: image + (ADD button BELOW the image) ---- */
.rmw-card-media {
	flex: 0 0 clamp(112px, 30vw, 150px);
	width: clamp(112px, 30vw, 150px);
	max-width: clamp(112px, 30vw, 150px);
	min-width: 0;
	text-align: center;
	position: static !important;
}

.rmw-thumb {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	border-radius: var(--rmw-radius);
	overflow: hidden;
	background: transparent;
	line-height: 0;
	position: static !important;
	float: none !important;
	margin: 0 !important;
}
.rmw-thumb img {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;          /* keep the image's own aspect ratio — no crop */
	object-fit: initial;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: var(--rmw-radius);
	display: block;
	position: static !important;
	float: none !important;
	transform: none !important;
	inset: auto !important;
}

/* Action sits in normal flow, BELOW the image */
.rmw-action {
	margin-top: 10px;
	width: 100%;
}

.rmw-add-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 100%;
	padding: clamp(9px, 2.4vw, 11px) 8px;
	background: #fff;
	color: var(--rmw-primary);
	border: 1.5px solid rgba(27, 166, 114, .55);
	border-radius: 10px;
	font-size: clamp(13px, 3.2vw, 15px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: .5px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(27, 166, 114, .12);
	transition: background .12s ease, color .12s ease, box-shadow .12s ease, transform .08s ease;
}
.rmw-add-btn:hover { background: var(--rmw-primary); color: #fff; box-shadow: 0 4px 12px rgba(27, 166, 114, .28); }
.rmw-add-btn:active { transform: scale(.97); }
.rmw-add-btn .rmw-plus {
	position: relative;
	top: -5px;
	font-size: 11px;
	font-weight: 700;
}

/* Quantity stepper (- 1 +) */
.rmw-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: #fff;
	border: 1.5px solid rgba(27, 166, 114, .55);
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(27, 166, 114, .12);
	overflow: hidden;
}
.rmw-step {
	flex: 0 0 32%;
	height: clamp(38px, 10vw, 42px);
	border: 0;
	background: transparent;
	color: var(--rmw-primary);
	font-size: clamp(16px, 4.4vw, 20px);
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.rmw-step:active { background: rgba(27, 166, 114, .10); }
.rmw-qty {
	flex: 1 1 auto;
	text-align: center;
	font-size: clamp(13px, 3.4vw, 15px);
	font-weight: 700;
	color: var(--rmw-primary);
}

/* customisable + sold out */
.rmw-customisable {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	color: var(--rmw-muted);
	text-align: center;
}
.rmw-soldout {
	display: inline-flex;
	width: 100%;
	justify-content: center;
	margin-top: 10px;
	padding: 11px 10px;
	background: #f4f4f4;
	color: var(--rmw-muted);
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
}

/* Loading + visibility helpers */
.rmw-hidden { display: none !important; }
.rmw-loading { opacity: .55; pointer-events: none; }

/* Optional credit */
.rmw-credit {
	text-align: center;
	font-size: 12px;
	color: var(--rmw-muted);
	padding: 6px 0 2px;
	clear: both;
	grid-column: 1 / -1;
}
.rmw-credit a { color: var(--rmw-primary); text-decoration: none; font-weight: 600; }
.rmw-credit a:hover { text-decoration: underline; }

/* ---- Mobile: keep the horizontal card (name+price left, image right) ---- */
@media (max-width: 767px) {
	li.product.rmw-card {
		flex-direction: row !important;
		align-items: flex-start !important;
		gap: 12px;
		padding: 14px !important;
	}
	.rmw-card .rmw-card-media {
		flex: 0 0 120px !important;
		width: 120px !important;
		max-width: 120px !important;
	}
	.rmw-card .rmw-thumb img { width: 100% !important; height: auto !important; }
	.rmw-title { font-size: 17px; }
	.rmw-price { font-size: 15px; }
	.rmw-desc { font-size: 13px; }
}
@media (max-width: 380px) {
	li.product.rmw-card { padding: 12px !important; gap: 10px; }
	.rmw-card .rmw-card-media { flex: 0 0 104px !important; width: 104px !important; max-width: 104px !important; }
	.rmw-title { font-size: 16px; }
}

.rmw-empty { padding: 20px 4px; color: var(--rmw-muted); font-size: 15px; }

/* ===== Carousel (slider) mode ===== */
.rmw-carousel { position: relative; }
.rmw-carousel ul.products,
.rmw-shortcode-wrap.rmw-carousel ul.products {
	display: flex !important;
	grid-template-columns: none !important;
	flex-wrap: nowrap !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: 16px !important;
	padding: 4px 2px 12px !important;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}
.rmw-carousel ul.products::-webkit-scrollbar { height: 6px; }
.rmw-carousel ul.products::-webkit-scrollbar-thumb { background: #ddd; border-radius: 6px; }

.rmw-carousel li.product.rmw-card {
	flex: 0 0 clamp(240px, 80vw, 300px) !important;
	width: clamp(240px, 80vw, 300px) !important;
	max-width: clamp(240px, 80vw, 300px) !important;
	scroll-snap-align: start;
	flex-direction: column !important;
	align-items: stretch !important;
}
.rmw-carousel li.product.rmw-card .rmw-card-info { order: 0; width: 100%; }
.rmw-carousel li.product.rmw-card .rmw-card-media {
	order: 1;
	flex: 1 1 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-top: 6px;
	text-align: center;
}
.rmw-carousel li.product.rmw-card .rmw-thumb img { width: 100% !important; max-width: 100% !important; height: auto !important; }
.rmw-carousel li.product.rmw-card .rmw-action { width: 100% !important; max-width: 280px !important; margin: 10px auto 0 !important; }

/* nav arrows */
.rmw-nav {
	position: absolute;
	top: 42%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #e6e6e6;
	background: #fff;
	color: var(--rmw-primary);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .14);
	transition: background .12s ease, color .12s ease;
}
.rmw-nav:hover { background: var(--rmw-primary); color: #fff; }
.rmw-prev { left: -8px; }
.rmw-next { right: -8px; }
@media (max-width: 767px) { .rmw-nav { display: none; } } /* mobile: swipe */

/* ===== Variable product popup ===== */
.rmw-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.rmw-modal.rmw-hidden { display: none !important; }
.rmw-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.rmw-modal-box {
	position: relative;
	background: #fff;
	width: 92%;
	max-width: 420px;
	max-height: 88vh;
	overflow-y: auto;
	border-radius: 16px;
	padding: 22px;
	box-shadow: 0 20px 60px rgba(0,0,0,.3);
	z-index: 1;
}
.rmw-modal-close {
	position: absolute; top: 10px; right: 12px;
	width: 34px; height: 34px; border: 0; background: #f2f2f2;
	border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: #333;
}
.rmw-modal-close:hover { background: #e7e7e7; }
.rmw-modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding-right: 30px; }
.rmw-modal-img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: 0 0 72px; }
.rmw-modal-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #1c1c1c; }
.rmw-modal-price { font-size: 16px; font-weight: 700; color: var(--rmw-primary); }
.rmw-modal-price del { color: #999; font-weight: 400; margin-right: 6px; }
.rmw-modal-price ins { text-decoration: none; }
.rmw-opt-label { display: block; font-size: 13px; font-weight: 600; color: #444; margin: 12px 0 5px; }
.rmw-opt-select {
	width: 100%; padding: 11px 12px; border: 1px solid #ddd; border-radius: 10px;
	font-size: 15px; background: #fff; color: #222;
}
.rmw-modal-msg { color: #c0392b; font-size: 13px; min-height: 18px; margin: 8px 0 0; }
.rmw-modal-add {
	width: 100%;
	margin-top: 18px;
	padding: 14px;
	border: 0;
	border-radius: 12px;
	background: var(--rmw-primary);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .3px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(27,166,114,.25);
	transition: background .15s ease, box-shadow .15s ease;
}
.rmw-modal-add:hover:not(:disabled) { background: #178a5f; box-shadow: 0 6px 16px rgba(27,166,114,.32); }
.rmw-modal-add:active:not(:disabled) { background: #15805a; }
.rmw-modal-add:disabled { background: #e6e6e6; color: #a6a6a6; box-shadow: none; cursor: not-allowed; }
.rmw-modal-add.rmw-loading { opacity: .7; pointer-events: none; }
.rmw-loading-text { color: #888; padding: 10px 0; }

/* Popup quantity row */
.rmw-modal-qtyrow { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.rmw-modal-qtylabel { font-size: 14px; font-weight: 600; color: #444; }
.rmw-modal-qty {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid #cdeadd;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
	overflow: hidden;
}
.rmw-modal-qty button {
	width: 48px; height: 44px; border: 0; background: #fff;
	color: var(--rmw-primary); font-size: 21px; font-weight: 700; line-height: 1; cursor: pointer;
	transition: background .12s ease;
}
.rmw-modal-qty button:hover { background: rgba(27,166,114,.07); }
.rmw-modal-qty button:active { background: rgba(27,166,114,.14); }
.rmw-mq-val {
	min-width: 50px; text-align: center; font-size: 16px; font-weight: 700; color: #1c1c1c;
	border-left: 1px solid #eef4f1; border-right: 1px solid #eef4f1;
	align-self: stretch; display: flex; align-items: center; justify-content: center;
}

/* Custom variation dropdown (so prices can be styled) */
.rmw-select { position: relative; margin-bottom: 4px; }
.rmw-select-trigger {
	width: 100%; display: flex; align-items: center; justify-content: space-between;
	padding: 11px 12px; border: 1px solid #ddd; border-radius: 10px; background: #fff;
	font-size: 15px; color: #222; cursor: pointer; text-align: left;
}
.rmw-select.rmw-has-value .rmw-select-trigger { border-color: var(--rmw-primary); }
.rmw-select-caret { color: #888; font-size: 12px; margin-left: 8px; }
.rmw-select-menu {
	position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5;
	background: #fff; border: 1px solid #e2e2e2; border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0,0,0,.14); overflow: hidden; max-height: 260px; overflow-y: auto;
}
.rmw-select-opt {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 11px 13px; cursor: pointer; font-size: 15px; color: #222;
}
.rmw-select-opt:hover { background: #f5f7f6; }
.rmw-opt-name { font-weight: 600; }
.rmw-opt-price { white-space: nowrap; text-align: right; font-weight: 700; }
.rmw-opt-price del { color: #9a9a9a; font-weight: 400; margin-right: 7px; text-decoration: line-through; }
.rmw-opt-price ins { text-decoration: none; color: #e23744; }

/* Popup success panel (Checkout / Add more) */
.rmw-modal-success { display: none; text-align: center; padding: 10px 0 4px; }
.rmw-modal-box.rmw-show-success .rmw-modal-options,
.rmw-modal-box.rmw-show-success .rmw-modal-qtyrow,
.rmw-modal-box.rmw-show-success .rmw-modal-msg,
.rmw-modal-box.rmw-show-success .rmw-modal-add { display: none !important; }
.rmw-modal-box.rmw-show-success .rmw-modal-success { display: block; }
.rmw-success-check {
	width: 60px; height: 60px; margin: 6px auto 12px; border-radius: 50%;
	background: var(--rmw-primary); color: #fff; font-size: 32px; line-height: 60px; font-weight: 700;
	box-shadow: 0 6px 16px rgba(27,166,114,.35);
}
.rmw-success-text { font-size: 17px; font-weight: 700; color: #1c1c1c; margin-bottom: 18px; }
.rmw-success-checkout {
	display: block; width: 100%; padding: 14px; border-radius: 12px;
	background: var(--rmw-primary);
	color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .3px;
	text-decoration: none; text-align: center;
	box-shadow: 0 4px 12px rgba(27,166,114,.25);
	transition: background .15s ease;
}
.rmw-success-checkout:hover { background: #178a5f; }
.rmw-success-more {
	display: block; width: 100%; margin-top: 12px; padding: 13px; border: 1.5px solid #cdeadd;
	border-radius: 12px; background: #fff; color: var(--rmw-primary); font-size: 15px; font-weight: 700; cursor: pointer;
}
.rmw-success-more:hover { background: rgba(27,166,114,.06); }

/* Add-to-cart toast (simple products) */
.rmw-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
	z-index: 99999; display: flex; align-items: center; gap: 16px;
	background: #1c1c1c; color: #fff; padding: 12px 16px 12px 20px; border-radius: 50px;
	box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 15px; font-weight: 600;
	transition: opacity .2s ease, transform .2s ease;
}
.rmw-toast.rmw-hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(10px); display: flex !important; }
.rmw-toast-msg { white-space: nowrap; }
.rmw-toast-btn {
	background: var(--rmw-primary); color: #fff; text-decoration: none; padding: 9px 16px;
	border-radius: 50px; font-weight: 700; white-space: nowrap;
}
.rmw-toast-btn:hover { filter: brightness(1.08); }
@media (max-width: 480px) { .rmw-toast { left: 12px; right: 12px; transform: none; justify-content: space-between; } .rmw-toast.rmw-hidden { transform: translateY(10px); } }
