/**
 * עמוד ההזמנות — "ממטבחה של רונית".
 * Mobile-first. כל הצבעים והמידות מרוכזים במשתנים בראש הקובץ.
 */

.tanagi-page {
	--brand: #e03127;
	--brand-dark: #c32419;
	--ink: #1f1f1f;
	--ink-soft: #6b6b6b;
	--line: #e6e6e6;
	--bg: #f4f4f4;
	--surface: #fff;
	--surface-alt: #f7f7f7;
	--radius: 10px;
	--radius-lg: 14px;
	--shadow: 0 1px 3px rgba(0, 0, 0, .08);
	--shadow-lg: 0 8px 28px rgba(0, 0, 0, .16);
	--gap: 16px;
	--cats-w: 230px;
	--cart-w: 320px;
	--bar-h: 62px;

	direction: rtl;
	background: var(--bg);
	color: var(--ink);
	font-size: 15px;
	line-height: 1.5;
}

.tanagi-page *,
.tanagi-page *::before,
.tanagi-page *::after {
	box-sizing: border-box;
}

.tanagi-fallback {
	padding: 40px 16px;
	text-align: center;
	color: var(--ink-soft);
}

/* ── פריסה ───────────────────────────────────────────── */

.tanagi-layout {
	display: block;
	padding-bottom: calc(var(--bar-h) + 16px); /* מקום לבר המרחף */
}

.tanagi-intro {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin: var(--gap);
	padding: 14px 16px;
	font-size: 14px;
}

/* ── סרגל קטגוריות ───────────────────────────────────── */

.tanagi-cats {
	position: sticky;
	top: 0;
	z-index: 30;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.tanagi-cats__list {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.tanagi-cats__list::-webkit-scrollbar {
	display: none;
}

.tanagi-cats__item {
	flex: 0 0 auto;
	scroll-snap-align: center;
}

.tanagi-cats__link {
	display: block;
	padding: 7px 14px;
	border-radius: 999px;
	background: var(--surface-alt);
	color: var(--ink);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background .18s, color .18s;
}

.tanagi-cats__link.is-active {
	background: #fdeceb;
	color: var(--brand);
	font-weight: 700;
}

/* ── סקשן קטגוריה ────────────────────────────────────── */

.tanagi-items {
	padding: 0 var(--gap);
}

.tanagi-section {
	margin-top: var(--gap);
	/* דילוג על רינדור סקשנים מחוץ למסך — עמוד ארוך מאוד */
	content-visibility: auto;
	contain-intrinsic-size: auto 600px;
	scroll-margin-top: 70px;
}

.tanagi-section__title {
	margin: 0 0 8px;
	padding: 14px 16px;
	background: var(--surface);
	border-radius: var(--radius) var(--radius) 0 0;
	font-size: 19px;
	font-weight: 700;
}

.tanagi-section__desc {
	margin: -8px 0 8px;
	padding: 10px 16px;
	background: var(--surface-alt);
	color: var(--ink-soft);
	font-size: 13px;
}

.tanagi-section__items {
	background: var(--surface);
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

/* ── כרטיס מנה ───────────────────────────────────────── */

.tanagi-item {
	position: relative;
	display: grid;
	grid-template-columns: 96px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
}

.tanagi-item:last-child {
	border-bottom: 0;
}

/* שכבת לחיצה על כל הכרטיס — נגישה למקלדת */
.tanagi-item__open {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	z-index: 2;
}

.tanagi-item__open:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: -3px;
}

.tanagi-item__media {
	width: 96px;
	height: 96px;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface-alt);
}

.tanagi-item__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tanagi-item__body {
	min-width: 0;
}

.tanagi-item__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
}

.tanagi-item__desc {
	margin: 0;
	color: var(--ink-soft);
	font-size: 13px;
	/* קיצור לשלוש שורות */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tanagi-item__aside {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.tanagi-item__price {
	font-size: 15px;
	font-weight: 700;
}

.tanagi-item__price del {
	color: var(--ink-soft);
	font-weight: 400;
	font-size: 13px;
}

.tanagi-item__add {
	display: inline-flex;
	color: #1a8f4c;
}

/* ── עגלה ────────────────────────────────────────────── */

.tanagi-cart__inner {
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	padding: 16px;
}

.tanagi-cart__heading {
	margin: 0 0 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line);
	font-size: 17px;
	font-weight: 700;
}

.tanagi-cart__empty {
	padding: 18px 0 24px;
	text-align: center;
}

.tanagi-cart__empty-icon {
	max-width: 110px;
	height: auto;
}

.tanagi-cart__empty-title {
	margin: 14px 0 2px;
	font-size: 17px;
	font-weight: 700;
}

.tanagi-cart__empty-sub {
	margin: 0;
	color: var(--ink-soft);
	font-size: 14px;
}

.tanagi-cart__list {
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 46vh;
	overflow-y: auto;
}

.tanagi-cart__row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
}

