/*
 * Висувна панель кошика LikeOn.
 * Та сама мова, що в кошику й оформленні: чорнило #1a1a1a, акцент #6d7993, теплі тонкі лінії,
 * кремовий липкий низ, прямі кнопки з дрібним написом великими літерами.
 * Панель — це .mfp-content.off-canvas-cart від Flatsome (Magnific Popup); розмітка всередині — templates/mini-cart.php.
 */

/* ============================ панель ============================ */
.off-canvas-right .mfp-content.off-canvas-cart {
	width: 420px;
	max-width: calc(100vw - 36px);
	padding: 0;
	background: #fff;
	box-shadow: -24px 0 60px rgba(26, 26, 26, .12);
	transform: translateX(100%);
	transition: transform .32s cubic-bezier(.2, .7, .2, 1);
}
.off-canvas-right.mfp-ready .mfp-content.off-canvas-cart { transform: none; }
/* закриття — панель виїжджає назад, а не просто зникає */
.off-canvas-right.mfp-removing .mfp-content.off-canvas-cart { opacity: 1 !important; transform: translateX(100%); }

/* низ панелі притиснутий до низу екрана: #cart-popup на всю висоту, далі кожен рівень розтягується flex-ом */
.off-canvas-cart #cart-popup { display: flex; flex-direction: column; min-height: 100%; }
.off-canvas-cart .cart-popup-inner { display: flex; flex: 1 0 auto; flex-direction: column; }
.off-canvas-cart .cart-popup-inner.inner-padding { padding: 0; }
/* заголовок «КОШИК» із рискою від Flatsome — у нас свій, із кількістю товарів */
.off-canvas-cart .cart-popup-title { display: none; }
.off-canvas-cart .widget_shopping_cart_content { display: flex; flex: 1 0 auto; flex-direction: column; }

/* хрестик: біле коло з тонкою рамкою, як у швидкому перегляді; стоїть у шапці панелі */
.mfp-wrap.off-canvas-right .mfp-close {
	top: 14px;
	right: 16px;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #d9d4cc;
	border-radius: 50%;
	background: #fff;
	box-shadow: none;
	color: #1a1a1a !important;
	font-family: inherit;
	font-size: 24px;
	font-weight: 300;
	line-height: 38px;
	text-align: center;
	opacity: 1;
	mix-blend-mode: normal; /* Flatsome ставить difference — біле коло ставало чорним */
	transition: background-color .2s, border-color .2s, color .2s;
}
.mfp-wrap.off-canvas-right .mfp-close:hover,
.mfp-wrap.off-canvas-right .mfp-close:focus-visible { border-color: #1a1a1a; background: #1a1a1a; color: #fff !important; }

/* ============================ вміст ============================ */
.lcd {
	--lcd-ink: #1a1a1a;
	--lcd-accent: #6d7993;
	--lcd-muted: #6b6b6b;
	--lcd-soft: #8a8580;
	--lcd-line: #e8e5e0;
	--lcd-line2: #d9d4cc;
	--lcd-cream: #f7f6f3;
	--lcd-wine: #6d2c37;
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	color: var(--lcd-ink);
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
}

.lcd__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	padding: 21px 72px 17px 24px;
	border-bottom: 1px solid var(--lcd-line);
}
.lcd__title { margin: 0; color: var(--lcd-ink); font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; text-transform: none; }
.lcd__count { color: var(--lcd-soft); font-size: 13px; white-space: nowrap; }

