/* Ecopromos - Vista previa de logo */
.eco-vp {
	--eco-dark: #173c2b;
	--eco-green: #7fa86a;
	--eco-wa: #1faa53;
	position: relative;
	margin-bottom: 2em;
}

.eco-vp__stage {
	position: relative;
	aspect-ratio: 1;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(23, 60, 43, .08);
	user-select: none;
	-webkit-user-select: none;
}

.eco-vp__bag {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}

.eco-vp__zone {
	position: absolute;
	outline: 2px dashed rgba(23, 60, 43, .45);
	outline-offset: 2px;
	border-radius: 2px;
	transition: outline-color .2s;
}

.eco-vp.has-logo .eco-vp__zone { outline-color: transparent; }
.eco-vp.has-logo .eco-vp__stage:hover .eco-vp__zone,
.eco-vp.dragging .eco-vp__zone { outline-color: rgba(127, 168, 106, .9); }

.eco-vp__hint {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	text-align: center;
	font-weight: 700;
	font-size: clamp(12px, 2.4vw, 18px);
	letter-spacing: .04em;
	text-transform: uppercase;
	color: rgba(23, 60, 43, .55);
	mix-blend-mode: multiply;
	pointer-events: none;
}
.eco-vp.has-logo .eco-vp__hint { display: none; }

.eco-vp__logo {
	position: absolute;
	transform: translate(-50%, -50%);
	max-width: none;
	height: auto;
	cursor: grab;
	touch-action: none;
}
.eco-vp.dragging .eco-vp__logo { cursor: grabbing; }
.eco-vp [hidden] { display: none !important; }

.eco-vp__medidas-btn {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 6px 12px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	color: var(--eco-dark);
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
	cursor: pointer;
}
.eco-vp__medidas-btn:hover { background: #fff; }

.eco-vp__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0 14px;
}

.eco-vp__swatch {
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: 50%;
	border: 3px solid #fff;
	background: var(--sw);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
	cursor: pointer;
	transition: transform .15s, box-shadow .15s;
}
/* El tema pinta de verde los botones en :hover/:focus/:active; los círculos conservan su color. */
.eco-vp .eco-vp__swatch:hover,
.eco-vp .eco-vp__swatch:focus,
.eco-vp .eco-vp__swatch:active {
	background: var(--sw) !important;
	border-color: #fff;
	color: inherit;
}
.eco-vp .eco-vp__swatch:hover { transform: scale(1.08); }
.eco-vp .eco-vp__swatch:focus-visible { outline: 2px solid var(--eco-dark); outline-offset: 2px; }
.eco-vp .eco-vp__swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--eco-dark); }

.eco-vp__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
}

.eco-vp__upload {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 8px;
	background: var(--eco-dark);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}
.eco-vp__upload:hover { background: #22533c; }
.eco-vp__upload::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l5 5h-3v6h-4V8H7l5-5zm-8 14h16v4H4v-4z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l5 5h-3v6h-4V8H7l5-5zm-8 14h16v4H4v-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.eco-vp__upload input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.eco-vp__edit {
	display: flex;
	align-items: center;
	gap: 14px;
}
.eco-vp__edit[hidden] { display: none; }

.eco-vp__size {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	color: var(--eco-dark);
}
.eco-vp__size input[type="range"] {
	width: 120px;
	height: auto;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	-webkit-appearance: auto;
	appearance: auto;
	accent-color: var(--eco-dark);
}

.eco-vp__remove {
	padding: 0;
	border: 0;
	background: none;
	color: #a33;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

.eco-vp__note {
	margin: 12px 0 16px;
	font-size: 13px;
	line-height: 1.5;
	color: #5b6b62;
}

.eco-vp__wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--eco-wa);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
}
.eco-vp__wa:hover { background: #178a43; }
.eco-vp__wa:disabled { opacity: .7; cursor: wait; }

/* La ventana se mueve a <body> al cargar: no hereda las variables de .eco-vp. */
.eco-vp__modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(10, 25, 18, .78);
	cursor: default; /* zoom-out no se dibuja en algunos Windows: el puntero desaparecía */
}
.eco-vp__modal[hidden] { display: none !important; }
.eco-vp__modal img {
	max-width: min(92vw, 800px);
	max-height: 82vh;
	border-radius: 12px;
	background: #fff;
}
.eco-vp__modal-close {
	position: fixed;
	top: max(16px, env(safe-area-inset-top));
	right: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #173c2b;
	font-size: 28px;
	line-height: 1;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	cursor: pointer;
}
html.eco-vp-modal-open,
html.eco-vp-modal-open body { overflow: hidden; }

@media (max-width: 600px) {
	.eco-vp__tools { flex-direction: column; align-items: stretch; }
	.eco-vp__upload { justify-content: center; }
	.eco-vp__edit { justify-content: space-between; }
}

/* Telas oscuras: guía en blanco para que se vea. */
.eco-vp.is-dark .eco-vp__zone { outline-color: rgba(255, 255, 255, .7); }
.eco-vp.is-dark .eco-vp__hint { color: rgba(255, 255, 255, .85); mix-blend-mode: normal; }
.eco-vp.is-dark.has-logo .eco-vp__zone { outline-color: transparent; }
.eco-vp.is-dark.has-logo .eco-vp__stage:hover .eco-vp__zone,
.eco-vp.is-dark.dragging .eco-vp__zone { outline-color: rgba(255, 255, 255, .8); }

/* Más fotos del producto */
.eco-vp__fotos { margin-top: 1.4em; }
.eco-vp__fotos-titulo { margin: 0 0 .5em; font-size: 14px; font-weight: 700; color: var(--eco-dark); }
.eco-vp__fotos-lista { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.eco-vp .eco-vp__foto {
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	padding: 0;
	border: 1px solid rgba(23, 60, 43, .15);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
}
.eco-vp .eco-vp__foto:hover,
.eco-vp .eco-vp__foto:focus-visible { border-color: var(--eco-dark); background: #fff; }
.eco-vp__foto img { display: block; width: 100%; height: 100%; object-fit: cover; }

.eco-vp__modal-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0 0 4px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #173c2b;
	font-size: 34px;
	line-height: 1;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	cursor: pointer;
}
.eco-vp__modal-prev { left: 12px; }
.eco-vp__modal-next { right: 12px; }
.eco-vp__modal-count {
	position: fixed;
	bottom: max(16px, env(safe-area-inset-bottom));
	left: 50%;
	transform: translateX(-50%);
	padding: 4px 12px;
	border-radius: 20px;
	background: rgba(255, 255, 255, .9);
	color: #173c2b;
	font-size: 14px;
	font-weight: 600;
}
.eco-vp__modal:has(.eco-vp__modal-nav) img { cursor: pointer; }
