/* ==========================================================================
   WooCommerce single product — lomina
   מחיר + בורר כמות +/- + add-to-cart, בשפת העיצוב של עמוד המוצר של ניר צבי.
   נטען רק ב-is_product(). מסתמך על .nzm-product-page__* מ-style.css.
   ========================================================================== */

/* ── גלריה: תמונה ראשית (ימין) + thumbnails (שמאל, RTL) ───────────────── */
/* ביטול ה-aspect/overflow/bg הקבוע של image-col (תוכנן לתמונה בודדת — חתך וגרם לרקע אפור). */
.nzm-product-page__image-col {
	aspect-ratio: auto !important;
	overflow: visible !important;
	background: transparent !important;
	flex: 1 1 48% !important;
	/* ריווח מקצה המסך השמאלי (full-bleed) כדי שה-thumbnails לא יחתכו/יידבקו לקצה */
	padding-left: clamp(16px, 2.5vw, 48px);
	box-sizing: border-box;
}
.nzm-product-page__gallery {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	width: 100%;
}
.nzm-product-page__gallery .nzm-product-page__image-frame {
	order: 1; /* RTL: order נמוך = ימין */
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	aspect-ratio: 3 / 2; /* גובה נמוך יותר (היה 1024/829 — היה גבוה מדי) */
	max-height: 560px;
	height: auto;
	background: #f5f5f5;
	border-radius: 8px;
	overflow: hidden;
}
.nzm-product-page__gallery .nzm-product-page__hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nzm-product-page__thumbs {
	order: 2; /* RTL: order גבוה = שמאל */
	flex: 0 0 92px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.nzm-product-page__thumb {
	width: 92px;
	height: 92px;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	overflow: hidden;
	padding: 0;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s ease;
	flex: 0 0 auto;
}
.nzm-product-page__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nzm-product-page__thumb:hover,
.nzm-product-page__thumb:focus-visible {
	border-color: #000;
}
.nzm-product-page__thumb.is-active {
	border: 2px solid #000;
}

@media (max-width: 768px) {
	.nzm-product-page__gallery {
		flex-direction: column;
	}
	.nzm-product-page__thumbs {
		order: 2;
		flex-direction: row;
		flex-wrap: wrap;
		flex-basis: auto;
	}
	.nzm-product-page__thumb {
		width: 64px;
		height: 64px;
	}
}

/* ── ריווח בין סקציות עמוד המוצר (hero / סליידר מוצרים / ביקורות) ──────── */
.nzm-product-page__hero {
	margin-bottom: 64px !important;
}
body.single-product .nzm-products-section {
	margin: 64px auto;
}
body.single-product .nzm-reviews-section {
	margin-top: 64px;
}
@media (max-width: 768px) {
	.nzm-product-page__hero {
		margin-bottom: 40px !important;
	}
	body.single-product .nzm-products-section {
		margin: 40px auto;
	}
	body.single-product .nzm-reviews-section {
		margin-top: 40px;
	}
}

/* מחיר בכרטיס מוצר בסליידר */
.nzm-product-card__price .woocommerce-Price-amount {
	font-weight: 600;
	color: #000;
}

/* ── תג חיסכון (badge עגול על התמונה) — צבעי lomina (שחור) ────────────── */
.nzm-product-page__discount {
	position: absolute;
	top: 16px;
	inset-inline-start: 16px;
	width: clamp(72px, 16%, 104px);
	aspect-ratio: 1 / 1;
	background: #000;
	border: 1.5px solid #fff;
	border-radius: 50%;
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: rotate(-10deg);
	z-index: 4;
	text-align: center;
	box-sizing: border-box;
}
.nzm-product-page__discount-label {
	font-size: clamp(12px, 1.2vw, 17px);
	font-weight: 700;
	line-height: 1;
}
.nzm-product-page__discount-amount {
	display: flex;
	align-items: baseline;
	gap: 1px;
	line-height: 1;
	margin-top: 2px;
}
.nzm-product-page__discount-curr {
	font-size: clamp(11px, 1vw, 15px);
	font-weight: 700;
}
.nzm-product-page__discount-num {
	font-size: clamp(20px, 2.2vw, 32px);
	font-weight: 800;
}

/* ── טיימר מבצע — צבעי lomina (שחור) ─────────────────────────────────── */
.nzm-product-page__offer-timer {
	background: #000;
	color: #fff;
	padding: 12px 18px;
	display: inline-flex;
	align-items: center;
	gap: 18px;
	direction: rtl;
	flex-wrap: nowrap; /* כותרת + שעון תמיד זה לצד זה */
	align-self: flex-start;
	max-width: 100%;
	border-radius: 8px;
	margin-bottom: 22px;
}
.nzm-offer-timer__heading {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	text-align: right;
	white-space: nowrap;
}
.nzm-offer-timer__heading strong { font-size: clamp(15px, 1.5vw, 19px); font-weight: 700; }
.nzm-offer-timer__heading span { font-size: clamp(12px, 1.2vw, 15px); font-weight: 400; opacity: 0.85; }
.nzm-offer-timer__clock { display: flex; align-items: flex-start; gap: 6px; direction: ltr; }
.nzm-offer-timer__unit { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.nzm-offer-timer__tiles { display: flex; gap: 3px; }
.nzm-offer-timer__tile {
	background: #fff;
	color: #000;
	font-weight: 700;
	font-size: clamp(18px, 2vw, 24px);
	line-height: 1;
	border-radius: 4px;
	width: clamp(20px, 2.2vw, 26px);
	height: clamp(26px, 2.8vw, 32px);
	display: flex;
	align-items: center;
	justify-content: center;
}
.nzm-offer-timer__label { font-size: clamp(10px, 1vw, 12px); opacity: 0.85; }
.nzm-offer-timer__sep { font-size: 22px; font-weight: 700; align-self: center; margin-top: -8px; }

/* מובייל צר — מאפשר גלישה כדי שלא יחתך */
@media (max-width: 480px) {
	.nzm-product-page__offer-timer { flex-wrap: wrap; gap: 12px; }
}

/* ── רובריקת יתרונות (features) ───────────────────────────────────────── */
.nzm-product-page__features {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}
.nzm-product-page__feature {
	display: flex;
	align-items: center;
	gap: 9px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 15px;
	color: #000;
	min-height: 56px;
}
.nzm-product-page__feature svg { color: #000; flex-shrink: 0; }
@media (max-width: 768px) {
	.nzm-product-page__features { grid-template-columns: 1fr; }
}

/* ── מחיר ───────────────────────────────────────────────────────────── */
.nzm-product-page__price {
	margin: 0 0 24px;
	font-family: var(--nzm-header-font, inherit);
	line-height: 1.1;
}
.nzm-product-page__price .woocommerce-Price-amount,
.nzm-product-page__price .amount {
	font-size: clamp(28px, 2.4vw, 42px);
	font-weight: 700;
	color: #000;
}
.nzm-product-page__price del,
.nzm-product-page__price del .amount {
	color: #9a9a9a;
	font-weight: 400;
	font-size: clamp(18px, 1.4vw, 24px);
	margin-inline-end: 10px;
}
.nzm-product-page__price ins {
	text-decoration: none;
}
.nzm-product-page__price .woocommerce-Price-currencySymbol {
	font-size: 0.7em;
}

/* ── טופס add-to-cart ───────────────────────────────────────────────── */
.nzm-product-page__details form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 14px;
	margin: 0 0 30px;
}
.nzm-product-page__details form.cart.variations_form {
	flex-direction: column;
	align-items: stretch;
}

/* ── בורר כמות +/- ──────────────────────────────────────────────────── */
.nzm-product-page__details .quantity.nzm-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #c7c7c7;
	border-radius: 60px;
	overflow: hidden;
	background: #fff;
	height: 56px;
}
.nzm-qty__btn {
	flex: 0 0 auto;
	width: 52px;
	border: none;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #000;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
	font-family: inherit;
	padding: 0;
}
.nzm-qty__btn:hover,
.nzm-qty__btn:focus-visible {
	background: #f0f0f0;
}
.nzm-product-page__details .quantity.nzm-qty input.qty {
	width: 60px;
	border: none;
	border-inline: 1px solid #ededed;
	background: #fff;
	text-align: center;
	font-size: 20px;
	font-weight: 500;
	color: #000;
	font-family: inherit;
	-moz-appearance: textfield;
	padding: 0;
}
.nzm-product-page__details .quantity.nzm-qty input.qty::-webkit-outer-spin-button,
.nzm-product-page__details .quantity.nzm-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ── כפתור הוסף לעגלה (מירור של .nzm-product-page__submit-btn) ─────────── */
/* override של סגול ברירת המחדל של WooCommerce (#7f54b3) — שחור לפי ה-design system. */
.nzm-product-page__details form.cart button.single_add_to_cart_button,
.nzm-product-page__details form.cart .single_add_to_cart_button,
.woocommerce .nzm-product-page__details button.single_add_to_cart_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background-color: #000 !important;
	background-image: none !important;
	color: #fff !important;
	border: none !important;
	border-radius: 60px !important;
	padding: 12px 40px;
	min-height: 56px;
	font-size: 20px;
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.3s ease;
	font-family: inherit;
	flex: 1 1 auto;
	text-transform: none;
}
.nzm-product-page__details form.cart button.single_add_to_cart_button:hover,
.nzm-product-page__details form.cart .single_add_to_cart_button:hover,
.nzm-product-page__details form.cart .single_add_to_cart_button:focus-visible {
	background-color: #000 !important;
	opacity: 0.85;
}

