/*
 * Muntabiq Integration & Clients: storefront look (monday style).
 *
 * Loaded on the store page only, after store.css and the Appearance inline CSS.
 * Everything is scoped to #mtb-store, so plans, sign-in and the account are untouched.
 * House rules: regular weight only, no shadows, pills for buttons and chips.
 */
#mtb-store {
	--sf-ink: #14201a;
	--sf-text: #3d4a43;
	--sf-muted: #6b7770;
	--sf-line: #e4ebe6;
	--sf-line-2: #cfd8d2;
	--sf-surface: #f4f7f5;
	--sf-soft: #e3f3ea;
	--sf-head: "Thmanyah Serif", Almarai, Barlow, Georgia, serif;
	font-family: Barlow, Almarai, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	font-weight: 400;
	color: var(--sf-text);
	padding-top: 20px;
	padding-bottom: 72px;
}
#mtb-store[dir="rtl"] { font-family: Almarai, Barlow, system-ui, -apple-system, "Segoe UI", sans-serif; }
#mtb-store .mtb-sf { max-width: 1200px; margin-inline: auto; }
#mtb-store :is(h1, h2, h3, h4, strong, b, a, button, input, select, label, p, span, div) { font-weight: 400; }
#mtb-store :is(button, input, select) { font-family: inherit; box-shadow: none; }
#mtb-store svg { display: block; flex: none; }
#mtb-store .mtb-riyal { display: inline-block; }
#mtb-store .mtb-loading { padding: 80px 0; color: var(--sf-muted); }

/* ---------- top bar: back link and cart ---------- */
#mtb-store .mtb-sbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0; }
#mtb-store .mtb-sbar__left { display: flex; align-items: center; gap: 10px; }
#mtb-store .mtb-sbar__home { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; border: 0; border-radius: 0; background: none; color: var(--sf-muted); font-size: 14px; line-height: 1.4; cursor: pointer; transition: color .3s ease; }
#mtb-store .mtb-sbar__home:is(:hover, :focus) { background: none; color: var(--sf-ink); }
#mtb-store .mtb-sbar__home svg { width: 16px; height: 16px; }
#mtb-store[dir="rtl"] .mtb-sbar__home svg { transform: scaleX(-1); }
#mtb-store .mtb-cartbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-inline-start: auto; padding: 0 16px; border: 1px solid var(--sf-line-2); border-radius: 999px; background: #fff; color: var(--sf-ink); font-size: 14px; line-height: 1; cursor: pointer; transition: border-color .3s ease; }
#mtb-store .mtb-cartbtn:is(:hover, :focus) { border-color: var(--sf-ink); background: #fff; color: var(--sf-ink); }
#mtb-store .mtb-cartbtn svg { width: 18px; height: 18px; }
#mtb-store .mtb-cart-badge { align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--mtb-primary); color: #fff; font-size: 12px; line-height: 1; }

/* ---------- catalogue heading ---------- */
#mtb-store .mtb-shero { padding: 28px 0 32px; text-align: center; }
#mtb-store .mtb-shero__title { margin: 0 0 12px; font-family: var(--sf-head); font-size: clamp(36px, 5vw, 56px); line-height: 1.2; letter-spacing: -.02em; color: var(--sf-ink); }
#mtb-store[dir="rtl"] .mtb-shero__title { letter-spacing: 0; line-height: 1.35; }
#mtb-store .mtb-shero__lead { max-width: 560px; margin: 0 auto; font-size: 18px; line-height: 1.6; color: var(--sf-muted); }

