/* Aula Culinària Core — tarjetas regalo
   [ac_tarjetas_regalo] (rejilla de tarjetas con compra) y
   [ac_tarjeta_regalo_cara] (cara de la tarjeta, decoración).
   Usa los tokens del tema hijo (--ac-*) con valores de reserva. */

/* Cara de la tarjeta ------------------------------------------------------- */
.ac-gc {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	aspect-ratio: 1.6 / 1;
	padding: 20px 22px;
	overflow: hidden;
	border-radius: 18px;
	color: #fff;
	font-family: var(--ac-font-body, "DM Sans", sans-serif);
	isolation: isolate;
}

.ac-gc::before,
.ac-gc::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	pointer-events: none;
}

.ac-gc::before {
	top: -90px;
	right: -70px;
	width: 220px;
	height: 220px;
	border: 1px solid rgba(255, 255, 255, .22);
}

.ac-gc::after {
	top: -50px;
	right: -30px;
	width: 160px;
	height: 160px;
	background: rgba(255, 255, 255, .08);
}

.ac-gc__top {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .18em;
	line-height: 1.2;
	text-transform: uppercase;
}

.ac-gc__logo {
	width: 34px;
	height: 34px;
	padding: 2px;
	border-radius: 50%;
	background: #fff;
	object-fit: contain;
}

