/* Popup "producto añadido al carrito" — Electricieza */

.elec-cp-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 17, 24, 39, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 20px;
	animation: elec-cp-fade 0.18s ease-out;
}

.elec-cp-overlay[hidden] {
	display: none;
}

@keyframes elec-cp-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.elec-cp-box {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 420px;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.25 );
	padding: 28px 26px 24px;
	text-align: center;
	animation: elec-cp-pop 0.2s ease-out;
}

@keyframes elec-cp-pop {
	from { transform: translateY( 12px ) scale( 0.97 ); opacity: 0; }
	to   { transform: translateY( 0 ) scale( 1 ); opacity: 1; }
}

.elec-cp-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 26px;
	line-height: 1;
	color: #9ca3af;
	cursor: pointer;
	padding: 4px;
}
.elec-cp-close:hover { color: #4b5563; }

.elec-cp-check {
	width: 56px;
	height: 56px;
	margin: 4px auto 14px;
	border-radius: 50%;
	background: #e7f7ec;
	color: #1ca64c;
	font-size: 30px;
	line-height: 56px;
	font-weight: 700;
}

.elec-cp-title {
	margin: 0 0 14px;
	font-size: 19px;
	font-weight: 700;
	color: #111827;
}

.elec-cp-product {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 22px;
	padding: 10px 12px;
	background: #f9fafb;
	border-radius: 10px;
	min-height: 46px;
}

.elec-cp-img {
	width: 46px;
	height: 46px;
	object-fit: contain;
	border-radius: 6px;
	background: #fff;
	flex: 0 0 auto;
}

.elec-cp-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.elec-cp-name {
	font-size: 15px;
	font-weight: 600;
	color: #374151;
	text-align: left;
}

.elec-cp-price {
	font-size: 14px;
	font-weight: 700;
	color: #1ca64c;
}
.elec-cp-price del { color: #9ca3af; font-weight: 400; margin-right: 4px; }

.elec-cp-totals {
	margin: 0 0 18px;
	padding: 12px 14px;
	background: #f9fafb;
	border-radius: 10px;
	font-size: 14px;
	color: #4b5563;
}
.elec-cp-totals[hidden] { display: none; }

.elec-cp-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 3px 0;
}

.elec-cp-row.elec-cp-total {
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid #e5e7eb;
	font-size: 16px;
	font-weight: 700;
	color: #111827;
}
.elec-cp-row.elec-cp-total > span:last-child {
	color: #1ca64c;
}

.elec-cp-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.elec-cp-actions > * {
	flex: 1 1 0;
	min-width: 140px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	border-radius: 9px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	border: 2px solid transparent;
	box-sizing: border-box;
	transition: background 0.15s, color 0.15s;
}

.elec-cp-continue {
	background: #fff;
	color: #374151;
	border-color: #d1d5db;
}
.elec-cp-continue:hover { background: #f3f4f6; }

.elec-cp-viewcart {
	background: #f5b800;
	color: #1f2937 !important;
}
.elec-cp-viewcart:hover { background: #e0a800; }

/* Evita scroll de fondo cuando el popup está abierto */
body.elec-cp-open {
	overflow: hidden;
}

/* Oculta el enlace soso "Ver carrito" que añade WooCommerce junto al botón:
   el popup ya ofrece esa opción. */
.woocommerce a.added_to_cart {
	display: none !important;
}

@media ( max-width: 480px ) {
	.elec-cp-actions > * { flex-basis: 100%; }
}