/* смуга до безкоштовної доставки (якщо в магазині є безкоштовна доставка) */
.lcd .likeon-freeship { margin: 0; padding: 14px 24px; border-bottom: 1px solid var(--lcd-line); }
.lcd .likeon-freeship__text { margin: 0 0 8px; color: var(--lcd-ink); font-size: 13px; line-height: 1.45; }
.lcd .likeon-freeship__text--done { color: #2f6b45; font-weight: 600; }
.lcd .likeon-freeship__track { height: 4px; overflow: hidden; background: #ece8e2; }
.lcd .likeon-freeship__fill { height: 100%; background: var(--lcd-ink); transition: width .3s ease; }

/* товари */
.lcd ul.lcd__list { flex: 1 0 auto; margin: 0; padding: 4px 24px 12px; list-style: none; }
.lcd ul.lcd__list li.lcd-item {
	position: relative;
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 16px;
	min-height: 0;
	margin: 0;
	padding: 18px 30px 18px 0;
	overflow: visible;
	border: 0;
	border-bottom: 1px solid var(--lcd-line);
	line-height: 1.45;
	list-style: none;
}
.lcd ul.lcd__list li.lcd-item:last-child { border-bottom: 0; }
.lcd ul.lcd__list li.lcd-item::before { display: none; }

.lcd ul.lcd__list li .lcd-item__thumb { display: block; width: 84px; height: 105px; margin: 0; overflow: hidden; background: #ece8e2; }
.lcd ul.lcd__list li .lcd-item__thumb img {
	position: static;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform .4s ease;
}
.lcd ul.lcd__list li a.lcd-item__thumb:hover img { transform: scale(1.03); }

.lcd-item__body { display: flex; flex-direction: column; min-width: 0; }
.lcd ul.lcd__list li a.lcd-item__name,
.lcd ul.lcd__list li .lcd-item__name {
	display: -webkit-box;
	margin: 0;
	padding: 0;
	overflow: hidden;
	color: var(--lcd-ink);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.lcd ul.lcd__list li a.lcd-item__name:hover { color: var(--lcd-accent); }
.lcd-item__meta { margin: 4px 0 0; color: var(--lcd-soft); font-size: 12px; line-height: 1.45; }
.lcd-item__meta .lco-attr__k { color: var(--lcd-soft); }
.lcd-item__meta dl.variation { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; font-size: 12px; line-height: 1.45; }
.lcd-item__meta dl.variation dt,
.lcd-item__meta dl.variation dd { margin: 0; padding: 0; font-weight: 400; text-transform: none; }
.lcd-item__meta dl.variation dd p { margin: 0; }

.lcd-item__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }
.lcd-item__price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; text-align: right; white-space: nowrap; }
/* Стара ціна скрізь на сайті одного кольору — #6f6a64 (світліша не читалась). */
.lcd-item__price del { margin: 0 0 3px; color: #6f6a64; font-size: 12px; font-weight: 500; opacity: 1; }
.lcd-item__price del .amount { color: inherit; }
.lcd-item__sum { color: var(--lcd-ink); font-size: 15px; font-weight: 600; }

/* − 1 + */
.lcd .likeon-qty { display: inline-flex; align-items: stretch; height: 34px; margin: 0; border: 1px solid var(--lcd-line2); background: #fff; }
.lcd .likeon-qty.is-busy { opacity: .5; pointer-events: none; }
.lcd .likeon-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--lcd-ink);
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s;
}
.lcd .likeon-qty__btn:hover:not(:disabled) { background: #f2efea; }
.lcd .likeon-qty__btn:disabled { color: #c9c4bc; cursor: default; }
.lcd .likeon-qty__btn svg { display: block; }
.lcd .likeon-qty__val { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; font-size: 14px; font-weight: 500; }

/* хрестик «видалити» */
.lcd ul.lcd__list li a.lcd-item__remove {
	position: absolute;
	top: 14px;
	right: -6px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #a39e97;
	font-size: 0 !important;
	line-height: 0 !important;
	transition: background-color .2s, color .2s;
}
.lcd ul.lcd__list li a.lcd-item__remove:hover { background: #f2efea; color: var(--lcd-ink); }

/* ============================ низ ============================ */
.lcd__foot {
	position: sticky;
	bottom: 0;
	z-index: 3;
	margin: 0;
	padding: 18px 24px 22px;
	border-top: 1px solid var(--lcd-line);
	background: var(--lcd-cream);
}
.lcd dl.lcd__totals { margin: 0; padding: 0; }
.lcd .lcd__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 0; border: 0; text-align: left; }
.lcd .lcd__row + .lcd__row { margin-top: 6px; }
.lcd .lcd__row dt,
.lcd .lcd__row dd { margin: 0; padding: 0; font-weight: 400; letter-spacing: 0; text-transform: none; }
.lcd .lcd__row dt { color: #4a4a4a; font-size: 14px; }
.lcd .lcd__row dd { color: var(--lcd-ink); font-size: 14px; font-weight: 500; }
.lcd .lcd__row--save dd { color: var(--lcd-wine); }
.lcd .lcd__row--total dt { color: var(--lcd-ink); font-size: 15px; font-weight: 600; }
.lcd .lcd__row--total dd { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.lcd__note { margin: 4px 0 0; color: var(--lcd-soft); font-size: 12.5px; line-height: 1.45; }

.lcd__buttons { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; }
.lcd .lcd-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--lcd-ink);
	border-radius: 0;
	box-shadow: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color .2s, border-color .2s, color .2s;
}
.lcd .lcd-btn--primary { border-color: var(--lcd-ink); background: var(--lcd-ink); color: #fff; }
.lcd .lcd-btn--primary:hover { border-color: #333; background: #333; color: #fff; }
.lcd .lcd-btn--ghost { min-height: 46px; border-color: transparent; background: transparent; color: var(--lcd-ink); }
.lcd .lcd-btn--ghost:hover { border-color: var(--lcd-ink); background: #fff; color: var(--lcd-ink); }
.lcd .lcd-btn:focus-visible { outline: 2px solid var(--lcd-accent); outline-offset: 2px; }

/* ============================ порожній ============================ */
.lcd-empty {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 32px 72px;
	text-align: center;
}
.lcd-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 0 20px; border-radius: 50%; background: var(--lcd-cream); color: var(--lcd-ink); }
.lcd .lcd-empty__title { margin: 0 0 8px; padding: 0; border: 0; color: var(--lcd-ink); font-size: 20px; font-weight: 600; text-align: center; }
.lcd-empty__text { max-width: 280px; margin: 0 0 24px; color: var(--lcd-muted); font-size: 14px; line-height: 1.55; }
.lcd-empty .lcd-btn { width: auto; min-width: 220px; }

/* ============================ телефон ============================ */
@media (max-width: 549px) {
	.off-canvas-right .mfp-content.off-canvas-cart { max-width: calc(100vw - 28px); }
	.lcd__head { padding: 18px 64px 14px 18px; }
	.lcd__title { font-size: 18px; }
	.mfp-wrap.off-canvas-right .mfp-close { top: 11px; right: 12px; }
	.lcd ul.lcd__list { padding: 0 18px 8px; }
	.lcd ul.lcd__list li.lcd-item { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px 26px 16px 0; }
	.lcd ul.lcd__list li .lcd-item__thumb { width: 72px; height: 90px; }
	.lcd__foot { padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); }
	.lcd .lcd__row--total dd { font-size: 20px; }
	.lcd__buttons { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.off-canvas-right .mfp-content.off-canvas-cart,
	.lcd ul.lcd__list li .lcd-item__thumb img { transition: none; }
}
