/* NewLife Shop — header cart button + cart drawer (all pages). */

:root {
	--nls-d-accent: #1d8bb2;
	--nls-d-ink: #146a89;
	--nls-d-ink: color-mix(in srgb, var(--nls-d-accent) 72%, #000);
	--nls-d-soft: #eef7fa;
	--nls-d-soft: color-mix(in srgb, var(--nls-d-accent) 8%, #fff);
	--nls-d-text: #1c2024;
	--nls-d-muted: #5f6770;
	--nls-d-line: #dde1e6;
	--nls-d-ok: #1e7b3a;
}

/* ---------- header button ---------- */

a.nls-mc {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--nls-d-ink) !important;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	padding: 6px 4px;
	border-radius: 8px;
}

a.nls-mc:hover .nls-mc-icon {
	transform: translateY(-1px);
}

a.nls-mc:focus-visible {
	outline: 3px solid var(--nls-d-accent);
	outline-offset: 3px;
}

.nls-mc-icon {
	position: relative;
	display: inline-flex;
	transition: transform .15s;
}

.nls-mc-count {
	position: absolute;
	top: -6px;
	right: -9px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--nls-d-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
}

.nls-mc-count.is-empty {
	display: none;
}

.nls-mc-total:empty {
	display: none;
}

.screen-reader-text.nls-mc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* WooCommerce's "Преглед на количката" link after a list button — the drawer shows it. */
.added_to_cart.wc-forward {
	display: none !important;
}

/* ---------- drawer ---------- */

.nls-drawer {
	position: fixed;
	inset: 0;
	z-index: 2147482500;
	font-size: 16px;
	line-height: 1.45;
	color: var(--nls-d-text);
}

.nls-drawer[hidden] {
	display: none !important;
}

.nls-drawer *,
.nls-drawer *::before,
.nls-drawer *::after {
	box-sizing: border-box;
}

.nls-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 18, 24, .45);
	opacity: 0;
	transition: opacity .2s;
}

.nls-drawer.is-open .nls-drawer-backdrop {
	opacity: 1;
}

.nls-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(440px, 100vw);
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: -12px 0 40px rgba(12, 18, 24, .2);
	transform: translateX(100%);
	transition: transform .22s ease-out;
	outline: none;
}

.nls-drawer.is-open .nls-drawer-panel {
	transform: translateX(0);
}

html.nls-d-lock,
html.nls-d-lock body {
	overflow: hidden;
}

.nls-dr-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 16px 14px 20px;
	padding-top: calc(16px + env(safe-area-inset-top));
	border-bottom: 1px solid var(--nls-d-line);
}

.nls-dr-title {
	margin: 0;
	padding: 0;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--nls-d-text);
}

.nls-dr-count {
	color: var(--nls-d-muted);
	font-weight: 600;
}

.nls-dr-close {
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--nls-d-text);
	cursor: pointer;
	padding: 0;
}

.nls-dr-close:hover {
	background: #f3f4f6;
}

.nls-dr-close:focus-visible {
	outline: 3px solid var(--nls-d-accent);
	outline-offset: 0;
}

.nls-dr-added {
	margin: 12px 16px 0;
	padding: 10px 14px;
	border-radius: 8px;
	background: #eef8f1;
	border: 1px solid #bfe3ca;
	color: #17602d;
	font-weight: 700;
	font-size: 15px;
}

.nls-dr-added[hidden] {
	display: none;
}

.nls-drawer-content {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.nls-drawer.is-busy .nls-drawer-content {
	opacity: .6;
	pointer-events: none;
	transition: opacity .15s;
}

.nls-dr-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 16px 16px 20px;
}

.nls-dr-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nls-dr-item {
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr) auto;
	gap: 12px;
	margin: 0;
	padding: 14px 0;
	list-style: none;
	border-bottom: 1px solid var(--nls-d-line);
	transition: opacity .2s;
}

.nls-dr-item::before,
.nls-dr-rec::before {
	display: none;
}

.nls-dr-item.is-removing {
	opacity: .35;
}

.nls-dr-thumb img {
	display: block;
	width: 60px;
	height: 80px;
	object-fit: cover;
	border-radius: 5px;
	border: 1px solid var(--nls-d-line);
	margin: 0;
	background: #fafafa;
}

