/*
 * LAHI — fereastra „Coșul tău” / „Comanda ta”, cantitatea, bara de livrare gratuită.
 * Pe paginile de magazin se incarca normal; in rest, lahi.js o aduce la primul clic pe coș.
 */

/* ---------- fereastra „Coșul tău” / „Comanda ta” (se poate deschide de pe orice pagina) ---------- */

.lahi-qty {
	display: flex;
	flex: none;
	border: 1px solid rgba(110, 26, 28, .35);
	background: rgba(255, 255, 255, .45);
}
.lahi-qty button {
	width: 38px;
	padding: 0;
	background: none;
	border: 0;
	font-size: 20px;
	color: var(--lahi-red);
	cursor: pointer;
}
.lahi-qty input[type="number"] {
	width: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}
.lahi-qty input::-webkit-outer-spin-button,
.lahi-qty input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.lahi-ship {
	margin: 0 0 24px;
	padding: 16px 20px;
	background: #FBF7F0;
	border: 1px solid var(--lahi-cream-soft);
	font-family: var(--font-label);
	font-size: 14px;
}
.lahi-ship p {
	margin: 0 0 10px;
}
.lahi-ship__bar {
	display: block;
	height: 3px;
	background: var(--lahi-cream-soft);
}
.lahi-ship__bar span {
	display: block;
	height: 100%;
	background: var(--lahi-gold);
}
.lahi-co-intro {
	max-width: 560px;
	margin: 0 0 28px;
}
.lahi-co-intro .lahi-eyebrow {
	margin-bottom: 10px;
	color: var(--lahi-gold-lo);
}
.lahi-co-intro h2 {
	margin: 0 0 10px;
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.25;
}
.lahi-co-intro p {
	margin: 0;
	font-family: var(--font-accent);
	font-style: italic;
	font-size: 20px;
	color: var(--lahi-brown);
}
.lahi-om__visual {
	background: radial-gradient(ellipse at 50% 45%, #F8F1E7 0, var(--lahi-cream-soft) 75%);
}

/* ---------- fereastra „Comanda ta” ---------- */

html.lahi-om-lock,
html.lahi-om-lock body {
	overflow: hidden;
}
.lahi-om {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lahi-om__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(75, 9, 11, .55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	animation: lahi-fade .25s ease;
}
.lahi-om__box {
	position: relative;
	display: grid;
	grid-template-columns: 380px minmax(0, 1fr);
	width: min(1080px, calc(100vw - 48px));
	height: min(900px, calc(100vh - 48px));
	background: var(--lahi-cream);
	border: 1px solid var(--lahi-gold);
	box-shadow: 0 40px 120px rgba(11, 10, 8, .45);
	animation: lahi-om-in .35s cubic-bezier(.2, .8, .2, 1);
}
.lahi-om__side {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	background: radial-gradient(ellipse at 50% 30%, #7C2426 0, var(--lahi-red) 45%, var(--lahi-red-deep) 100%);
	color: var(--lahi-cream);
}
.lahi-om__visual {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	color: var(--lahi-gold);
}
.lahi-om__visual img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.lahi-om__visual .lahi-pack {
	font-size: min(8px, 1.1vh);
}
.lahi-om__visual .lahi-logo__mark {
	width: 150px;
	color: var(--lahi-red); /* auriu pe crem e interzis (2,1:1) */
}
.lahi-om__info {
	padding: 26px 32px 30px;
	border-top: var(--lahi-line-gold);
	background: rgba(11, 10, 8, .18);
}
.lahi-om__eyebrow {
	display: block;
	font-family: var(--font-label);
	font-size: 10px;
	letter-spacing: .32em;
	text-transform: uppercase;
	color: var(--lahi-gold);
}
.lahi-om__title {
	margin: 8px 0 14px;
	font-size: 22px;
	line-height: 1.25;
	color: var(--lahi-cream);
}
.lahi-om__sum {
	display: none;
}
.lahi-om__items {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	max-height: 132px;
	overflow-y: auto;
}
.lahi-om__items li,
.lahi-om__totals div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 6px 0;
	font-family: var(--font-label);
	font-size: 13px;
	line-height: 1.4;
}
.lahi-om__items small {
	display: block;
	font-size: 11px;
	color: rgba(243, 233, 220, .65);
}
.lahi-om__items li span:last-child,
.lahi-om__totals dd {
	white-space: nowrap;
}
.lahi-om__totals {
	margin: 0;
	padding-top: 8px;
	border-top: 1px solid rgba(199, 154, 100, .3);
}
.lahi-om__totals dt {
	color: rgba(243, 233, 220, .7);
}
.lahi-om__totals dd {
	margin: 0;
}
.lahi-om__totals .is-total {
	font-size: 17px;
	color: var(--lahi-gold);
}
.lahi-om__totals .is-total dt {
	color: var(--lahi-gold);
}
.lahi-om__line {
	margin: 16px 0 0;
	font-family: var(--font-accent);
	font-style: italic;
	font-size: 17px;
	line-height: 1.35;
	color: rgba(243, 233, 220, .85);
}
.lahi-om.is-done .lahi-om__items,
.lahi-om.is-done .lahi-om__totals {
	opacity: .55;
}
.lahi-om__main {
	position: relative;
	min-height: 0;
	background: var(--lahi-cream);
}
.lahi-om__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	opacity: 0;
	transition: opacity .25s;
}
.lahi-om.is-ready .lahi-om__frame {
	opacity: 1;
}
.lahi-om__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lahi-om.is-ready .lahi-om__loading {
	display: none;
}
.lahi-om__loading span {
	width: 14px;
	height: 22px;
	background: var(--lahi-seal);
	animation: lahi-pulse 1s ease-in-out infinite alternate;
}
.lahi-om__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 42px;
	height: 42px;
	padding: 0;
	background: #fff;
	border: 1px solid rgba(199, 154, 100, .6);
	font-size: 24px;
	line-height: 1;
	color: var(--lahi-red);
	cursor: pointer;
}
.lahi-om__close:hover {
	background: var(--lahi-red);
	color: var(--lahi-cream);
}
@keyframes lahi-fade { from { opacity: 0; } }
@keyframes lahi-om-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes lahi-sheet-in { from { transform: translateY(100%); } }
@keyframes lahi-pulse { to { opacity: .35; transform: scale(.85); } }

