/* Nuolaidų taisyklės – parduotuvė (šriftai ir spalvos paveldimi iš temos) */
:root {
	--ndr-a: var(--wd-primary-color, #c0392b);
	--ndr-ink: var(--wd-title-color, #1f2328);
}

.ndr-box {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 22px;
}

.ndr-offer {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid rgba(0, 0, 0, .1);
	border-left: 3px solid var(--ndr-a);
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
}

.ndr-offer__icon {
	display: inline-flex;
	flex: 0 0 auto;
	margin-top: 1px;
	color: var(--ndr-a);
}

.ndr-offer__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ndr-offer__title { font-weight: 600; color: var(--ndr-ink); }
.ndr-offer__meta { font-size: 12.5px; opacity: .7; }

/* Ženkliukai */
.product-labels .product-label.ndr-label { background-color: var(--ndr-a); color: #fff; }
.ndr-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ndr-a);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
}

/* Krepšelis */
.ndr-gift-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--ndr-a);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.7;
	vertical-align: middle;
}
.ndr-free { font-weight: 700; color: var(--ndr-a); }
.ndr-gift-qty { display: inline-block; min-width: 32px; text-align: center; font-weight: 600; }
.ndr-savings th, .ndr-savings td { color: var(--ndr-a); }
.ndr-savings td .amount { color: inherit; font-weight: 700; }