.nls-dr-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nls-drawer a.nls-dr-name {
	color: var(--nls-d-text);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none;
}

.nls-drawer a.nls-dr-name:hover {
	text-decoration: underline;
}

.nls-dr-author,
.nls-dr-muted {
	font-size: 13px;
	color: var(--nls-d-muted);
	font-weight: 400;
}

.nls-dr-unit {
	font-size: 13px;
}

.nls-dr-unit del,
.nls-dr-line del {
	color: var(--nls-d-muted);
	font-weight: 400;
}

.nls-dr-unit ins,
.nls-dr-line ins {
	text-decoration: none;
}

.nls-dr-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.nls-dr-qty {
	display: inline-flex;
	border: 1px solid #b9c0c8;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.nls-dr-qbtn {
	width: 36px;
	height: 36px;
	border: 0;
	background: #fff;
	color: var(--nls-d-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.nls-dr-qbtn:hover {
	background: #f3f4f6;
}

.nls-drawer input.nls-dr-qinput {
	width: 44px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--nls-d-line);
	border-right: 1px solid var(--nls-d-line);
	border-radius: 0;
	background: #fff;
	color: var(--nls-d-text);
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
	box-shadow: none;
}

.nls-dr-qinput::-webkit-outer-spin-button,
.nls-dr-qinput::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.nls-dr-remove {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--nls-d-muted);
	cursor: pointer;
	padding: 0;
}

.nls-dr-remove:hover {
	background: #fdf1f0;
	color: #b3261e;
}

.nls-dr-qbtn:focus-visible,
.nls-dr-remove:focus-visible,
.nls-dr-tier:focus-visible {
	outline: 2px solid var(--nls-d-accent);
	outline-offset: -2px;
}

.nls-dr-tier {
	align-self: flex-start;
	margin-top: 8px;
	padding: 6px 10px;
	border: 1px dashed color-mix(in srgb, var(--nls-d-accent) 55%, #fff);
	border-radius: 8px;
	background: var(--nls-d-soft);
	color: var(--nls-d-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

.nls-dr-tier:hover {
	border-style: solid;
}

.nls-dr-tier .woocommerce-Price-amount {
	font-weight: 800;
}

.nls-dr-line {
	font-weight: 800;
	font-size: 15px;
	text-align: right;
	white-space: nowrap;
}

.nls-dr-line del {
	display: block;
	font-size: 12px;
}

/* Recommendations */
.nls-dr-recs {
	margin-top: 18px;
}

.nls-dr-recs-title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--nls-d-muted);
}

.nls-dr-recs ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nls-dr-rec {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid var(--nls-d-line);
	border-radius: 8px;
}

.nls-dr-rec-thumb img {
	display: block;
	width: 40px;
	height: 54px;
	object-fit: cover;
	border-radius: 4px;
	margin: 0;
}

.nls-dr-rec-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nls-drawer a.nls-dr-rec-name {
	color: var(--nls-d-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.nls-dr-rec-price {
	font-size: 13px;
	font-weight: 700;
}

.nls-dr-rec-price del {
	color: var(--nls-d-muted);
	font-weight: 400;
}

.nls-dr-rec-price ins {
	text-decoration: none;
}

.nls-drawer a.nls-dr-rec-add {
	padding: 7px 10px;
	border: 1px solid var(--nls-d-accent);
	border-radius: 8px;
	background: #fff;
	color: var(--nls-d-ink);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
}

.nls-drawer a.nls-dr-rec-add:hover {
	background: var(--nls-d-soft);
}

.nls-drawer a.nls-dr-rec-add.loading {
	opacity: .6;
}

/* Footer */
.nls-dr-foot {
	padding: 14px 20px;
	padding-bottom: calc(14px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--nls-d-line);
	background: #fff;
	box-shadow: 0 -6px 16px rgba(12, 18, 24, .05);
}

.nls-dr-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
	font-size: 17px;
}

.nls-dr-total span {
	font-weight: 700;
}

.nls-dr-total small {
	font-weight: 400;
	font-size: 13px;
	color: var(--nls-d-muted);
}

.nls-dr-total strong {
	font-size: 22px;
	font-weight: 800;
}

.nls-dr-note {
	margin: 0 0 12px;
	padding: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--nls-d-muted);
}

.nls-drawer a.nls-dr-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	text-decoration: none;
	font-weight: 700;
}

