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

:root {
	--acs-d-accent: #6a005d;
	--acs-d-ink: #56004c;
	--acs-d-ink: color-mix(in srgb, var(--acs-d-accent) 85%, #000);
	--acs-d-soft: #f8f0f6;
	--acs-d-soft: color-mix(in srgb, var(--acs-d-accent) 8%, #fff);
	--acs-d-text: #221a20;
	--acs-d-muted: #6b6168;
	--acs-d-line: #e6dde3;
	--acs-d-ok: #1e7b3a;
}

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

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

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

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

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

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

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

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

.screen-reader-text.acs-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 ---------- */

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

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

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

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

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

.acs-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;
}

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

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

.acs-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(--acs-d-line);
}

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

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

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

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

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

.acs-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;
}

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

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

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

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

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

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

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

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

.acs-dr-thumb img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: contain;
	border-radius: 8px;
	border: 1px solid var(--acs-d-line);
	margin: 0;
	background: #fff;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.acs-dr-rec-thumb img {
	display: block;
	width: 44px;
	height: 44px;
	object-fit: contain;
	border-radius: 4px;
	margin: 0;
}

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

.acs-drawer a.acs-dr-rec-name {
	color: var(--acs-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.acs-drawer .acs-dr-btn--primary:hover {
	filter: brightness(1.12);
}

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

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

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

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

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

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

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

/* Error under the product-page button */
.acs-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) {
	.acs-drawer-panel,
	.acs-drawer-backdrop {
		transition: none;
	}
}

/* Variation line (e.g. "Цвят: Бял") */
.acs-drawer 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(--acs-d-muted, #5f6770);
}

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

.acs-drawer dl.variation dd p{
	margin: 0;
	padding: 0;
	display: inline;
}

.acs-drawer dl.variation dd::after{
	content: "";
	display: block;
	flex-basis: 100%;
}


/* Buttons can be <a> or <button>. */
.acs-drawer .acs-dr-btn {
	border: 0;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.2;
	padding: 0 16px;
}

.acs-drawer .acs-dr-btn--primary {
	border-radius: 12px;
	box-shadow: 0 6px 16px color-mix(in srgb, var(--acs-d-accent) 25%, transparent);
}

.acs-drawer .acs-dr-btn--link {
	background: transparent;
}

.acs-dr-empty .acs-dr-btn--primary {
	padding: 0 24px;
}

/* "Спестявате …" */
.acs-dr-save {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	padding: 8px 12px;
	border-radius: 10px;
	background: #eef8f1;
	color: var(--acs-d-ok);
	font-size: 14px;
	font-weight: 700;
}

.acs-dr-save.is-empty {
	display: none;
}

.acs-dr-save svg {
	flex: none;
}

/* Sale: old line total above the new one. */
.acs-dr-line del {
	display: block;
	font-size: 12px;
	color: var(--acs-d-muted);
	font-weight: 400;
}

/* Header button: same purple as the Divi menu icons. */
a.acs-mc {
	color: var(--acs-d-accent) !important;
	padding: 4px;
}

/* Dual currency (€ / лв.) wraps neatly in narrow columns. */
.acs-dr-line,
.acs-dr-total strong {
	white-space: normal;
}

.acs-dr-line {
	max-width: 110px;
	line-height: 1.3;
}

/* Drawer total: label and amount on one line, the note under the label. */
.acs-dr-total {
	align-items: center;
}

.acs-dr-total span {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.acs-dr-total strong {
	font-size: 18px;
	text-align: right;
	line-height: 1.2;
	white-space: nowrap !important;
}

.acs-dr-total > span {
	flex: none;
}

/* Phones: Divi stacks the header's cart column under the menu row.
   Keep the cart in the same row as search + menu. */
@media (max-width: 980px) {
	.et_pb_row_0_tb_header:has(.acs-mc) {
		display: flex !important;
		align-items: center;
		flex-wrap: nowrap;
	}

	.et_pb_row_0_tb_header:has(.acs-mc) > .et_pb_column {
		width: auto !important;
		margin: 0 !important;
	}

	.et_pb_row_0_tb_header:has(.acs-mc) > .et_pb_column:first-child {
		flex: 1;
		min-width: 0;
	}

	/* The -57px pulled the page up under the old stacked cart row. */
	.et_pb_section_0_tb_header:has(.acs-mc) {
		margin-bottom: 0 !important;
	}

	.et_pb_row_0_tb_header:has(.acs-mc) > .et_pb_column:last-child {
		flex: none;
		order: 2;
		margin-left: 6px !important;
	}
}