/* מלאי / out-of-stock */
.nzm-product-page__details .stock {
	font-size: 16px;
	margin: 0 0 16px;
}
.nzm-product-page__details .stock.out-of-stock {
	color: #b00;
}

/* הודעות Woo בראש העמוד */
.nzm-product-page__hero .woocommerce-notices-wrapper {
	flex-basis: 100%;
}

/* ── רספונסיב ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.nzm-product-page__details form.cart {
		gap: 10px;
	}
	.nzm-product-page__details .quantity.nzm-qty {
		height: 50px;
	}
	.nzm-qty__btn {
		width: 46px;
		font-size: 22px;
	}
	.nzm-product-page__details .single_add_to_cart_button {
		min-height: 50px;
		padding: 10px 28px;
		font-size: 18px;
	}
}

/* ===== כרטיס מוצר בסליידר — גובה אחיד + hover overlay (quick add/view) ===== */
/* override ל-.woocommerce img{height:auto} שדרס את הגובה הקבוע */
.woocommerce .nzm-product-card__img,
body.single-product .nzm-product-card__img {
	width: 100% !important;
	height: 340px !important;
	object-fit: cover !important;
	border-radius: 8px;
	margin-bottom: 0;
	max-width: none;
}
.nzm-products-slider .splide__slide { width: 260px; }
.nzm-product-card { display: flex; flex-direction: column; }
.nzm-product-card__media {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 16px;
}
.nzm-product-card__imglink { display: block; }
.nzm-product-card__img { transition: transform 0.4s ease; }
/* ביטול אפקט ה-pill הישן על hover — מציגים overlay במקום */
.nzm-product-card:hover .nzm-product-card__img,
.nzm-product-card:focus-within .nzm-product-card__img {
	border-radius: 8px !important;
	transform: scale(1.04);
}
.nzm-product-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: rgba(0, 0, 0, 0.38);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}
.nzm-product-card__media:hover .nzm-product-card__overlay,
.nzm-product-card__media:focus-within .nzm-product-card__overlay {
	opacity: 1;
	pointer-events: auto;
}
.nzm-card-quickadd,
.nzm-card-quickview {
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-weight: 600;
	border-radius: 50px;
	padding: 11px 26px;
	font-size: 15px;
	transition: opacity 0.2s ease, background 0.2s ease;
	min-width: 165px;
	text-align: center;
}
.nzm-card-quickadd { background: #000; color: #fff; }
.nzm-card-quickadd:hover { opacity: 0.85; }
.nzm-card-quickadd.is-added { background: #1c7a37; color: #fff; }
.nzm-card-quickadd.is-loading { opacity: 0.7; }
.nzm-card-quickview { background: #fff; color: #000; }
.nzm-card-quickview:hover { background: #efefef; }

@media (max-width: 768px) {
	.woocommerce .nzm-product-card__img,
	body.single-product .nzm-product-card__img { height: 300px !important; }
	/* במובייל אין hover — overlay תחתון תמידי עם quick-add בלבד */
	.nzm-product-card__overlay {
		opacity: 1;
		pointer-events: auto;
		background: transparent;
		justify-content: flex-end;
		padding-bottom: 12px;
	}
	.nzm-card-quickview { display: none; }
}

/* ===== מודאל Quick View ===== */
.nzm-qv-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.nzm-qv-modal.is-open { display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.nzm-qv-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.nzm-qv-modal__dialog {
	position: relative;
	background: #fff;
	max-width: 1200px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	margin: 0;
	border-radius: 12px;
	padding: 34px;
	box-sizing: border-box;
}
.nzm-qv-modal__close {
	position: absolute;
	top: 12px;
	inset-inline-end: 16px;
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #000;
	z-index: 2;
}
.nzm-qv { display: flex; gap: 32px; align-items: flex-start; }
.nzm-qv__media { flex: 0 0 46%; max-width: 46%; }
/* תמונה ראשית — גובה מוקטן */
.nzm-qv__main {
	width: 100%;
	aspect-ratio: 4 / 3;
	max-height: 340px;
	background: #f5f5f5;
	border-radius: 10px;
	overflow: hidden;
}
.nzm-qv__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* גלריית thumbnails — ריבועים שווים ~5 + גלילה אופקית */
.nzm-qv__thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: thin;
}
.nzm-qv__thumb {
	flex: 0 0 auto;
	width: calc((100% - 32px) / 5); /* ~5 ביחד */
	min-width: 58px;
	aspect-ratio: 1 / 1;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	overflow: hidden;
	padding: 0;
	background: #fff;
	cursor: pointer;
}
.nzm-qv__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nzm-qv__thumb.is-active { border: 2px solid #000; }
.nzm-qv__thumb:hover { border-color: #000; }

.nzm-qv__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nzm-qv__title { font-size: clamp(22px, 2.4vw, 32px); margin: 0 0 14px; color: #000; font-family: var(--nzm-header-font, inherit); line-height: 1.2; }
.nzm-qv__info .nzm-product-page__offer-timer { margin-bottom: 16px; }
.nzm-qv__price { font-size: 26px; font-weight: 800; color: #000; margin-bottom: 14px; }
.nzm-qv__price del, .nzm-qv__price del .amount { color: #9a9a9a; font-weight: 400; margin-inline-end: 8px; font-size: 20px; }
.nzm-qv__price ins { text-decoration: none; }
.nzm-qv__desc { margin-bottom: 20px; color: #444; line-height: 1.6; font-size: 15px; }
/* טופס add-to-cart בפופאפ — qty stepper + כפתור באותו קו */
.nzm-qv__info form.cart { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin: 0 0 6px; }
.nzm-qv__info .quantity.nzm-qty {
	display: inline-flex; align-items: stretch; border: 1px solid #c7c7c7;
	border-radius: 60px; overflow: hidden; background: #fff; height: 52px;
}
.nzm-qv__info .quantity.nzm-qty .nzm-qty__btn {
	width: 46px; border: none; background: transparent; font-size: 24px; color: #000;
	cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.nzm-qv__info .quantity.nzm-qty .nzm-qty__btn:hover { background: #f0f0f0; }
.nzm-qv__info .quantity.nzm-qty input.qty {
	width: 54px; border: none; border-inline: 1px solid #ededed; text-align: center;
	font-size: 19px; font-weight: 500; color: #000; -moz-appearance: textfield;
}
.nzm-qv__info .quantity.nzm-qty input.qty::-webkit-outer-spin-button,
.nzm-qv__info .quantity.nzm-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nzm-qv__info .single_add_to_cart_button {
	background: #000 !important; color: #fff !important; border: none !important;
	border-radius: 50px !important; padding: 12px 36px; min-height: 52px; cursor: pointer;
	font-weight: 600; font-size: 18px; flex: 1 1 auto; transition: opacity 0.2s ease;
}
.nzm-qv__info .single_add_to_cart_button:hover { opacity: 0.85; }
.nzm-qv__full { display: inline-block; margin-top: 18px; text-decoration: underline; color: #000; font-weight: 500; }
.nzm-qv__loading { padding: 50px; text-align: center; color: #555; }
body.nzm-qv-lock { overflow: hidden; }
@media (max-width: 768px) {
	.nzm-qv { flex-direction: column; gap: 16px; }
	.nzm-qv__media { flex-basis: auto; max-width: 100%; }
	.nzm-qv-modal__dialog { padding: 22px; }
}
