/* Meshek Daniel Omer – עיגולי צבע וכפתורי גודל (מוצר עם וריאציות) */

:root {
	--mdo-sw-brand: #1D3115;
	--mdo-sw-dark: #3E4A38;
	--mdo-sw-line: #d9d6cc;
}

/* ---------- עמוד המוצר ---------- */

/* בלי הסקריפט – נשארת הרשימה הרגילה, והעיגולים מוסתרים */
.mdo-sw { display: none; }
.mdo-sw-js .mdo-sw { display: block; }

.mdo-sw-js select[data-mdo-sw] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* הטבלה של WooCommerce: שורה אחת מתחת לשנייה, הכותרת מעל העיגולים */
.mdo-sw-js .variations_form table.variations,
.mdo-sw-js .variations_form table.variations tbody,
.mdo-sw-js .variations_form table.variations tr,
.mdo-sw-js .variations_form table.variations th,
.mdo-sw-js .variations_form table.variations td {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	text-align: start;
}
.mdo-sw-js .variations_form table.variations tr { margin: 0 0 14px; }
.mdo-sw-js .variations_form table.variations th.label {
	margin: 0 0 8px;
	font-family: "Rubik", sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: var(--mdo-sw-brand);
}
.mdo-sw-js .variations_form table.variations td.value { position: relative; }

.mdo-sw__opts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	direction: rtl;
}

.mdo-sw__opt {
	box-sizing: border-box;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 2px solid transparent;
	background: #fff !important;
	color: var(--mdo-sw-dark) !important;
	font-family: "Rubik", sans-serif;
	line-height: 1;
	cursor: pointer;
	box-shadow: none !important;
	transition: border-color .15s ease, opacity .15s ease;
	-webkit-tap-highlight-color: transparent;
}

/* עיגול צבע */
.mdo-sw__opt.is-color {
	width: 40px;
	height: 40px;
	min-width: 40px;
	border-radius: 50%;
	border-color: transparent;
}
.mdo-sw__dot {
	display: block;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--mdo-c, #fff);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
}
.mdo-sw__dot.is-clear,
.mdo-dot.is-clear {
	/* שקוף: זכוכית תכלכלה עם ברק, בלי קו אלכסוני (שלא ייראה כמו "לא זמין") */
	background:
		radial-gradient(circle at 32% 30%, #fff 0 18%, rgba(255, 255, 255, 0) 19%),
		linear-gradient(160deg, #eef6f8, #cfe3ea);
	box-shadow: inset 0 0 0 1px rgba(60, 100, 115, .35);
}
.mdo-sw__opt.is-color.is-on { border-color: var(--mdo-sw-brand); }

/* כפתור גודל / צבע בלי עיגול */
.mdo-sw__opt.is-text {
	min-width: 48px;
	height: 40px;
	padding: 0 16px;
	border: 1.5px solid var(--mdo-sw-line);
	border-radius: 20px;
	font-size: 15px;
	font-weight: 500;
}
.mdo-sw__opt.is-text.is-on {
	border-color: var(--mdo-sw-brand);
	background: var(--mdo-sw-brand) !important;
	color: #fff !important;
}

@media (hover: hover) {
	.mdo-sw__opt.is-color:hover:not(.is-on) { border-color: var(--mdo-sw-line); }
	.mdo-sw__opt.is-text:hover:not(.is-on) { border-color: var(--mdo-sw-dark); }
}
.mdo-sw__opt:focus-visible {
	outline: 2px solid var(--mdo-sw-brand);
	outline-offset: 2px;
}

/* שילוב שלא קיים: חצי שקוף עם קו אלכסוני (עדיין לחיץ – מנקה את שאר הבחירות) */
.mdo-sw__opt.is-off { opacity: .4; }
.mdo-sw__opt.is-off::after {
	content: "";
	position: absolute;
	inset: 50% 4px auto;
	height: 1.5px;
	background: var(--mdo-sw-dark);
	transform: rotate(-35deg);
}

.mdo-sw__chosen {
	min-height: 1.2em;
	margin-top: 6px;
	font-family: "Rubik", sans-serif;
	font-size: 14px;
	color: var(--mdo-sw-dark);
}

/* "ניקוי" של WooCommerce – קטן ובצבעי המשק */
.mdo-sw-js .variations_form .reset_variations {
	display: inline-block;
	margin-top: 4px;
	font-size: 13px;
	color: var(--mdo-sw-dark);
	text-decoration: underline;
}

/* המחיר שמופיע אחרי הבחירה */
.variations_form .woocommerce-variation-price .price {
	font-family: "Rubik", sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: var(--mdo-sw-brand);
}

/* כפתור "הוספה לסל" בעמוד מוצר עם צבעים – ירוק המשק (התבנית צובעת כפתורים בוורוד) */
.variations_form .single_add_to_cart_button {
	border-radius: 24px !important;
	background: var(--mdo-sw-brand) !important;
	border-color: var(--mdo-sw-brand) !important;
	color: #fff !important;
	font-family: "Rubik", sans-serif;
	font-weight: 600;
}
.variations_form .single_add_to_cart_button.disabled { opacity: .45; }

/* ---------- כרטיס בחנות ---------- */

.mdo-dots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 6px 0 2px;
	direction: rtl;
	line-height: 1;
}
.mdo-dot {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--mdo-c, #fff);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
	cursor: pointer;
	transition: transform .12s ease;
}
.mdo-dot.is-text {
	width: auto;
	min-width: 18px;
	padding: 0 5px;
	border-radius: 9px;
	font-size: 10px;
	color: var(--mdo-sw-dark);
}
@media (hover: hover) {
	.mdo-dot:hover { transform: scale(1.2); }
}
.mdo-dot:focus-visible {
	outline: 2px solid var(--mdo-sw-brand);
	outline-offset: 2px;
}
.mdo-dots__more,
.mdo-dots--text {
	font-family: "Rubik", sans-serif;
	font-size: 12px;
	color: #6F6F6F;
}

.mdo-from {
	font-size: .75em;
	font-weight: 400;
}

/* "+" בפינת כרטיס של מוצר עם צבעים/גדלים – אותה לשונית כמו בשאר הכרטיסים, פותחת את עמוד המוצר */
li.product:has(> .mdo-choose) { position: relative; }
li.product:has(> .mdo-choose) .quantity,
li.product:has(> .mdo-choose) .qib-container,
li.product:has(> .mdo-choose) .qib-button { display: none !important; }

.mdo-choose {
	position: absolute;
	z-index: 3;
	top: 0;
	left: 0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--mdo-tab, 48px);
	height: var(--mdo-tab, 48px);
	border-radius: var(--mdo-card-radius, 25px) 0 var(--mdo-curve, 28px) 0;
	border-top-left-radius: inherit;
	background: var(--mdo-tab-bg, #fff);
	color: var(--mdo-light, #3E4A38) !important;
	box-shadow: 2px 2px 8px rgba(30, 38, 26, .14);
	text-decoration: none !important;
}
.mdo-choose:focus-visible {
	outline: 2px solid var(--mdo-sw-brand);
	outline-offset: -4px;
}
