/* ==========================================================================
   GEE Accesorios al Carrito
   Estilo inspirado en el bloque "También puede necesitar" de Bluetti.
   Todo va dentro de .gee-acc para no tocar nada del tema ni de Elementor.
   ========================================================================== */

.gee-acc {
	--gee-acc-boton: #003A55;
	--gee-acc-boton-hover: #00293c;
	--gee-acc-fondo: #f4f5f6;
	--gee-acc-tarjeta: #ffffff;
	--gee-acc-borde: #e3e5e8;
	--gee-acc-texto: #1a1a1a;
	--gee-acc-suave: #6b7177;
	--gee-acc-radio: 10px;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 20px 0;
	padding: 16px 14px 14px;
	background: var(--gee-acc-fondo);
	border-radius: var(--gee-acc-radio);
	font-family: inherit;
	color: var(--gee-acc-texto);
	/* Evita que el bloque se solape con elementos sticky del lateral. */
	position: relative;
	z-index: 1;
	clear: both;
	overflow: hidden;
}

.gee-acc *,
.gee-acc *::before,
.gee-acc *::after {
	box-sizing: border-box;
}

/* ---------- Aviso de modo prueba ---------- */
.gee-acc--prueba {
	outline: 2px dashed #d97706;
	outline-offset: 2px;
}

.gee-acc__aviso-prueba {
	margin: 0 0 12px;
	padding: 8px 10px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 6px;
	font-size: 12px;
	line-height: 1.4;
	color: #9a3412;
}

/* ---------- Cabecera ---------- */
.gee-acc__titulo {
	margin: 0 0 12px;
	padding: 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--gee-acc-texto);
	letter-spacing: -0.01em;
}

/* ---------- Lista con scroll interno ---------- */
.gee-acc__lista {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-right: 4px;
}

.gee-acc__lista::-webkit-scrollbar {
	width: 6px;
}

.gee-acc__lista::-webkit-scrollbar-thumb {
	background: #c9ced3;
	border-radius: 3px;
}

.gee-acc__lista::-webkit-scrollbar-track {
	background: transparent;
}

/* ---------- Tarjeta ---------- */
.gee-acc__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	background: var(--gee-acc-tarjeta);
	border: 1px solid var(--gee-acc-borde);
	border-radius: var(--gee-acc-radio);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.gee-acc__item:hover {
	border-color: #cdd2d7;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.gee-acc__item--agotado {
	opacity: .55;
}

/* ---------- Imagen ---------- */
.gee-acc__figura {
	flex: 0 0 68px;
	width: 68px;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
}

.gee-acc__figura img,
.gee-acc__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
	border-radius: 6px;
}

.gee-acc__img--vacia {
	background: #eef0f2;
}

/* ---------- Cuerpo ---------- */
.gee-acc__cuerpo {
	flex: 1 1 auto;
	min-width: 0;
}

/* El clic solo funciona sobre el texto del título, no en toda la fila. */
.gee-acc__nombre {
	margin: 0 0 6px;
	padding: 0;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: -0.005em;
}

.gee-acc__nombre a {
	display: inline;
	color: var(--gee-acc-texto);
	text-decoration: none;
	box-shadow: none;
}

.gee-acc__nombre a:hover,
.gee-acc__nombre a:focus-visible {
	text-decoration: underline;
	color: var(--gee-acc-boton);
}

/* ---------- Fila precio + acciones ---------- */
.gee-acc__fila {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.gee-acc__precios {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}

.gee-acc__precio {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--gee-acc-texto);
	white-space: nowrap;
}