/* Diagnostika (tik administratoriui) */
.ndr-debug { margin: 0 0 24px; padding: 16px 18px; border: 2px dashed #2271b1; border-radius: 8px; background: #f6faff; font-size: 13px; line-height: 1.5; color: #1d2327; }
.ndr-debug__head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 12px; }
.ndr-debug__head span { color: #50575e; font-size: 12px; }
.ndr-debug__rule { padding: 10px 12px; margin-top: 8px; border-radius: 6px; background: #fff; border-left: 4px solid #d63638; }
.ndr-debug__rule--ok { border-left-color: #00a32a; }
.ndr-debug__title { font-weight: 600; }
.ndr-debug__title small { margin-left: 8px; font-weight: 400; color: #8c8f94; }
.ndr-debug__result { margin-top: 2px; }
.ndr-debug__items { margin: 6px 0 0 !important; padding: 0 0 0 18px !important; font-size: 12px; }
.ndr-debug__items li { margin: 2px 0; list-style: disc; }
.ndr-debug__items li.is-no { color: #b32d2e; }
.ndr-debug__items li.is-yes { color: #007017; }
.ndr-debug__warn { margin: 10px 0 0; padding: 8px 10px; background: #fcf0e1; border-radius: 6px; color: #8a4b00; }

/* =========================================================
   Dovanos pasirinkimo langas
   ========================================================= */
body.ndr-modal-open { overflow: hidden; }

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

.ndr-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, .5);
	opacity: 0;
	transition: opacity .18s ease;
}

.ndr-modal__panel {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px 26px 22px;
	border-radius: 14px;
	background: #fff;
	color: var(--ndr-ink);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
	outline: none;
	opacity: 0;
	transform: translateY(12px) scale(.98);
	transition: opacity .18s ease, transform .18s ease;
}

.ndr-modal.is-open .ndr-modal__backdrop { opacity: 1; }
.ndr-modal.is-open .ndr-modal__panel { opacity: 1; transform: none; }
.ndr-modal.is-closing .ndr-modal__backdrop,
.ndr-modal.is-closing .ndr-modal__panel { opacity: 0; }

.ndr-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	opacity: .55;
	cursor: pointer;
}
.ndr-modal__close:hover,
.ndr-modal__close:focus-visible { opacity: 1; background: rgba(0, 0, 0, .05); }

.ndr-modal__head { text-align: center; }

.ndr-modal__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 10px;
	border-radius: 50%;
	color: var(--ndr-a);
	background: rgba(0, 0, 0, .04);
	background: color-mix(in srgb, var(--ndr-a) 12%, transparent);
}

.ndr-modal__title {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.25;
	color: var(--ndr-ink);
}

.ndr-modal__lead {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.5;
	opacity: .75;
}

.ndr-modal__product {
	display: flex;
	justify-content: center;
	margin: 0 0 18px;
}
.ndr-modal__product img {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 10px;
}

.ndr-choices {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 18px;
}

.ndr-choices--images {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.ndr-choice { position: relative; margin: 0; cursor: pointer; }
.ndr-choice input { position: absolute; opacity: 0; pointer-events: none; }

.ndr-choice__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	height: 100%;
	padding: 9px 16px;
	border: 1.5px solid rgba(0, 0, 0, .14);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	transition: border-color .15s, background-color .15s;
}

.ndr-choices--images .ndr-choice__body { padding: 8px; border-radius: 10px; }
.ndr-choice__img img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.ndr-choice__label { line-height: 1.3; }
.ndr-choice__stock { font-size: 11px; opacity: .7; }

.ndr-choice:hover .ndr-choice__body { border-color: rgba(0, 0, 0, .35); }
.ndr-choice input:checked + .ndr-choice__body {
	border-color: var(--ndr-a);
	background: rgba(0, 0, 0, .03);
	background: color-mix(in srgb, var(--ndr-a) 8%, transparent);
	box-shadow: inset 0 0 0 1px var(--ndr-a);
}
.ndr-choice input:focus-visible + .ndr-choice__body { outline: 2px solid var(--ndr-a); outline-offset: 2px; }
.ndr-choice.is-disabled { cursor: not-allowed; }
.ndr-choice.is-disabled .ndr-choice__body { opacity: .4; text-decoration: line-through; }

.ndr-modal__error {
	margin: -6px 0 14px;
	padding: 8px 12px;
	border-radius: 8px;
	background: #fdecea;
	color: #a1271b;
	font-size: 13px;
	text-align: center;
}

.ndr-modal__actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.ndr-modal__confirm { width: 100%; justify-content: center; }
.ndr-modal__confirm[disabled] { opacity: .5; cursor: not-allowed; }

.ndr-modal__later {
	padding: 8px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 13px;
	opacity: .65;
	text-decoration: underline;
	cursor: pointer;
}
.ndr-modal__later:hover { opacity: 1; }

.ndr-modal__done { padding: 30px 10px; text-align: center; font-size: 16px; font-weight: 600; }

.ndr-change-gift { margin-left: 8px; font-size: 12px; text-decoration: underline; }

@media (max-width: 480px) {
	.ndr-modal { align-items: flex-end; padding: 0; }
	.ndr-modal__panel { max-width: none; border-radius: 16px 16px 0 0; padding: 26px 18px 18px; transform: translateY(30px); }
	.ndr-modal__title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.ndr-modal__backdrop, .ndr-modal__panel { transition: none; }
}

/* =========================================================
   Tekstas ant nuotraukos
   ========================================================= */
.ndr-img-texts {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
	max-width: calc(100% - 20px);
	pointer-events: none;
}

.ndr-img-texts--loop {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 4;
}

.ndr-img-texts--single {
	position: absolute;
	left: 15px;
	top: 15px;
	z-index: 5;
}

.ndr-img-texts--static { position: static; margin: 0 0 12px; }

.ndr-img-text {
	display: inline-block;
	max-width: 100%;
	padding: .35em .8em;
	border-radius: 6px;
	font-size: var(--ndr-s, 13px);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .01em;
	overflow-wrap: anywhere;
}

.ndr-img-text--nobg {
	padding: 0;
	border-radius: 0;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

@media (max-width: 600px) {
	.ndr-img-texts--loop { left: 6px; bottom: 6px; max-width: calc(100% - 12px); }
	.ndr-img-texts--loop .ndr-img-text { font-size: calc(var(--ndr-s, 13px) * .85); }
	.ndr-img-texts--single { left: 10px; top: 10px; }
	.ndr-img-texts--single .ndr-img-text { font-size: calc(var(--ndr-s, 16px) * .85); }
}