/* ---------- search and category chips ---------- */
#mtb-store .mtb-controls { max-width: 520px; margin: 0 auto 18px; }
#mtb-store .mtb-searchwrap { position: relative; }
#mtb-store .mtb-searchwrap svg { position: absolute; top: 50%; inset-inline-start: 18px; width: 18px; height: 18px; margin-top: -9px; color: var(--sf-muted); pointer-events: none; }
#mtb-store .mtb-search { width: 100%; height: 48px; margin: 0; padding: 0; padding-inline: 46px 18px; border: 1px solid var(--sf-line-2); border-radius: 999px; background: #fff; color: var(--sf-ink); font-size: 15px; line-height: 1.4; transition: border-color .3s ease; }
#mtb-store .mtb-search::placeholder { color: var(--sf-muted); opacity: 1; }
#mtb-store .mtb-search:focus { border-color: var(--mtb-primary); outline: 3px solid var(--sf-soft); outline-offset: 0; box-shadow: none; }
#mtb-store .mtb-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 36px; }
#mtb-store .mtb-chip { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--sf-surface); color: var(--sf-text); font-size: 14px; line-height: 1; cursor: pointer; transition: background-color .3s ease, color .3s ease; }
#mtb-store .mtb-chip:is(:hover, :focus) { background: var(--sf-soft); color: var(--sf-ink); }
#mtb-store .mtb-chip.is-active,
#mtb-store .mtb-chip.is-active:is(:hover, :focus) { background: var(--sf-soft); color: var(--mtb-primary); }
#mtb-store .mtb-snone { margin: 0; padding: 40px 0; text-align: center; color: var(--sf-muted); }

/* ---------- product cards ---------- */
/* Fixed card width, centred: one or two products still look deliberate. */
#mtb-store .mtb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 282px)); justify-content: center; gap: 24px; }
#mtb-store .mtb-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--sf-line); border-radius: 16px; background: #fff; box-shadow: none; transform: none; transition: border-color .3s ease; }
#mtb-store .mtb-card:hover { border-color: var(--sf-line-2); box-shadow: none; transform: none; }
#mtb-store .mtb-card.is-featured { border-color: var(--mtb-primary); }
#mtb-store .mtb-card__media { position: relative; display: block; padding: 12px 12px 0; text-decoration: none; cursor: pointer; }
#mtb-store div.mtb-card__media { cursor: default; }
#mtb-store .mtb-card__img { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background-color: var(--sf-surface); background-position: center; background-size: cover; }
#mtb-store .mtb-card__img.is-empty { display: flex; align-items: center; justify-content: center; }
#mtb-store .mtb-card__img.is-empty span { font-family: var(--sf-head); font-size: 44px; line-height: 1; color: #b4c4ba; }
#mtb-store .mtb-card__flag { position: absolute; top: 22px; inset-inline-start: 22px; padding: 5px 10px; border-radius: 6px; background: #fff; color: var(--mtb-primary); font-size: 12px; line-height: 1.2; letter-spacing: 0; text-transform: none; }
#mtb-store .mtb-card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px 20px 20px; }
#mtb-store .mtb-card__name { font-family: var(--sf-head); font-size: 20px; line-height: 1.4; color: var(--sf-ink); text-decoration: none; }
#mtb-store a.mtb-card__name { cursor: pointer; transition: color .3s ease; }
#mtb-store a.mtb-card__name:is(:hover, :focus) { color: var(--mtb-primary); }
#mtb-store .mtb-card__desc { display: -webkit-box; flex: none; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; line-height: 1.6; color: var(--sf-muted); }
#mtb-store .mtb-card__price { margin-top: auto; padding-top: 10px; font-size: 22px; line-height: 1.3; letter-spacing: 0; color: var(--sf-ink); }
#mtb-store .mtb-card__price span { font-size: 13px; color: var(--sf-muted); }
#mtb-store .mtb-card__actions { margin-top: 10px; }
#mtb-store .mtb-card__actions .mtb-btn { width: 100%; }
#mtb-store .mtb-cat-title { margin: 72px 0 28px; font-family: var(--sf-head); font-size: clamp(26px, 3vw, 36px); line-height: 1.3; text-align: center; color: var(--sf-ink); }