.gee-acc__precio .woocommerce-Price-amount {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.gee-acc__precio-antiguo {
	font-size: 12px;
	line-height: 1.2;
	color: var(--gee-acc-suave);
	text-decoration: line-through;
	white-space: nowrap;
	order: 2;
}

.gee-acc__iva {
	display: block;
	width: 100%;
	font-size: 10px;
	line-height: 1.3;
	color: var(--gee-acc-suave);
	order: 3;
}

/* ---------- Selector de cantidad ---------- */
.gee-acc__acciones {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.gee-acc__cantidad {
	display: flex;
	align-items: center;
	height: 34px;
	border: 1px solid var(--gee-acc-borde);
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}

.gee-acc__paso {
	width: 30px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: var(--gee-acc-texto);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin: 0;
	border-radius: 0;
	transition: background .12s ease;
}

.gee-acc__paso:hover {
	background: #f1f3f4;
}

.gee-acc__paso:disabled {
	color: #c2c7cc;
	cursor: not-allowed;
	background: transparent;
}

.gee-acc__input {
	width: 38px;
	height: 32px;
	border: 0;
	border-left: 1px solid var(--gee-acc-borde);
	border-right: 1px solid var(--gee-acc-borde);
	text-align: center;
	font-size: 14px;
	line-height: 1;
	background: #fff;
	color: var(--gee-acc-texto);
	padding: 0;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.gee-acc__input:focus {
	outline: none;
	box-shadow: none;
}

.gee-acc__input::-webkit-outer-spin-button,
.gee-acc__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ---------- Botón añadir ---------- */
.gee-acc__boton {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 34px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 6px;
	background: var(--gee-acc-boton);
	color: #fff;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, transform .08s ease;
}

.gee-acc__boton:hover {
	background: var(--gee-acc-boton-hover);
	color: #fff;
}

.gee-acc__boton:active {
	transform: scale(.96);
}

.gee-acc__boton:focus-visible {
	outline: 2px solid var(--gee-acc-boton);
	outline-offset: 2px;
}

.gee-acc__boton--opciones {
	width: auto;
	padding: 0 14px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.gee-acc__icono,
.gee-acc__spinner,
.gee-acc__check {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.gee-acc__spinner,
.gee-acc__check {
	display: none;
}

.gee-acc__spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: gee-acc-giro .7s linear infinite;
}

@keyframes gee-acc-giro {
	to { transform: rotate(360deg); }
}

.gee-acc__boton.is-cargando { pointer-events: none; }
.gee-acc__boton.is-cargando .gee-acc__icono { display: none; }
.gee-acc__boton.is-cargando .gee-acc__spinner { display: flex; }

.gee-acc__boton.is-hecho { background: #16a34a; pointer-events: none; }
.gee-acc__boton.is-hecho .gee-acc__icono { display: none; }
.gee-acc__boton.is-hecho .gee-acc__check { display: flex; }

/* ---------- Estados y enlaces ---------- */
.gee-acc__agotado {
	font-size: 12px;
	font-weight: 600;
	color: var(--gee-acc-suave);
	white-space: nowrap;
}

.gee-acc__mas-info {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.3;
	color: var(--gee-acc-suave);
	text-decoration: underline;
}

.gee-acc__mas-info:hover {
	color: var(--gee-acc-boton);
}

.gee-acc__error {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.35;
	color: #b91c1c;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Lateral estrecho o tablet en vertical */
@media (max-width: 1200px) and (min-width: 993px) {
	.gee-acc__figura { flex-basis: 56px; width: 56px; height: 56px; }
	.gee-acc__nombre { font-size: 13px; }
}

/* Móvil y tablet: el lateral pasa a ocupar todo el ancho */
@media (max-width: 782px) {
	.gee-acc {
		padding: 14px 12px 12px;
	}

	.gee-acc__lista {
		max-height: none !important; /* en móvil no queremos scroll dentro de scroll */
	}

	.gee-acc__item {
		padding: 10px;
		gap: 10px;
	}

	.gee-acc__figura {
		flex-basis: 60px;
		width: 60px;
		height: 60px;
	}

	.gee-acc__fila {
		align-items: flex-end;
	}
}

@media (max-width: 420px) {
	.gee-acc__fila {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.gee-acc__acciones {
		justify-content: space-between;
		width: 100%;
	}

	.gee-acc__cantidad { flex: 0 0 auto; }
	.gee-acc__boton { flex: 1 1 auto; width: auto; }
}

/* Respeto por quien reduce las animaciones */
@media (prefers-reduced-motion: reduce) {
	.gee-acc__boton,
	.gee-acc__item { transition: none; }
	.gee-acc__spinner { animation-duration: 2s; }
}