.ac-gc__importe {
	font-family: var(--ac-font-display, "Playfair Display", Georgia, serif);
	font-size: clamp(2.4rem, 3.4vw, 3.4rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -.03em;
}

.ac-gc__pie {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: .66rem;
	letter-spacing: .06em;
	opacity: .85;
}

.ac-gc--negro { background: linear-gradient(135deg, #2a2424, #171515); }
.ac-gc--rojo  { background: linear-gradient(135deg, #c42a40, #841426); }
.ac-gc--vino  { background: linear-gradient(135deg, #6b1220, #3a0b13); }
.ac-gc--crema { background: linear-gradient(135deg, #efe5dc, #d9c7b8); color: var(--ac-ink, #1d1b1b); }
.ac-gc--crema::before { border-color: rgba(29, 27, 27, .14); }
.ac-gc--crema::after  { background: rgba(179, 32, 52, .08); }
.ac-gc--crema .ac-gc__importe { color: var(--ac-red-dark, #841426); }

/* Rejilla de tarjetas ------------------------------------------------------ */
.ac-regalo__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	align-items: stretch;
}

.ac-regalo__tarjeta {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 16px;
	border: 1px solid var(--ac-line, #e7e0da);
	border-radius: 22px;
	background: #fff;
	color: var(--ac-ink, #1d1b1b);
	transition: transform .25s, box-shadow .25s;
}

.ac-regalo__tarjeta:hover {
	transform: translateY(-5px);
	box-shadow: 0 22px 50px rgba(40, 28, 26, .12);
}

.ac-regalo__tarjeta .ac-gc {
	transition: transform .35s;
}

.ac-regalo__tarjeta:hover .ac-gc {
	transform: rotate(-1.5deg) scale(1.02);
}

.ac-regalo__tarjeta--destacada {
	border: 2px solid var(--ac-red, #b32034);
	box-shadow: 0 22px 50px rgba(179, 32, 52, .14);
}

.ac-regalo__badge {
	position: absolute;
	top: -13px;
	left: 50%;
	z-index: 2;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--ac-red, #b32034);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	transform: translateX(-50%);
}

.ac-regalo__cuerpo {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 8px 6px;
}

.ac-regalo__etiqueta {
	color: var(--ac-red, #b32034);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.ac-regalo__nombre {
	margin: 6px 0 8px !important;
	padding: 0;
	color: var(--ac-ink, #1d1b1b) !important;
	font-family: var(--ac-font-display, "Playfair Display", Georgia, serif) !important;
	font-size: 1.5rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
}

.ac-regalo__texto {
	margin: 0 0 22px !important;
	color: var(--ac-muted, #706b68);
	font-size: .92rem;
	line-height: 1.5;
}

.ac-regalo__agotada {
	margin: auto 0 0 !important;
	color: var(--ac-red, #b32034);
	font-weight: 700;
}

.ac-regalo__tarjeta--agotada .ac-gc {
	filter: grayscale(.6);
	opacity: .7;
}

/* Cantidad + botón */
.ac-regalo__form {
	display: flex;
	gap: 10px;
	align-items: stretch;
	margin: auto 0 0 !important;
}

.ac-regalo__cantidad {
	display: flex;
	align-items: center;
	border: 1px solid var(--ac-line, #e7e0da);
	border-radius: 999px;
	background: #fff;
}

.ac-regalo__cantidad button {
	width: 38px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ac-ink, #1d1b1b);
	font-size: 1.1rem;
	cursor: pointer;
}

.ac-regalo__cantidad button:hover {
	color: var(--ac-red, #b32034);
}

.ac-regalo__cantidad input {
	width: 32px !important;
	height: 46px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--ac-ink, #1d1b1b) !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.ac-regalo__cantidad input::-webkit-outer-spin-button,
.ac-regalo__cantidad input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.ac-regalo__boton {
	display: inline-flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--ac-red, #b32034);
	color: #fff;
	font-family: inherit;
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s, transform .2s;
}

.ac-regalo__boton:hover {
	background: var(--ac-red-dark, #841426);
	transform: translateY(-1px);
}

.ac-regalo__boton:focus-visible,
.ac-regalo__cantidad button:focus-visible {
	outline: 2px solid var(--ac-red, #b32034);
	outline-offset: 2px;
}

.ac-regalo__check {
	display: none;
}

.ac-regalo__boton.is-anadida {
	background: var(--ac-ink, #1d1b1b);
}

.ac-regalo__boton.is-anadida .ac-regalo__check {
	display: block;
}

.ac-regalo__boton.is-cargando {
	opacity: .7;
	cursor: progress;
}

/* Aviso "añadida al carrito" */
.ac-regalo__aviso {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0 0 28px;
	padding: 14px 18px;
	border: 1px solid rgba(50, 99, 74, .3);
	border-radius: 14px;
	background: #eef5f0;
	color: var(--ac-green, #32634a);
	font-weight: 600;
}

.ac-regalo__aviso[hidden] {
	display: none;
}

.ac-regalo__aviso.is-error {
	border-color: rgba(179, 32, 52, .3);
	background: #f7e7e9;
	color: var(--ac-red-dark, #841426);
}

.ac-regalo__aviso-texto {
	flex: 1;
}

.ac-regalo__aviso-enlaces {
	display: flex;
	gap: 16px;
}

.ac-regalo__aviso-enlaces a {
	color: var(--ac-ink, #1d1b1b);
	text-decoration: underline;
}

.ac-regalo__aviso-enlaces .ac-regalo__aviso-pagar {
	color: var(--ac-red, #b32034);
	font-weight: 700;
}

.ac-regalo__aviso.is-error .ac-regalo__aviso-enlaces {
	display: none;
}

@media (max-width: 640px) {
	.ac-regalo__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ac-regalo__tarjeta,
	.ac-regalo__tarjeta .ac-gc,
	.ac-regalo__boton {
		transition: none;
	}

	.ac-regalo__tarjeta:hover,
	.ac-regalo__tarjeta:hover .ac-gc {
		transform: none;
	}
}

/* -------------------------------------------------------------------------
 * [ac_saldo_regalo] — consulta del saldo de una tarjeta
 * ----------------------------------------------------------------------- */
.ac-saldo {
	max-width: 520px;
	margin: 0 auto;
}

.ac-saldo__label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
	font-size: 15px;
}

.ac-saldo__fila {
	display: flex;
	gap: 8px;
}

.ac-saldo__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 6px;
	font-size: 16px;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: #fff;
}

.ac-saldo__input:focus {
	outline: 2px solid var(--ac-red, #b32034);
	outline-offset: 1px;
}

.ac-saldo__boton {
	flex: 0 0 auto;
	padding: 12px 22px;
	border: 0;
	border-radius: 6px;
	background: var(--ac-ink, #1a1a1a);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.ac-saldo__boton:hover,
.ac-saldo__boton:focus-visible {
	background: var(--ac-red, #b32034);
}

.ac-saldo__resultado {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 6px;
	font-size: 15px;
	line-height: 1.45;
}

.ac-saldo__resultado.is-ok {
	background: #eef6ee;
	border-left: 4px solid #2e7d32;
}

.ac-saldo__resultado.is-error {
	background: #fbeeee;
	border-left: 4px solid var(--ac-red, #b32034);
}

@media (max-width: 480px) {
	.ac-saldo__fila {
		flex-direction: column;
	}
}