/* ---------- buttons ---------- */
#mtb-store .mtb-btn,
.mtb-sf-modal .mtb-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; margin: 0; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font-family: inherit; font-size: 15px; font-weight: 400; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: none; transition: background-color .3s ease, border-color .3s ease, color .3s ease; }
#mtb-store .mtb-btn--primary,
.mtb-sf-modal .mtb-btn--primary { border-color: var(--mtb-primary, #048238); background: var(--mtb-primary, #048238); color: #fff; }
#mtb-store .mtb-btn--primary:is(:hover, :focus),
.mtb-sf-modal .mtb-btn--primary:is(:hover, :focus) { border-color: var(--mtb-primary-dark, #036a2e); background: var(--mtb-primary-dark, #036a2e); color: #fff; }
/* Second action and card actions: dark outline that fills on hover. */
#mtb-store .mtb-btn--dark,
#mtb-store .mtb-card .mtb-btn--primary,
.mtb-sf-modal .mtb-btn--outline { border-color: var(--sf-ink, #14201a); background: #fff; color: var(--sf-ink, #14201a); }
#mtb-store .mtb-btn--dark:is(:hover, :focus),
#mtb-store .mtb-card .mtb-btn--primary:is(:hover, :focus),
.mtb-sf-modal .mtb-btn--outline:is(:hover, :focus) { border-color: var(--sf-ink, #14201a); background: var(--sf-ink, #14201a); color: #fff; }
#mtb-store .mtb-btn--block { width: 100%; margin-top: 16px; }
#mtb-store .mtb-btn:disabled,
.mtb-sf-modal .mtb-btn:disabled { opacity: .55; cursor: default; }

/* ---------- empty states ---------- */
#mtb-store .mtb-sempty { max-width: 720px; margin: 4px auto 0; padding: 56px 24px; border-radius: 24px; background: var(--sf-surface); text-align: center; }
#mtb-store .mtb-sempty__ic { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: #fff; color: var(--mtb-primary); }
#mtb-store .mtb-sempty__ic svg { width: 26px; height: 26px; }
#mtb-store .mtb-sempty__t { margin: 18px 0 6px; font-family: var(--sf-head); font-size: 26px; line-height: 1.4; color: var(--sf-ink); }
#mtb-store .mtb-sempty__d { max-width: 440px; margin: 0 auto; font-size: 15px; color: var(--sf-muted); }
#mtb-store .mtb-sempty .mtb-btn { margin-top: 24px; }

/* ---------- product page ---------- */
#mtb-store .mtb-pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 20px; }
#mtb-store .mtb-pd__main { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 24px; background-color: var(--sf-surface); background-position: center; background-size: cover; }
#mtb-store .mtb-pd__main.is-empty { display: flex; align-items: center; justify-content: center; }
#mtb-store .mtb-pd__main.is-empty span { font-family: var(--sf-head); font-size: 96px; line-height: 1; color: #b4c4ba; }
#mtb-store .mtb-pd__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
#mtb-store .mtb-pd__thumb { width: 72px; height: 72px; padding: 0; border: 1px solid var(--sf-line); border-radius: 12px; background-color: var(--sf-surface); background-position: center; background-size: cover; cursor: pointer; transition: border-color .3s ease; }
#mtb-store .mtb-pd__thumb:is(:hover, :focus) { border-color: var(--sf-line-2); background-color: var(--sf-surface); }
#mtb-store .mtb-pd__thumb.is-active { border-color: var(--mtb-primary); outline: 1px solid var(--mtb-primary); }
#mtb-store .mtb-pd__name { margin: 0 0 12px; font-family: var(--sf-head); font-size: clamp(30px, 3.6vw, 44px); line-height: 1.25; letter-spacing: 0; color: var(--sf-ink); }
#mtb-store .mtb-pd__price { margin: 0 0 28px; font-size: 28px; line-height: 1.3; letter-spacing: 0; color: var(--sf-ink); }
#mtb-store .mtb-pd__price span { font-size: 14px; color: var(--sf-muted); }
#mtb-store .mtb-pd__qty { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
#mtb-store .mtb-pd__qty label { margin: 0; font-size: 14px; color: var(--sf-muted); }
#mtb-store .mtb-pd__btns { display: flex; flex-wrap: wrap; gap: 12px; }
#mtb-store .mtb-pd__h3 { margin: 36px 0 10px; padding-top: 28px; border-top: 1px solid var(--sf-line); font-family: var(--sf-head); font-size: 22px; line-height: 1.4; color: var(--sf-ink); }
#mtb-store .mtb-pd__text { font-size: 16px; line-height: 1.8; color: var(--sf-text); }
#mtb-store .mtb-pd__text p { margin: 0; }

/* Quantity: minus, value, plus. */
#mtb-store .mtb-step { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--sf-line-2); border-radius: 999px; background: #fff; }
#mtb-store .mtb-step button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--sf-ink); font-size: 18px; line-height: 1; cursor: pointer; transition: background-color .3s ease; }
#mtb-store .mtb-step button:is(:hover, :focus) { background: var(--sf-surface); color: var(--sf-ink); }
#mtb-store .mtb-step .mtb-qtyinput { width: 44px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--sf-ink); font-size: 15px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
#mtb-store .mtb-step .mtb-qtyinput:focus { outline: none; }
#mtb-store .mtb-step .mtb-qtyinput::-webkit-outer-spin-button,
#mtb-store .mtb-step .mtb-qtyinput::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

/* Booking a session. */
#mtb-store .mtb-booking { margin: 0; padding: 20px; border-radius: 16px; background: var(--sf-surface); }
#mtb-store .mtb-label { display: block; margin: 0 0 6px; font-size: 14px; color: var(--sf-muted); }
#mtb-store .mtb-input { width: 100%; height: 44px; margin: 0; padding: 0 14px; border: 1px solid var(--sf-line-2); border-radius: 12px; background-color: #fff; color: var(--sf-ink); font-size: 15px; line-height: 1.4; }
#mtb-store .mtb-input:focus { border-color: var(--mtb-primary); outline: 3px solid var(--sf-soft); outline-offset: 0; box-shadow: none; }
#mtb-store select.mtb-input { padding-inline-end: 36px; }
#mtb-store .mtb-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
#mtb-store .mtb-slot { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--sf-line-2); border-radius: 12px; background: #fff; text-align: start; cursor: pointer; transition: border-color .3s ease, background-color .3s ease; }
#mtb-store .mtb-slot:is(:hover, :focus) { border-color: var(--sf-ink); background: #fff; }
#mtb-store .mtb-slot.is-active { border-color: var(--mtb-primary); background: var(--sf-soft); box-shadow: none; }
#mtb-store .mtb-slot strong { font-size: 14px; color: var(--sf-ink); }
#mtb-store .mtb-slot span { font-size: 13px; color: var(--sf-muted); }
#mtb-store .mtb-checkout-note { min-height: 1.2em; margin-top: 12px; font-size: 14px; text-align: center; color: var(--sf-muted); }
#mtb-store .mtb-checkout-note.is-ok { color: var(--mtb-primary); }
#mtb-store .mtb-checkout-note.is-bad { color: #b3261e; }

/* ---------- cart ---------- */
#mtb-store .mtb-stitle { margin: 20px 0 28px; font-family: var(--sf-head); font-size: clamp(30px, 3.6vw, 44px); line-height: 1.25; color: var(--sf-ink); }
#mtb-store .mtb-cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
#mtb-store .mtb-cart__lines { display: flex; flex-direction: column; gap: 12px; }
#mtb-store .mtb-cart__row { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--sf-line); border-radius: 16px; background: #fff; }
#mtb-store .mtb-cart__thumb { flex: none; width: 80px; height: 80px; border-radius: 12px; background-color: var(--sf-surface); background-position: center; background-size: cover; }
#mtb-store .mtb-cart__thumb.is-empty { display: flex; align-items: center; justify-content: center; }
#mtb-store .mtb-cart__thumb.is-empty span { font-family: var(--sf-head); font-size: 28px; line-height: 1; color: #b4c4ba; }
#mtb-store .mtb-cart__mid { flex: 1; min-width: 0; }
#mtb-store .mtb-cart__name { display: block; font-size: 17px; line-height: 1.4; color: var(--sf-ink); text-decoration: none; transition: color .3s ease; }
#mtb-store .mtb-cart__name:is(:hover, :focus) { color: var(--mtb-primary); }
#mtb-store .mtb-cart__unit { margin: 2px 0 6px; font-size: 14px; color: var(--sf-muted); }
#mtb-store .mtb-cart__rm { padding: 0; border: 0; background: none; color: #b3261e; font-size: 13px; line-height: 1.4; cursor: pointer; }
#mtb-store .mtb-cart__rm:is(:hover, :focus) { background: none; color: #b3261e; text-decoration: underline; }
#mtb-store .mtb-cart__right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#mtb-store .mtb-cart__line { font-size: 17px; color: var(--sf-ink); }
#mtb-store .mtb-cart__sum { position: sticky; top: 96px; padding: 24px; border: 0; border-radius: 24px; background: var(--sf-surface); }
#mtb-store .mtb-sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--sf-text); }
#mtb-store .mtb-cart__coupon { margin: 16px 0; }
#mtb-store .mtb-sum-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--sf-line-2); font-size: 16px; color: var(--sf-text); }
#mtb-store .mtb-sum-total strong { font-size: 24px; color: var(--sf-ink); }

/* ---------- toast and the add-on window (both sit outside the store box) ---------- */
.mtb-store-toast { inset-inline: auto; bottom: 24px; left: 50%; padding: 12px 20px; border-radius: 999px; background: #14201a; color: #fff; font-family: Barlow, Almarai, system-ui, sans-serif; font-size: 14px; font-weight: 400; box-shadow: none; transform: translate(-50%, 10px); }
.mtb-store-toast.is-visible { transform: translate(-50%, 0); }
.mtb-sf-modal { --mtb-primary: #048238; --mtb-primary-dark: #036a2e; --mtb-line: #cfd8d2; --mtb-muted: #6b7770; --mtb-ink: #14201a; background: rgba(20, 32, 26, .45); font-family: Barlow, Almarai, system-ui, sans-serif; font-size: 15px; line-height: 1.6; color: #3d4a43; }
.mtb-sf-modal[dir="rtl"] { font-family: Almarai, Barlow, system-ui, sans-serif; }
.mtb-sf-modal * { box-sizing: border-box; font-weight: 400; }
.mtb-sf-modal .mtb-modal-box { padding: 28px; border-radius: 16px; box-shadow: none; }
.mtb-sf-modal .mtb-h3 { margin: 0 0 16px; font-family: "Thmanyah Serif", Almarai, Barlow, Georgia, serif; font-size: 24px; line-height: 1.4; color: #14201a; }
.mtb-sf-modal .mtb-label { display: block; margin: 0 0 6px; font-size: 14px; color: #6b7770; }
.mtb-sf-modal .mtb-input { width: 100%; height: 44px; margin: 0; padding: 0 14px; border: 1px solid #cfd8d2; border-radius: 12px; background-color: #fff; color: #14201a; font-family: inherit; font-size: 15px; box-shadow: none; }
.mtb-sf-modal .mtb-input:focus { border-color: #048238; outline: 3px solid #e3f3ea; box-shadow: none; }
.mtb-sf-modal .mtb-muted { color: #6b7770; }
.mtb-sf-modal .mtb-sum-total { border-top: 1px solid #cfd8d2; }
.mtb-sf-modal .mtb-sum-total strong { font-size: 20px; color: #14201a; }
.mtb-sf-modal .mtb-sum-note { font-size: 13px; color: #6b7770; }
.mtb-sf-modal .mtb-checkout-note.is-bad { color: #b3261e; }
.mtb-sf-modal .mtb-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- smaller screens ---------- */
@media (max-width: 860px) {
	#mtb-store .mtb-pd { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	#mtb-store .mtb-cart { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	#mtb-store .mtb-cart__sum { position: static; }
}
@media (max-width: 600px) {
	#mtb-store { padding-top: 12px; padding-bottom: 48px; }
	#mtb-store .mtb-shero { padding: 20px 0 24px; }
	#mtb-store .mtb-shero__lead { font-size: 16px; }
	#mtb-store .mtb-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	#mtb-store .mtb-chips { margin-bottom: 24px; }
	#mtb-store .mtb-cat-title { margin: 48px 0 20px; }
	#mtb-store .mtb-sempty { padding: 40px 20px; }
	#mtb-store .mtb-pd__btns .mtb-btn { flex: 1; }
	#mtb-store .mtb-cart__row { flex-wrap: wrap; }
	#mtb-store .mtb-cart__right { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
	.mtb-sf-modal .mtb-modal-box { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	#mtb-store *, .mtb-store-toast { transition: none !important; }
}