@media (max-width: 767px) {
	.lahi-om {
		align-items: flex-end;
	}
	.lahi-om__box {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr);
		/* ca pe ababi: margini vizibile in jur, se vede ca e o fereastra peste pagina */
		width: calc(100% - 20px);
		height: calc(94% - 10px); /* % din fereastra fixa: fara unitati svh/dvh/lvh in CSS — pe iOS strica pozitia tuturor elementelor fixed */
		margin-bottom: max(10px, env(safe-area-inset-bottom));
		border-width: 1px;
		box-shadow: 0 20px 60px rgba(11, 10, 8, .5);
		animation: lahi-sheet-in .35s cubic-bezier(.2, .8, .2, 1);
	}
	.lahi-om__side {
		flex-direction: row;
		align-items: center;
		gap: 14px;
		padding: 14px 66px 14px 16px;
	}
	.lahi-om__visual {
		flex: 0 0 48px;
		height: 66px;
	}
	.lahi-om__visual .lahi-pack {
		font-size: 1.75px;
		box-shadow: none;
	}
	.lahi-om__visual .lahi-logo__mark {
		width: 44px;
	}
	.lahi-om__info {
		min-width: 0;
		padding: 0;
		border: 0;
		background: none;
	}
	.lahi-om__title {
		margin: 3px 0 2px;
		font-size: 16px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.lahi-om__sum {
		display: block;
		margin: 0;
		font-family: var(--font-label);
		font-size: 13px;
		color: var(--lahi-gold);
	}
	.lahi-om__items,
	.lahi-om__totals,
	.lahi-om__line {
		display: none;
	}
	.lahi-om__close {
		top: 50%;
		transform: translateY(-50%);
		border-radius: 50%;
	}
	.lahi-om__box > .lahi-om__close {
		top: 47px;
	}
}

