/* Riza Order Now — loop button + variation popup. RTL-aware (site runs .rtl). */

/* ---------------------------------------------------------------- */
/* Loop "Order Now" button                                          */
/* ---------------------------------------------------------------- */
.riza-order-now.button,
a.riza-order-now.button {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box;
	margin: 8px 0 0 !important;
	padding: 11px 14px;
	text-align: center;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 4px;
	background: #1a1a1a !important;
	color: #fff !important;
	border: 1px solid #1a1a1a !important;
	transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}

/* Hover gold only on real-hover devices (desktop). On touch this prevents the
   colour from "sticking" on the product whose popup was just opened. There is
   deliberately NO :focus rule — focus returns to this button when the popup
   closes, and :focus would otherwise keep it gold. */
@media (hover: hover) {
	.riza-order-now.button:hover {
		background: #c39348 !important;
		color: #fff !important;
		border-color: #c39348 !important;
	}
}

/* ---------------------------------------------------------------- */
/* Popup                                                            */
/* ---------------------------------------------------------------- */
body.riza-onm-open {
	overflow: hidden;
}

.riza-onm {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease, visibility .15s ease;
}
.riza-onm.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.riza-onm__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

/* The dialog clips its content (overflow:hidden), so every corner keeps the
   same 8px radius in both LTR and RTL — the scrollbar lives on the inner
   .riza-onm__content and can no longer square off the left edge. */
.riza-onm__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

.riza-onm__content {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 22px 20px 20px;
	-webkit-overflow-scrolling: touch;
}
.riza-onm__content,
.riza-onm-product,
.riza-onm-form,
.riza-onm-form table.variations {
	max-width: 100%;
	box-sizing: border-box;
}
.riza-onm-form table.variations {
	width: 100%;
}

.riza-onm__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 22px;
	line-height: 34px;
	text-align: center;
	color: #777;
	cursor: pointer;
	z-index: 3;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .2s ease, color .2s ease;
}
.rtl .riza-onm__close {
	right: auto;
	left: 10px;
}
.riza-onm__close:hover,
.riza-onm__close:focus {
	background: #c39348 !important;
	color: #fff !important;
	border-radius: 50% !important;
}

.riza-onm__loading,
.riza-onm__error {
	padding: 30px 10px;
	text-align: center;
	color: #555;
}

/* --- Injected product content --- */
.riza-onm-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #eee;
}
.riza-onm-thumb {
	flex: 0 0 80px;
	width: 80px;
}
.riza-onm-thumb img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
}
.riza-onm-info {
	flex: 1 1 auto;
	min-width: 0;
}
.riza-onm-title {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.35;
}
.riza-onm-price {
	font-size: 15px;
}

/* Keep the variations form readable inside the dialog. */
.riza-onm-form {
	margin: 0 0 8px;
}
.riza-onm-form .quantity {
	margin-bottom: 12px;
}
/* The theme prints its own add-to-cart button inside the form; we drive the
   buy-now flow with our own button, so hide the in-form one to avoid two CTAs. */
.riza-onm-form .single_add_to_cart_button {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Hide the theme's "selected value" text that main.js appends next to each
   attribute label (e.g. the active colour name under "اللون"). */
.riza-onm-form .variations .label .selected-value {
	display: none !important;
}

/* Show each colour's name as plain text UNDER its swatch (like the single
   product page). The name is positioned just below the swatch box so the
   swatch's own border/box-shadow stays around the image only — no box around
   the text. Each <li> already carries the exact name in data-title; the
   selected tick uses .variable-item-contents::before, so ::after here is free. */
.riza-onm-form .variable-items-wrapper li.variable-item.image-variable-item,
.riza-onm-form .variable-items-wrapper li.variable-item.color-variable-item {
	position: relative;
	overflow: visible !important;
	margin-bottom: 28px !important;
}
.riza-onm-form .variable-items-wrapper li.variable-item.image-variable-item::after,
.riza-onm-form .variable-items-wrapper li.variable-item.color-variable-item::after {
	content: attr(data-title);
	position: absolute;
	top: calc(100% + 5px);
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: 90px;
	font-size: 12px;
	line-height: 1.25;
	text-align: center;
	color: #333;
	white-space: normal;
	pointer-events: none;
}

/* --- Buy-now button inside the popup --- */
.riza-onm-buy-now.button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 6px 0 0;
	padding: 13px 16px;
	text-align: center;
	font-weight: 600;
	font-size: 15px;
	border-radius: 4px;
	background: #1a1a1a;
	color: #fff;
	border: 1px solid #1a1a1a;
	cursor: pointer;
	transition: background-color .2s ease, opacity .2s ease;
}
.riza-onm-buy-now.button:hover {
	background: #c39348;
	color: #fff;
}
.riza-onm-buy-now.button.disabled {
	opacity: .45;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.riza-onm__dialog {
		padding: 20px 16px 16px;
	}
	.riza-onm-thumb {
		flex-basis: 64px;
		width: 64px;
	}
}
