:root {
			--ecd-ink: #11202a;
			--ecd-primary: #55606e;
			--ecd-muted: #889095;
			--ecd-line: #e1e1e1;
			--ecd-light: #f8f8f8;
			--ecd-success: #718b75;
			--ecd-error: #a5342a;
		}

		#ecd-overlay,
		#ecd-overlay * {
			box-sizing: border-box;
		}

		#ecd-overlay {
			position: fixed;
			inset: 0;
			z-index: 999999;
			visibility: hidden;
			opacity: 0;
			background: rgba(17, 32, 42, 0.55);
			transition: opacity 0.2s ease, visibility 0.2s ease;
		}

		#ecd-overlay.is-open {
			visibility: visible;
			opacity: 1;
		}

		.ecd-drawer {
			position: absolute;
			top: 0;
			right: 0;
			width: min(460px, 100%);
			height: 100%;
			overflow-y: auto;
			background: #fff;
			color: var(--ecd-primary);
			font-family: inherit;
			box-shadow: -12px 0 42px rgba(17, 32, 42, 0.2);
			transform: translateX(100%);
			transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.25, 1);
			-webkit-overflow-scrolling: touch;
		}

		#ecd-overlay.is-open .ecd-drawer {
			transform: translateX(0);
		}

		.ecd-content {
			padding: 0 30px 30px;
		}

		.ecd-is-busy {
			pointer-events: none;
			opacity: 0.62;
		}

		/* Mesajele rămân sus, vizibile, fără să împingă utilizatorul să le caute. */
		.ecd-message {
			display: none;
			position: sticky;
			top: 0;
			z-index: 5;
			padding: 12px 42px 12px 15px;
			border-bottom: 1px solid #efc9c5;
			background: #fdf2f1;
			color: var(--ecd-error);
			font-size: 12.5px;
			line-height: 1.35;
		}

		.ecd-message.is-visible {
			display: block;
		}

		.ecd-message button {
			position: absolute;
			top: 7px;
			right: 10px;
			width: 27px;
			height: 27px;
			border: 0;
			background: transparent;
			color: inherit;
			font: 22px/1 Arial, sans-serif;
			cursor: pointer;
		}

		.ecd-header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			min-height: 68px;
			padding: 16px 0;
			border-bottom: 1px solid var(--ecd-line);
		}

		.ecd-success {
			display: flex;
			align-items: center;
			gap: 9px;
			color: var(--ecd-ink);
			font-size: 14px;
			outline: 0;
		}

		.ecd-success > span {
			display: grid;
			width: 25px;
			height: 25px;
			place-items: center;
			border-radius: 50%;
			background: var(--ecd-success);
			color: #fff;
		}

		.ecd-success svg,
		.ecd-added-heading svg {
			width: 14px;
			fill: none;
			stroke: currentColor;
			stroke-width: 2.6;
			stroke-linecap: round;
			stroke-linejoin: round;
		}

		.ecd-close {
			width: 34px;
			height: 34px;
			margin-right: -6px;
			border: 0;
			border-radius: 50%;
			background: transparent;
			color: var(--ecd-muted);
			font: 300 28px/1 Arial, sans-serif;
			cursor: pointer;
		}

		.ecd-close:hover,
		.ecd-close:focus-visible {
			background: var(--ecd-light);
			color: var(--ecd-ink);
			outline: 0;
		}

		/* Produsul principal */
		.ecd-product {
			display: grid;
			grid-template-columns: 78px minmax(0, 1fr) auto;
			gap: 14px;
			align-items: start;
			padding: 20px 0;
			border-bottom: 1px solid var(--ecd-line);
		}

		.ecd-product-image {
			width: 78px;
			height: 92px;
			overflow: hidden;
			background: var(--ecd-light);
		}

		.ecd-product-image img {
			display: block !important;
			width: 100% !important;
			height: 100% !important;
			margin: 0 !important;
			object-fit: cover;
		}

		.ecd-product-info {
			min-width: 0;
			padding-top: 2px;
		}

		.ecd-product-info > a {
			display: block;
			color: var(--ecd-ink) !important;
			font-size: 14px;
			font-weight: 700;
			line-height: 1.35;
			text-decoration: none;
		}

		.ecd-product-info > a:hover {
			text-decoration: underline;
		}

		.ecd-product-meta,
		.ecd-product-meta p {
			display: block;
			margin: 3px 0 0 !important;
			color: var(--ecd-muted);
			font-size: 12px;
			line-height: 1.35;
		}

		.ecd-product-info > span {
			display: block;
			margin-top: 8px;
			color: var(--ecd-primary);
			font-size: 12.5px;
			font-weight: 600;
		}

		.ecd-product-side {
			min-width: 88px;
			text-align: right;
		}

		.ecd-product-side > strong {
			display: block;
			margin-top: 8px;
			color: var(--ecd-ink);
			font-size: 14px;
			white-space: nowrap;
		}

		/* Controlul de cantitate */
		.ecd-qty-control {
			display: inline-flex;
			align-items: center;
			overflow: hidden;
			border: 1px solid var(--ecd-line);
			border-radius: 4px;
			background: #fff;
		}

		.ecd-qty-button {
			display: grid;
			width: 30px;
			height: 32px;
			place-items: center;
			padding: 0;
			border: 0;
			background: #fff;
			color: var(--ecd-primary);
			font-size: 18px;
			line-height: 1;
			cursor: pointer;
		}

		.ecd-qty-button:hover,
		.ecd-qty-button:focus-visible {
			background: var(--ecd-light);
			color: var(--ecd-ink);
			outline: 0;
		}

		.ecd-qty-input {
			width: 42px !important;
			height: 32px !important;
			min-height: 0 !important;
			margin: 0 !important;
			padding: 0 !important;
			border: 0 !important;
			border-right: 1px solid var(--ecd-line) !important;
			border-left: 1px solid var(--ecd-line) !important;
			border-radius: 0 !important;
			background: #fff !important;
			box-shadow: none !important;
			color: var(--ecd-ink) !important;
			font-size: 12px !important;
			font-weight: 700;
			text-align: center;
		}

		.ecd-qty-input:focus {
			outline: 2px solid var(--ecd-muted);
			outline-offset: -2px;
		}

		/* Accesorii: rânduri simple pe desktop, fără carduri grele. */
		.ecd-extras {
			padding: 20px 0 16px;
			border-bottom: 1px solid var(--ecd-line);
		}

		.ecd-extras-heading {
			display: flex;
			align-items: baseline;
			justify-content: space-between;
			margin-bottom: 8px;
		}

		.ecd-extras-heading h3 {
			margin: 0;
			color: var(--ecd-primary);
			font-family: inherit;
			font-size: 12px;
			font-weight: 700;
			letter-spacing: 0.02em;
		}

		.ecd-extras-heading small {
			color: var(--ecd-muted);
			font-size: 10px;
			font-style: italic;
		}

		.ecd-extra {
			border-bottom: 1px solid var(--ecd-line);
			background: #fff;
		}

		.ecd-extra.is-active {
			background: var(--ecd-light);
		}

		.ecd-extra-main {
			display: flex;
			min-height: 76px;
			align-items: center;
			gap: 11px;
			padding: 16px 0;
			cursor: pointer;
		}

		.ecd-extra.is-active .ecd-extra-main {
			padding-right: 12px;
			padding-left: 12px;
		}

		.ecd-extra-main input {
			position: absolute;
			width: 1px;
			height: 1px;
			opacity: 0;
		}

		.ecd-radio {
			display: grid;
			width: 18px;
			height: 18px;
			flex: 0 0 18px;
			place-items: center;
			border: 1px solid var(--ecd-muted);
			border-radius: 50%;
			background: #fff;
		}

		.ecd-radio::after {
			width: 8px;
			height: 8px;
			border-radius: 50%;
			background: #fff;
			content: '';
			opacity: 0;
			transform: scale(0.4);
			transition: opacity 0.16s, transform 0.16s;
		}

		.ecd-extra-main input:checked + .ecd-radio {
			border-color: var(--ecd-primary);
			background: var(--ecd-primary);
		}

		.ecd-extra-main input:checked + .ecd-radio::after {
			opacity: 1;
			transform: scale(1);
		}

		.ecd-extra-main input:focus-visible + .ecd-radio {
			outline: 2px solid var(--ecd-ink);
			outline-offset: 2px;
		}

		.ecd-extra-copy {
			min-width: 0;
			flex: 1;
		}

		.ecd-extra-copy strong {
			display: block;
			color: var(--ecd-ink);
			font-size: 13.5px;
			line-height: 1.3;
		}

		.ecd-extra-copy small {
			display: block;
			margin-top: 2px;
			color: var(--ecd-muted);
			font-size: 11.5px;
			line-height: 1.35;
		}

		.ecd-extra-price {
			color: var(--ecd-primary);
			font-size: 13px;
			font-weight: 700;
			white-space: nowrap;
		}

		.ecd-extra-price small {
			font-size: 10.5px;
			font-weight: 400;
		}

		.ecd-extra-settings {
			display: none;
			align-items: center;
			justify-content: space-between;
			gap: 12px;
			padding: 0 12px 14px;
			background: var(--ecd-light);
		}

		.ecd-extra.is-active .ecd-extra-settings {
			display: flex;
		}

		.ecd-setting-label {
			color: var(--ecd-muted);
			font-size: 11.5px;
		}

			.ecd-zipper-settings,
			.ecd-lining-settings {
				flex-wrap: wrap;
				justify-content: flex-start;
			}

			.ecd-zipper-settings .ecd-add-extra,
			.ecd-lining-settings .ecd-add-extra {
				flex: 0 0 100%;
				margin-left: 0;
			}

		.ecd-size-list {
			display: flex;
			overflow: hidden;
			border: 1px solid var(--ecd-line);
			border-radius: 4px;
		}

		.ecd-size-option {
			min-width: 40px;
			height: 32px;
			padding: 0 8px;
			border: 0;
			border-right: 1px solid var(--ecd-line);
			background: #fff;
			color: var(--ecd-primary);
			font: 600 11px/1 inherit;
			cursor: pointer;
		}

		.ecd-size-option:last-child {
			border-right: 0;
		}

		.ecd-size-option:hover,
		.ecd-size-option:focus-visible {
			background: var(--ecd-light);
			outline: 0;
		}

		.ecd-size-option.is-selected {
			background: var(--ecd-primary);
			color: #fff;
		}

			/* Butonul aparține fiecărui card: alegi, configurezi, apoi adaugi exact acel accesoriu. */
			.ecd-add-extra {
				display: inline-flex;
				min-height: 34px;
				align-items: center;
				justify-content: center;
				gap: 7px;
				margin-left: auto;
				padding: 9px 11px;
				border: 1px solid var(--ecd-primary);
				border-radius: 4px;
				background: #fff;
				color: var(--ecd-primary);
				font: 700 11.5px/1.15 inherit;
				text-align: center;
				cursor: pointer;
			}

			.ecd-add-extra span {
				font-size: 17px;
				line-height: 0.6;
			}

			.ecd-add-extra:hover,
			.ecd-add-extra:focus-visible {
				background: var(--ecd-primary);
				color: #fff;
				outline: 0;
			}

		/* Accesorii deja atașate */
		.ecd-added-extras {
			margin: 16px 0;
			padding: 12px 13px;
			border: 1px solid #dce6df;
			border-radius: 5px;
			background: #f7faf8;
		}

		.ecd-added-heading {
			display: flex;
			align-items: center;
			gap: 5px;
			margin-bottom: 6px;
			color: var(--ecd-success);
			font-size: 12px;
			font-weight: 700;
		}

		.ecd-added-heading span {
			display: grid;
			place-items: center;
		}

		.ecd-added-row {
			display: flex;
			justify-content: space-between;
			gap: 9px;
			padding: 4px 0;
			color: var(--ecd-primary);
			font-size: 12px;
			line-height: 1.35;
		}

		.ecd-added-row small {
			color: var(--ecd-muted);
		}

		.ecd-added-row > span:last-child {
			white-space: nowrap;
		}

		.ecd-added-row button {
			margin-left: 5px;
			padding: 0;
			border: 0;
			background: transparent;
			color: var(--ecd-muted);
			font: 18px/0.7 Arial, sans-serif;
			vertical-align: -1px;
			cursor: pointer;
		}

		.ecd-added-row button:hover,
		.ecd-added-row button:focus-visible {
			color: var(--ecd-error);
			outline: 0;
		}

		/* Footer: CTA dominant, acțiuni secundare clar subordonate. */
		.ecd-footer {
			margin: 0 -30px -30px;
			padding: 18px 30px 20px;
			border-top: 1px solid var(--ecd-line);
			background: var(--ecd-light);
		}

		.ecd-total {
			display: flex;
			align-items: baseline;
			justify-content: space-between;
			margin-bottom: 14px;
			color: var(--ecd-primary);
			font-size: 13px;
			font-weight: 600;
		}

		.ecd-total strong {
			color: var(--ecd-ink);
			font-size: 21px;
			line-height: 1;
			white-space: nowrap;
		}

		.ecd-checkout {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 15px 17px;
			border-radius: 3px;
			background: var(--ecd-primary);
			color: #fff !important;
			font-size: 13px;
			font-weight: 700;
			letter-spacing: 0.02em;
			text-decoration: none;
			text-transform: uppercase;
		}

		.ecd-checkout:hover,
		.ecd-checkout:focus-visible {
			background: var(--ecd-ink);
			color: #fff !important;
			outline: 0;
		}

		.ecd-checkout b {
			font-size: 20px;
			line-height: 0.5;
		}

		.ecd-footer-actions {
			display: flex;
			align-items: center;
			justify-content: space-between;
			gap: 12px;
			margin-top: 12px;
		}

		.ecd-continue {
			padding: 8px 0;
			border: 0;
			background: transparent;
			color: var(--ecd-primary);
			font: 600 12px/1 inherit;
			cursor: pointer;
		}

		.ecd-continue:hover,
		.ecd-continue:focus-visible {
			color: var(--ecd-ink);
			outline: 0;
		}

		.ecd-view-cart {
			padding: 9px 13px;
			border: 1px solid var(--ecd-primary);
			border-radius: 3px;
			background: #fff;
			color: var(--ecd-primary) !important;
			font-size: 12px;
			font-weight: 700;
			line-height: 1;
			text-decoration: none;
		}

		.ecd-view-cart:hover,
		.ecd-view-cart:focus-visible {
			background: var(--ecd-primary);
			color: #fff !important;
			outline: 0;
		}

		.ecd-loader {
			display: grid;
			min-height: 180px;
			place-items: center;
		}

		.ecd-loader-content {
			text-align: center;
		}

		.ecd-loader-spinner {
			display: inline-block;
			width: 28px;
			height: 28px;
			border: 2px solid var(--ecd-line);
			border-top-color: var(--ecd-primary);
			border-radius: 50%;
			animation: ecd-spin 0.7s linear infinite;
		}

		.ecd-loader-text {
			display: block;
			margin-top: 12px;
			color: var(--ecd-muted);
			font-size: 12px;
		}

		.ecd-empty {
			padding: 55px 20px;
			text-align: center;
			color: var(--ecd-primary);
		}

		.ecd-empty strong {
			display: block;
			color: var(--ecd-ink);
		}

		.ecd-empty button {
			margin-top: 12px;
			padding: 0;
			border: 0;
			background: transparent;
			color: var(--ecd-primary);
			font: inherit;
			text-decoration: underline;
			cursor: pointer;
		}

		@keyframes ecd-spin {
			to {
				transform: rotate(360deg);
			}
		}

			/* Mobil: bottom-sheet cu înălțime adaptivă la conținut. */
			@media (max-width: 700px) {
				/*
				 * Fără `height` fix: produsele fără accesorii nu mai lasă spațiu gol.
				 * `max-height` menține scroll-ul pentru configurațiile mai lungi.
				 */
				.ecd-drawer {
					top: auto;
					right: 0;
					bottom: 0;
					width: 100%;
					height: auto;
					min-height: 0;
					max-height: min(86vh, 760px);
					max-height: min(86svh, 760px);
					max-height: min(86dvh, 760px);
					overflow-y: auto;
					border-radius: 18px 18px 0 0;
					transform: translateY(105%);
				}

				#ecd-overlay.is-open .ecd-drawer {
					transform: translateY(0);
				}

				.ecd-content {
					padding: 0 16px calc(16px + env(safe-area-inset-bottom));
				}

				.ecd-header {
					position: sticky;
					top: 0;
					z-index: 2;
					min-height: 54px;
					padding: 10px 0;
					background: #fff;
				}

				.ecd-product {
					grid-template-columns: 60px minmax(0, 1fr) auto;
					gap: 10px;
					padding: 12px 0;
				}

				.ecd-product-image {
					width: 60px;
					height: 70px;
				}

				.ecd-product-info > a {
					font-size: 13px;
				}

				.ecd-product-side {
					min-width: 76px;
				}

				.ecd-qty-button,
				.ecd-qty-input {
					height: 36px !important;
				}

				.ecd-qty-button {
					width: 32px;
					font-size: 18px;
				}

				.ecd-qty-input {
					width: 40px !important;
					font-size: 14px !important;
				}

				.ecd-extras {
					padding: 14px 0 12px;
				}

				.ecd-extras-heading {
					margin-bottom: 6px;
				}

				.ecd-extra {
					margin: 6px 0;
					border: 1px solid var(--ecd-line);
					border-radius: 7px;
					overflow: hidden;
				}

				.ecd-extra-main,
				.ecd-extra.is-active .ecd-extra-main {
					min-height: 60px;
					padding: 11px;
				}

				.ecd-extra-settings {
					flex-wrap: wrap;
					gap: 8px;
					padding: 0 11px 11px;
				}

				.ecd-zipper-settings,
				.ecd-lining-settings {
					flex-wrap: wrap;
				}

				.ecd-size-list {
					order: 1;
				}

				.ecd-zipper-settings .ecd-qty-control,
				.ecd-lining-settings .ecd-qty-control {
					order: 2;
				}

				.ecd-size-option {
					min-width: 34px;
					height: 36px;
					padding: 0 5px;
				}

				.ecd-add-extra {
					flex: 1 0 100%;
					min-height: 42px;
					margin-top: 2px;
					margin-left: 0;
				}

				.ecd-zipper-settings .ecd-add-extra,
				.ecd-lining-settings .ecd-add-extra {
					order: 3;
					width: 100%;
				}

				.ecd-footer {
					margin: 0 -16px calc(-16px - env(safe-area-inset-bottom));
					padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
				}

				.ecd-total {
					margin-bottom: 10px;
				}

				.ecd-total strong {
					font-size: 19px;
				}

				.ecd-checkout {
					min-height: 46px;
					font-size: 12.5px;
				}

				.ecd-footer-actions {
					gap: 10px;
					margin-top: 6px;
				}

				.ecd-continue {
					min-height: 36px;
					font-size: 11.5px;
					text-align: left;
				}

				.ecd-view-cart {
					display: inline-flex;
					min-width: 106px;
					min-height: 36px;
					align-items: center;
					justify-content: center;
					font-size: 11.5px;
				}
			}


		@media (prefers-reduced-motion: reduce) {
			#ecd-overlay,
			.ecd-drawer {
				transition: none;
			}

			.ecd-loader-spinner {
				animation: none;
			}
		}