.tanagi-cart__row-main {
	min-width: 0;
}

.tanagi-cart__row-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
}

.tanagi-cart__row-note {
	display: block;
	margin-top: 2px;
	color: var(--ink-soft);
	font-size: 12px;
	word-break: break-word;
}

.tanagi-cart__row-price {
	display: block;
	margin-top: 3px;
	font-size: 14px;
	font-weight: 700;
}

.tanagi-cart__qty {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--surface-alt);
	border-radius: 999px;
	padding: 3px;
}

.tanagi-cart__qty-value {
	min-width: 22px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
}

.tanagi-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s;
}

.tanagi-qty-btn:hover {
	background: var(--brand-dark);
}

.tanagi-cart__remove {
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ink-soft);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.tanagi-cart__remove:hover {
	color: var(--brand);
}

.tanagi-cart__totals {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0 4px;
	font-size: 16px;
}

.tanagi-cart__note {
	margin: 0 0 12px;
	color: var(--ink-soft);
	font-size: 12px;
}

.tanagi-cart__checkout {
	display: block;
	margin-top: 12px;
	padding: 13px;
	border-radius: var(--radius);
	background: var(--brand);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background .15s;
}

.tanagi-cart__checkout:hover,
.tanagi-cart__checkout:focus {
	background: var(--brand-dark);
	color: #fff;
}

.tanagi-cart__checkout.is-disabled {
	background: #d8d8d8;
	color: #fff;
	pointer-events: none;
}

.tanagi-cart__secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 12px 0 0;
	color: var(--ink-soft);
	font-size: 12px;
}

/* במובייל העגלה היא מגירה נשלפת מלמטה */
@media (max-width: 991px) {

	.tanagi-cart {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 60;
		max-height: 82vh;
		overflow-y: auto;
		background: var(--surface);
		border-radius: var(--radius-lg) var(--radius-lg) 0 0;
		box-shadow: var(--shadow-lg);
		transform: translateY(100%);
		transition: transform .28s ease;
	}

	.tanagi-cart.is-open {
		transform: translateY(0);
	}

	.tanagi-cart__inner {
		border-radius: 0;
		box-shadow: none;
		padding-bottom: 24px;
	}
}

/* ── בר עגלה מרחף (מובייל) ───────────────────────────── */

.tanagi-cartbar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 55;
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	height: var(--bar-h);
	padding: 0 14px;
	border: 0;
	background: var(--brand);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	cursor: pointer;
}

.tanagi-cartbar[hidden] {
	display: none;
}

.tanagi-cartbar__icon {
	position: relative;
	display: inline-flex;
}

.tanagi-cartbar__count {
	position: absolute;
	top: -6px;
	inset-inline-start: -8px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: #fff;
	color: var(--brand);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.tanagi-cartbar__total {
	font-weight: 700;
}

.tanagi-cartbar__cta {
	margin-inline-start: auto;
	font-weight: 700;
}

/* ── פופאפ מנה ───────────────────────────────────────── */

.tanagi-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tanagi-modal[hidden] {
	display: none;
}

.tanagi-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}

.tanagi-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 18px;
}

.tanagi-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.tanagi-modal__title {
	margin: 0;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
}

.tanagi-modal__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	color: var(--ink);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.tanagi-modal__media {
	display: flex;
	justify-content: flex-start;
	margin-bottom: 18px;
}

.tanagi-modal__img {
	width: 190px;
	height: 150px;
	object-fit: cover;
	border-radius: var(--radius);
	background: var(--surface-alt);
}

/* בלוק תוספות בתשלום */

.tanagi-modal__addons {
	margin-bottom: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

.tanagi-modal__addons[hidden] {
	display: none;
}

.tanagi-modal__addons-title {
	margin: 0;
	padding: 12px 14px;
	background: var(--surface-alt);
	border-bottom: 1px solid var(--line);
	font-size: 16px;
	font-weight: 700;
}

.tanagi-modal__addons-list {
	max-height: 210px;
	overflow-y: auto;
}

.tanagi-addon {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 14px;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
}

.tanagi-addon:last-child {
	border-bottom: 0;
}

.tanagi-addon:hover {
	background: var(--surface-alt);
}

.tanagi-addon__check {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	accent-color: var(--brand);
	cursor: pointer;
	margin: 0;
}

.tanagi-addon__name {
	flex: 1 1 auto;
	font-size: 15px;
}

.tanagi-addon__price {
	flex: 0 0 auto;
	color: var(--brand);
	font-size: 14px;
	font-weight: 600;
}

/* שורת סיכום התוספות בכרטיס המנה */
.tanagi-item__addons {
	margin: 4px 0 0;
	color: var(--ink-soft);
	font-size: 12px;
	line-height: 1.45;
}

.tanagi-modal__label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.tanagi-modal__label {
	font-size: 14px;
}

.tanagi-modal__label span {
	color: var(--ink-soft);
	font-weight: 400;
}

.tanagi-modal__counter {
	color: var(--ink-soft);
	font-size: 13px;
	direction: ltr;
}

.tanagi-modal__note {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
}

.tanagi-modal__note:focus {
	outline: 2px solid var(--brand);
	outline-offset: -1px;
	border-color: transparent;
}

.tanagi-modal__qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
	padding: 12px 14px;
	background: var(--surface-alt);
	border-radius: var(--radius);
}