/* coșul in fereastra */
.lahi-om__cart {
	position: absolute;
	inset: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 36px 44px 40px;
	background: var(--lahi-cream);
}
.lahi-om.is-cart .lahi-om__frame,
.lahi-om.is-cart .lahi-om__loading,
.lahi-om.is-cart .lahi-om__items {
	display: none;
}
.lahi-om.is-busy .lahi-cl__list,
.lahi-om.is-busy .lahi-cl__total {
	opacity: .55;
	transition: opacity .15s;
}
.lahi-om__back {
	position: absolute;
	top: 18px;
	left: 20px;
	z-index: 2;
	padding: 8px 12px;
	background: var(--lahi-cream);
	border: 1px solid rgba(199, 154, 100, .6);
	font-family: var(--font-label);
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--lahi-red);
	cursor: pointer;
}
.lahi-om__back:not([hidden]) ~ .lahi-om__frame {
	height: calc(100% - 56px);
	margin-top: 56px;
}
.lahi-cl {
	max-width: 620px;
}
.lahi-cl__list {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	border-top: 1px solid var(--lahi-red);
}
.lahi-cl__item {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto auto 28px;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--lahi-cream-soft);
	transition: opacity .2s;
}
.lahi-cl__item.is-leaving {
	opacity: .3;
}
.lahi-cl__img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 80px;
	overflow: hidden;
	background: var(--lahi-cream-soft);
}
.lahi-cl__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.lahi-cl__ph {
	position: relative;
	width: 34px;
	height: 50px;
	background: linear-gradient(100deg, #5A1416, #6E1A1C 35%, #7C2426 60%, #641719);
	box-shadow: 0 3px 8px rgba(75, 9, 11, .25);
}
.lahi-cl__ph::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 50%;
	width: 5px;
	height: 8px;
	transform: translateX(-50%);
	background: var(--lahi-seal);
}
.lahi-cl__name {
	display: block;
	font-family: var(--font-display);
	font-size: 14px;
	letter-spacing: .1em;
	line-height: 1.3;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--lahi-coal);
}
.lahi-cl__info small,
.lahi-cl__unit {
	display: block;
	margin-top: 3px;
	font-family: var(--font-label);
	font-size: 12px;
	color: var(--lahi-brown);
}
.lahi-cl__qty {
	height: 40px;
}
.lahi-cl__qty span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	font-family: var(--font-label);
	font-size: 15px;
}
.lahi-cl__qty button:disabled {
	opacity: .3;
	cursor: default;
}
.lahi-cl__price {
	min-width: 78px;
	text-align: right;
	font-family: var(--font-label);
	font-size: 15px;
	color: var(--lahi-red);
}
.lahi-cl__rm {
	width: 28px;
	height: 28px;
	padding: 0;
	background: none;
	border: 0;
	font-size: 22px;
	line-height: 1;
	color: var(--lahi-brown);
	cursor: pointer;
}
.lahi-cl__rm:hover {
	color: var(--lahi-red-bright);
}
.lahi-cl__coupons {
	list-style: none;
	margin: 0;
	padding: 0;
}
.lahi-cl__coupons li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--lahi-cream-soft);
	font-family: var(--font-label);
	font-size: 14px;
	color: var(--lahi-red);
}
.lahi-cl__coupons .lahi-link {
	margin-left: 10px;
	font-size: 10px;
}
.lahi-cl__coupon {
	margin: 14px 0 0;
}
.lahi-cl__coupon summary {
	cursor: pointer;
	font-family: var(--font-label);
	font-size: 13px;
	color: var(--lahi-brown);
	text-decoration: underline;
	text-decoration-color: var(--lahi-gold);
	text-underline-offset: 4px;
}
.lahi-cl__coupon-form {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}
.lahi-cl__coupon-form input {
	flex: 1;
	min-width: 0;
	height: 46px;
	background: #F8F1E7;
	border-color: transparent;
}
.lahi-cl__coupon-form button {
	padding: 0 20px;
}
.lahi-cl__msg {
	margin: 10px 0 0;
	font-family: var(--font-label);
	font-size: 13px;
	color: var(--lahi-red-bright);
}
.lahi-cl__msg:empty {
	display: none;
}
.lahi-cl__foot {
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--lahi-red);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}
.lahi-cl__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	width: 100%;
	font-family: var(--font-label);
	font-size: 15px;
}
.lahi-cl__total strong {
	font-weight: 500;
	font-size: 22px;
	color: var(--lahi-red);
}
.lahi-cl__note {
	align-self: stretch;
	margin: -6px 0 0;
	font-family: var(--font-label);
	font-size: 12px;
	color: var(--lahi-brown);
}
.lahi-cl__go {
	width: 100%;
	padding: 21px 20px;
}
.lahi-cl__empty {
	margin: 40px 0 28px;
	font-family: var(--font-accent);
	font-style: italic;
	font-size: 28px;
	line-height: 1.3;
	color: var(--lahi-red-deep);
}
@media (max-width: 767px) {
	.lahi-om__cart {
		padding: 24px 16px 32px;
	}
	.lahi-cl__item {
		grid-template-columns: 56px minmax(0, 1fr) auto 28px;
		grid-template-areas: "img info info rm" "img qty price price";
		gap: 10px 12px;
	}
	.lahi-cl__img {
		grid-area: img;
		width: 56px;
		height: 72px;
		align-self: start;
	}
	.lahi-cl__info { grid-area: info; }
	.lahi-cl__qty { grid-area: qty; justify-self: start; }
	.lahi-cl__price { grid-area: price; align-self: center; }
	.lahi-cl__rm { grid-area: rm; align-self: start; }
	.lahi-om__back {
		top: 10px;
		left: 12px;
	}
}

/* colturi rotunjite */
.lahi-om__box {
	border-radius: var(--lahi-r-lg);
	overflow: hidden;
}
.lahi-om__close {
	border-radius: 50%;
}
.lahi-om__back,
.lahi-qty,
.lahi-cl__coupon-form input,
.lahi-cl__img {
	border-radius: var(--lahi-r-sm);
	overflow: hidden;
}
.lahi-ship {
	border-radius: var(--lahi-r);
}
.lahi-ship__bar,
.lahi-ship__bar span {
	border-radius: 2px;
}
.lahi-cl__ph {
	border-radius: 3px;
}