.nls-drawer a.nls-dr-btn--primary {
	min-height: 54px;
	border-radius: 10px;
	background: var(--nls-d-accent);
	color: #fff;
	font-size: 18px;
}

.nls-drawer a.nls-dr-btn--primary:hover {
	filter: brightness(.92);
}

.nls-drawer a.nls-dr-btn--link {
	min-height: 44px;
	margin-top: 4px;
	color: var(--nls-d-ink);
	font-size: 15px;
}

.nls-drawer a.nls-dr-btn--link:hover {
	text-decoration: underline;
}

.nls-drawer a.nls-dr-btn:focus-visible {
	outline: 3px solid var(--nls-d-ink);
	outline-offset: 2px;
}

/* Empty */
.nls-dr-empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px 24px;
	text-align: center;
}

.nls-dr-empty-icon {
	color: var(--nls-d-accent);
}

.nls-dr-empty-title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
}

.nls-dr-empty .nls-dr-btn--primary {
	max-width: 260px;
}

/* Error under the product-page button */
.nls-add-error {
	width: 100%;
	margin: 8px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fdf1f0;
	color: #b3261e;
	font-size: 14px;
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	.nls-drawer-panel,
	.nls-drawer-backdrop {
		transition: none;
	}
}

/* Variation line (e.g. "Цвят: Бял") */
.nls-drawer dl.variation,
body.nls-active .nls-item-body dl.variation {
	display: flex;
	flex-wrap: wrap;
	gap: 0 4px;
	margin: 2px 0 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--nls-d-muted, #5f6770);
}

.nls-drawer dl.variation dt,
.nls-drawer dl.variation dd,
body.nls-active .nls-item-body dl.variation dt,
body.nls-active .nls-item-body dl.variation dd {
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: 400;
	float: none;
}

.nls-drawer dl.variation dd p,
body.nls-active .nls-item-body dl.variation dd p {
	margin: 0;
	padding: 0;
	display: inline;
}

.nls-drawer dl.variation dd::after,
body.nls-active .nls-item-body dl.variation dd::after {
	content: "";
	display: block;
	flex-basis: 100%;
}

/* ---------- header: "Моят профил" icon ---------- */
.nls-hdr-icons {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

a.nls-acc-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--nls-d-ink) !important;
	text-decoration: none !important;
	padding: 6px 4px;
	border-radius: 8px;
	line-height: 1;
}

a.nls-acc-icon:hover svg {
	transform: translateY(-1px);
}

a.nls-acc-icon svg {
	transition: transform .15s;
}

a.nls-acc-icon:focus-visible {
	outline: 3px solid var(--nls-d-accent);
	outline-offset: 3px;
}

a.nls-acc-icon.is-in::after {
	content: "";
	position: absolute;
	right: 2px;
	bottom: 6px;
	width: 9px;
	height: 9px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--nls-d-ok);
}

/* In Divi's mobile menu bar, next to its cart icon. */
a.nls-acc-icon--menu {
	margin: 0 11px;
	padding: 0;
	color: var(--gcid-primary-color, var(--nls-d-ink)) !important;
}

a.nls-acc-icon--menu::after {
	font-family: inherit !important;
}

a.nls-acc-icon--menu.is-in::after {
	content: "";
}

a.nls-acc-icon--menu svg {
	width: 27px;
	height: 27px;
}

/* Phones: four items (cart, profile, search, menu) must fit on one row. */
@media (max-width: 980px) {
	.et_pb_menu__wrap:has(.nls-acc-icon--menu) {
		flex-wrap: nowrap !important;
	}

	.et_pb_menu__wrap:has(.nls-acc-icon--menu) .et_pb_menu__icon {
		margin: 0 5px !important;
	}

	.et_pb_menu__wrap:has(.nls-acc-icon--menu) .et_mobile_nav_menu {
		margin-left: 5px !important;
	}

	a.nls-acc-icon--menu svg {
		width: 25px;
		height: 25px;
	}
}