.tanagi-modal__qty-label {
	font-size: 15px;
}

.tanagi-modal__qty {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tanagi-modal__qty-input {
	width: 56px;
	height: 34px;
	padding: 0 6px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface);
	font-size: 15px;
	text-align: center;
	-moz-appearance: textfield;
}

.tanagi-modal__qty-input::-webkit-outer-spin-button,
.tanagi-modal__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.tanagi-modal__qty .tanagi-qty-btn {
	width: 30px;
	height: 30px;
	font-size: 18px;
}

.tanagi-modal__qty-btn--minus {
	background: var(--brand);
}

.tanagi-modal__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px;
}

.tanagi-modal__total {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
}

.tanagi-modal__submit {
	padding: 12px 26px;
	border: 0;
	border-radius: var(--radius);
	background: var(--brand);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
}

.tanagi-modal__submit:hover {
	background: var(--brand-dark);
}

.tanagi-modal__submit[disabled] {
	background: #d8d8d8;
	cursor: default;
}

.tanagi-modal__error {
	margin: 12px 0 0;
	color: var(--brand);
	font-size: 14px;
}

.tanagi-modal__error[hidden] {
	display: none;
}

/* נעילת גלילת הרקע בזמן פופאפ פתוח */
body.tanagi-locked {
	overflow: hidden;
}

/* ── חלון מינימום הזמנה ──────────────────────────────── */

.tanagi-minmodal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 460px;
	padding: 32px 24px 26px;
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	text-align: center;
}

.tanagi-minmodal__title {
	margin: 0 0 20px;
	font-size: 27px;
	font-weight: 700;
}

.tanagi-minmodal__text {
	margin: 0 0 26px;
	font-size: 17px;
	line-height: 1.6;
}

.tanagi-minmodal__button {
	padding: 13px 34px;
	border: 0;
	border-radius: var(--radius);
	background: var(--brand);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
}

.tanagi-minmodal__button:hover {
	background: var(--brand-dark);
}

/* שורת "חסרים עוד X" בפאנל העגלה */
.tanagi-cart__minimum {
	margin: 10px 0 0;
	padding: 9px 12px;
	background: #fdeceb;
	border-radius: var(--radius);
	color: var(--brand);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

/* ── דסקטופ: שלוש עמודות ─────────────────────────────── */

@media (min-width: 992px) {

	.tanagi-page {
		padding: var(--gap) 0;
	}

	.tanagi-intro {
		max-width: 1280px;
		margin-inline: auto;
	}

	.tanagi-layout {
		display: grid;
		/* מימין לשמאל: קטגוריות, מנות, עגלה */
		grid-template-columns: var(--cats-w) minmax(0, 1fr) var(--cart-w);
		align-items: start;
		gap: var(--gap);
		max-width: 1280px;
		margin-inline: auto;
		padding: 0 var(--gap) var(--gap);
	}

	.tanagi-cats {
		order: 1;
		position: sticky;
		top: var(--gap);
		max-height: calc(100vh - var(--gap) * 2);
		overflow-y: auto;
		background: var(--surface);
		border: 0;
		border-radius: var(--radius-lg);
		box-shadow: var(--shadow);
		scrollbar-width: thin;
	}

	.tanagi-cats__list {
		display: block;
		padding: 8px;
		overflow: visible;
	}

	.tanagi-cats__item {
		display: block;
	}

	.tanagi-cats__link {
		padding: 10px 12px;
		border-radius: var(--radius);
		background: transparent;
		white-space: normal;
	}

	.tanagi-cats__link:hover {
		background: var(--surface-alt);
	}

	.tanagi-items {
		order: 2;
		padding: 0;
	}

	.tanagi-section:first-child {
		margin-top: 0;
	}

	.tanagi-cart {
		order: 3;
		position: sticky;
		top: var(--gap);
	}

	/* בדסקטופ אין בר מרחף — העגלה תמיד גלויה */
	.tanagi-cartbar {
		display: none !important;
	}

	.tanagi-item {
		grid-template-columns: 110px 1fr auto;
	}

	.tanagi-item__media {
		width: 110px;
		height: 110px;
	}
}

/* ── העדפת תנועה מופחתת ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {

	.tanagi-page *,
	.tanagi-modal * {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
