/**
 * «Comprados juntos frecuentemente» — ficha de producto.
 *
 * A diferencia del bloque del carrito, aquí hay ancho de sobra: se maqueta en
 * fila en escritorio y en columna en móvil. Selectores propios con prefijo
 * .gcc-cj- y sin !important, para no pelearse con Bricks.
 */

.gcc-cj {
	--gcc-acento: #6a3f99;
	--gcc-exito: #10893e;
	--gcc-borde: rgba( 0, 0, 0, 0.12 );

	/* A 0 a propósito: el espaciado lo controla la plantilla de Bricks,
	   donde está colocado el shortcode. Si el bloque trae su propio
	   margen, se suma al de Bricks y descuadra la ficha. */
	margin: 0;
	padding: 24px;
	border: 1px solid var( --gcc-borde );
	border-radius: 12px;
}

.gcc-cj__titulo {
	margin: 0 0 20px;
	font-size: 1.15em;
	line-height: 1.3;
}

.gcc-cj__lista {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	margin: 0 0 20px;
	padding: 0;
	gap: 4px;
	list-style: none;
}

.gcc-cj__item {
	display: flex;
	align-items: center;
	gap: 4px;
}

.gcc-cj__mas {
	padding: 0 8px;
	color: var( --gcc-acento );
	font-size: 1.4em;
	font-weight: 300;
	line-height: 1;
}

.gcc-cj__label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.gcc-cj__label:hover {
	border-color: var( --gcc-borde );
}

/* Atenúa lo que el cliente ha desmarcado, sin ocultarlo. */
.gcc-cj__label:has( .gcc-cj__check:not( :checked ) ) {
	opacity: 0.45;
}

.gcc-cj__check {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	accent-color: var( --gcc-acento );
	cursor: pointer;
}

.gcc-cj__img {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 6px;
	object-fit: cover;
}

.gcc-cj__datos {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 190px;
}

.gcc-cj__nombre {
	display: -webkit-box;
	overflow: hidden;
	font-size: 0.85em;
	line-height: 1.35;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.gcc-cj__esta {
	display: block;
	opacity: 0.6;
	font-size: 0.9em;
	font-style: normal;
}

.gcc-cj__precio {
	font-size: 0.95em;
	font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Pie: total y botón                                                  */
/* ------------------------------------------------------------------ */

.gcc-cj__pie {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding-top: 18px;
	border-top: 1px solid var( --gcc-borde );
	gap: 16px;
}

.gcc-cj__total {
	margin: 0;
	font-size: 1.05em;
}

.gcc-cj__total-cifra {
	font-size: 1.2em;
}

.gcc-cj__boton {
	padding: 13px 26px;
	border: 0;
	border-radius: 999px;
	background: var( --gcc-acento );
	color: #fff;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.gcc-cj__boton:hover:not( [disabled] ) {
	opacity: 0.88;
}

.gcc-cj__boton[disabled] {
	opacity: 0.5;
	cursor: default;
}

.gcc-cj__ver {
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: underline;
}

.gcc-cj__aviso {
	flex: 1 0 100%;
	margin: 0;
	color: var( --gcc-exito );
	font-size: 0.85em;
}

.gcc-cj__aviso:empty {
	display: none;
}

.gcc-cj__aviso--error {
	color: #b32d2e;
}

/* ------------------------------------------------------------------ */
/* Móvil: en columna, y el «+» deja de tener sentido en horizontal      */
/* ------------------------------------------------------------------ */

@media ( max-width: 600px ) {

	.gcc-cj {
		padding: 18px;
	}

	.gcc-cj__lista {
		flex-direction: column;
		gap: 0;
	}

	.gcc-cj__item {
		width: 100%;
	}

	.gcc-cj__mas {
		display: none;
	}

	.gcc-cj__label {
		width: 100%;
		border-bottom: 1px solid var( --gcc-borde );
		border-radius: 0;
	}

	.gcc-cj__datos {
		max-width: none;
	}

	.gcc-cj__pie {
		flex-direction: column;
		align-items: stretch;
	}

	.gcc-cj__boton {
		width: 100%;
		padding: 15px;
	}
}

@media ( prefers-reduced-motion: reduce ) {

	.gcc-cj__label,
	.gcc-cj__boton {
		transition: none;
	}
}
