/* anibal-fotos — componentes de la tienda (buscador, eventos, galería, visor).
   Tokens sobrescribibles desde el child theme o desde Elementor (CSS personalizado). */

:root {
	--af-bg: #FAF7F2;
	--af-bg-alt: #F3EDE4;
	--af-surface: #FFFDF9;
	--af-ink: #2C2A26;
	--af-ink-soft: #5F5950;
	--af-ink-mute: #756D62;
	--af-line: rgba(44, 42, 38, .12);
	--af-accent: #D4A373;
	--af-punto: #C07437; /* naranja exacto del logo */
	--af-accent-deep: #B07A4B;
	--af-accent-wash: #F3E3D2;
	--af-accent-ink: #7A4E2A;
	--af-radius: 4px;
	--af-pill: 999px;
	--af-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ------------------------------------------------------------------ Piezas */

.af-label {
	display: inline-flex;
	align-items: center;
	gap: .7em;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--af-ink-mute);
	line-height: 1.4;
}

.af-label--punto::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--af-punto);
	flex: none;
}

.af-acento { color: var(--af-accent-deep); }

/* :is(a, button) sube la especificidad sobre los botones genéricos del tema ([type="submit"], .button). */
:is(a, button).af-boton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6em;
	min-height: 52px;
	padding: 0 28px;
	border: 1px solid var(--af-ink);
	border-radius: var(--af-pill);
	background: var(--af-ink);
	color: var(--af-bg);
	font: inherit;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .3s var(--af-ease), color .3s var(--af-ease), border-color .3s var(--af-ease), transform .3s var(--af-ease), box-shadow .3s var(--af-ease);
}

/* "body" para ganarle al hover global de botones de Elementor (.elementor-kit-N button:hover), que se carga después. */
body :is(a, button).af-boton:hover,
body :is(a, button).af-boton:focus-visible { background: var(--af-punto); border-color: var(--af-punto); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(192, 116, 55, .7); }

:is(a, button).af-boton--linea { background: transparent; color: var(--af-ink); border-color: var(--af-line); }
body :is(a, button).af-boton--linea:hover { background: var(--af-accent-wash); color: var(--af-ink); border-color: var(--af-punto); box-shadow: none; }

.af-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.af-chip,
.af-chips :is(a, button).af-chip {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	height: 36px;
	padding: 0 16px;
	border: 1px solid var(--af-line);
	border-radius: var(--af-pill);
	background: transparent;
	color: var(--af-ink-soft);
	font: inherit;
	font-size: .82rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color .4s var(--af-ease), background-color .4s var(--af-ease), color .4s var(--af-ease);
}

/* Los chips son <button>: se protegen del estilo global de botones de Elementor (fondo oscuro, relleno). */
.af-chips :is(a, button).af-chip { min-height: 0; box-shadow: none; font-size: .85rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.af-chip:hover,
.af-chips :is(a, button).af-chip:hover,
.af-chips :is(a, button).af-chip:focus-visible { background: var(--af-accent-wash); border-color: var(--af-punto); color: var(--af-ink); }

.af-chip[aria-pressed="true"],
.af-chip[aria-current="true"],
.af-chips :is(a, button).af-chip[aria-pressed="true"],
.af-chips :is(a, button).af-chip[aria-current="true"] { background: var(--af-ink); border-color: var(--af-ink); color: var(--af-bg); }

.af-chip--pronto { border-style: dashed; color: var(--af-ink-mute); cursor: default; }
.af-chip--pronto:hover { border-color: var(--af-line); color: var(--af-ink-mute); }
.af-chip--pronto::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--af-punto); }

.af-bib {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 9px;
	border-radius: var(--af-pill);
	background: var(--af-accent-wash);
	color: var(--af-accent-ink);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .03em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.af-bib.is-match { background: var(--af-accent); color: var(--af-ink); }

.af-dorsales { display: flex; flex-wrap: wrap; gap: 6px; }

.af-flecha { transition: transform .5s var(--af-ease); }

/* ---------------------------------------------------------------- Buscador */

.af-buscador { display: grid; gap: 20px; }

.af-buscador__form {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
	gap: 12px;
	align-items: end;
	max-width: 720px;
	padding: 14px;
	background: var(--af-surface);
	border: 1px solid var(--af-line);
	border-radius: 22px;
	box-shadow: 0 24px 48px -32px rgba(44, 42, 38, .18);
}

/* Con filtro de deporte: deporte · evento · dorsal · botón (en tablet, 2 + 2; en móvil, uno bajo otro) */
.af-buscador__form:has([data-af-deporte]) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, .8fr) auto; }
@media (min-width: 690px) and (max-width: 999.98px) {
	.af-buscador__form:has([data-af-deporte]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 689px) {
	.af-buscador__form:has([data-af-deporte]) { grid-template-columns: minmax(0, 1fr); }
}


.af-campo { display: grid; gap: 8px; margin: 0; }

.af-campo__label {
	padding-left: 4px;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--af-ink-mute);
}

.af-buscador .af-input,
.af-buscador .af-select {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 18px;
	background-color: var(--af-bg);
	border: 1px solid transparent;
	border-radius: 12px;
	color: var(--af-ink);
	font: inherit;
	font-size: 1rem;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .4s var(--af-ease), box-shadow .4s var(--af-ease), background-color .4s var(--af-ease);
}

.af-buscador .af-select {
	padding-right: 44px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%235F5950' stroke-width='1.5' stroke-linecap='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 18px center;
}

.af-buscador .af-input:focus,
.af-buscador .af-select:focus {
	outline: none;
	background-color: var(--af-surface);
	border-color: var(--af-accent);
	box-shadow: 0 0 0 4px rgba(212, 163, 115, .18);
}

.af-dorsal { position: relative; display: block; }

.af-dorsal::before {
	content: "#";
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--af-accent-deep);
	font-weight: 600;
	pointer-events: none;
}

.af-buscador .af-dorsal .af-input { padding-left: 36px; font-weight: 600; letter-spacing: .04em; }

.af-buscador__ayuda {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 28px;
	margin: 0;
	font-size: .875rem;
	color: var(--af-ink-soft);
}

.af-buscador__ayuda a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--af-line); }
.af-buscador__ayuda a:hover { border-color: var(--af-accent); }

/* Barra compacta en la página del evento */
.af-buscador--barra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding: 14px 0;
	border-top: 1px solid var(--af-line);
	border-bottom: 1px solid var(--af-line);
}

.af-buscador--barra .af-buscador__form {
	display: flex;
	flex: 0 1 360px;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

.af-buscador--barra .af-campo { flex: 1; }
.af-buscador--barra .af-input { min-height: 44px; border-radius: var(--af-pill); background-color: var(--af-surface); border-color: var(--af-line); }
.af-buscador--barra .af-boton { min-height: 44px; padding: 0 22px; }
.af-buscador--barra .af-chips { flex: 1 1 auto; }

/* ----------------------------------------------------------------- Eventos */

.af-eventos__filtros { margin-bottom: 40px; }

.af-eventos__grid {
	display: grid;
	grid-template-columns: repeat(var(--af-columnas, 3), minmax(0, 1fr));
	gap: clamp(40px, 4vw, 64px) clamp(20px, 2.4vw, 36px);
}

.af-tarjeta { display: grid; gap: 8px; color: var(--af-ink); text-decoration: none; align-content: start; }
.af-tarjeta:hover { color: var(--af-ink); }

.af-tarjeta__img,
.af-fila__img {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	margin-bottom: 14px;
	border-radius: var(--af-radius);
	background: var(--af-bg-alt);
}

.af-tarjeta__img img,
.af-fila__img img,
.af-img-vacia {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--af-ease);
}

.af-tarjeta:hover .af-tarjeta__img img,
.af-fila:hover .af-fila__img img { transform: scale(1.03); }

.af-tarjeta__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.af-tarjeta__top time { font-size: .8rem; color: var(--af-ink-mute); }
.af-tarjeta__titulo { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 400; letter-spacing: -.01em; line-height: 1.3; }
.af-tarjeta__lugar { font-size: .875rem; color: var(--af-ink-soft); }

.af-tarjeta__pie {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	padding-top: 14px;
	border-top: 1px solid var(--af-line);
	font-size: .875rem;
	color: var(--af-ink-soft);
}

.af-tarjeta__pie .amount { color: inherit; font-weight: 400; }
.af-tarjeta:hover .af-flecha, .af-fila:hover .af-flecha { transform: translateX(6px); color: var(--af-accent-deep); }

.af-eventos__anio {
	margin: clamp(48px, 6vw, 80px) 0 8px;
	font-size: clamp(2.4rem, 5vw, 4rem);
	font-weight: 300;
	letter-spacing: -.04em;
	color: var(--af-ink-mute);
}

.af-eventos__anio:first-child { margin-top: 0; }

.af-fila {
	display: grid;
	grid-template-columns: 96px 148px minmax(0, 1fr) 160px 120px 32px;
	gap: 28px;
	align-items: center;
	padding: 22px 0;
	border-bottom: 1px solid var(--af-line);
	color: var(--af-ink);
	text-decoration: none;
}

.af-fila:hover { color: var(--af-ink); }
.af-fila__img { aspect-ratio: 3 / 2; margin: 0; }
.af-fila__fecha { display: grid; line-height: 1.1; }
.af-fila__fecha b { font-size: 2rem; font-weight: 300; letter-spacing: -.03em; }
/* Mes completo («septiembre»): menos espaciado para que quepa en la columna */
.af-fila__fecha span { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--af-ink-mute); }
.af-fila__nombre { display: grid; gap: 4px; }
.af-fila__nombre strong { font-size: 1.3rem; font-weight: 400; letter-spacing: -.01em; line-height: 1.3; }
.af-fila__nombre span { font-size: .9rem; color: var(--af-ink-mute); }
.af-fila__fotos { font-size: .9rem; color: var(--af-ink-soft); }

.af-eventos [hidden] { display: none !important; }

/* ------------------------------------------------------- Cabecera de evento */

.af-cabecera {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 24px 48px;
	align-items: end;
}

.af-cabecera__texto { display: grid; gap: 20px; }

.af-cabecera__titulo {
	margin: 0;
	font-size: clamp(2.3rem, 5.2vw, 4.4rem);
	font-weight: 300;
	letter-spacing: -.035em;
	line-height: 1.04;
}

.af-cabecera__intro { margin: 0; max-width: 34em; color: var(--af-ink-soft); font-size: clamp(1.05rem, 1.4vw, 1.2rem); }

.af-datos { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--af-line); }
.af-datos div { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--af-line); }
.af-datos div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--af-line); }
.af-datos dt { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--af-ink-mute); }
.af-datos dd { margin: 0; font-weight: 500; }
.af-datos .amount { font-weight: 500; color: inherit; }

/* ----------------------------------------------------- Resultado de búsqueda */

.af-resultado {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px 32px;
	margin: 0 0 40px;
	padding: 22px 26px;
	border: 1px solid rgba(44, 42, 38, .07);
	border-radius: 16px;
	background: var(--af-surface);
}

.af-resultado__texto { display: grid; gap: 2px; }
.af-resultado__texto strong { font-size: 1.15rem; font-weight: 600; }
.af-resultado__texto span { font-size: .9rem; color: var(--af-ink-soft); }
.af-resultado__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.af-resultado__acciones form { margin: 0; }

.af-limpiar { font-size: .85rem; color: var(--af-ink-soft); text-decoration: none; border-bottom: 1px solid var(--af-line); }
.af-limpiar:hover { color: var(--af-ink); border-color: var(--af-ink); }

.af-vacio {
	display: grid;
	justify-items: center;
	gap: 18px;
	padding: clamp(64px, 9vw, 120px) 0;
	text-align: center;
}

.af-vacio__marca {
	width: 56px;
	height: 56px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M8 34V20a12 12 0 0 1 24 0v14' fill='none' stroke='%232C2A26' stroke-width='1.6' stroke-linecap='round' opacity='.35'/><circle cx='20' cy='27' r='3.6' fill='%23D4A373'/></svg>") center / contain no-repeat;
}

.af-vacio h2 { margin: 0; font-size: 1.6rem; font-weight: 300; letter-spacing: -.02em; }
.af-vacio p { margin: 0; max-width: 30em; color: var(--af-ink-soft); }
.af-vacio__acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px !important; }

.af-vacio-simple { color: var(--af-ink-soft); }

.af-pronto {
	display: grid;
	gap: 10px;
	max-width: 640px;
	padding: 22px 26px;
	border: 1px dashed var(--af-line);
	border-radius: 16px;
	background: var(--af-surface);
}

.af-pronto p { margin: 0; color: var(--af-ink-soft); }

/* ------------------------------------------------- Galería (loop WooCommerce) */

.products .af-foto { position: relative; }

.products .af-foto img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--af-radius);
	background: var(--af-bg-alt);
	transition: transform 1.2s var(--af-ease);
}

.products .af-foto a:hover img { transform: scale(1.02); }
.products .af-foto a:has(img) { display: block; overflow: hidden; border-radius: var(--af-radius); cursor: zoom-in; }

.af-foto__evento { display: block; margin-top: 12px; font-size: .78rem; color: var(--af-ink-mute); line-height: 1.4; }
.products .af-foto .af-dorsales { margin-top: 12px; }
.products .af-foto .af-foto__evento + .af-dorsales { margin-top: 6px; }

.products .af-foto .price { font-size: .92rem; font-weight: 600; color: var(--af-ink); font-variant-numeric: tabular-nums; }

/* Blocksy pinta el título y las categorías por su cuenta: en una foto sobran (los dorsales ocupan su lugar). */
.products .af-sin-titulo .woocommerce-loop-product__title,
.products .af-foto .entry-meta { display: none; }

.products .af-foto .added_to_cart { display: none; }
/* Blocksy oculta el botón ya añadido ([data-add-to-cart="auto-hide"]); aquí se mantiene con su estado "añadida" */
[data-products] .af-foto .add_to_cart_button.added { display: inline-flex; }
.products .af-foto .add_to_cart_button.added::after { content: " ✓"; }

/* ------------------------------------------------------------------- Visor */

.af-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	background: rgba(250, 247, 242, .97);
	color: var(--af-ink);
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s var(--af-ease), visibility .35s;
}

.af-lb.is-open { opacity: 1; visibility: visible; }

.af-lb__escenario { position: relative; display: grid; place-items: center; min-height: 0; padding: 72px clamp(56px, 6vw, 96px); }

.af-lb__img {
	max-width: 100%;
	max-height: calc(100vh - 144px);
	border-radius: var(--af-radius);
	box-shadow: 0 40px 80px -48px rgba(44, 42, 38, .35);
	object-fit: contain;
}

.af-lb button { font: inherit; cursor: pointer; }
.af-lb button:not(.af-boton) { color: inherit; }
.af-lb [hidden] { display: none !important; }

.af-lb__nav,
.af-lb :is(button).af-lb__cerrar,
.af-lb :is(button).af-lb__nav {
	min-height: 0;
	padding: 0;
	box-shadow: none;
	letter-spacing: 0;
	text-transform: none;
}
.af-lb :is(button).af-lb__cerrar {
	position: relative;
	width: 40px;
	height: 40px;
	border: 1px solid var(--af-line);
	border-radius: 50%;
	background: var(--af-surface);
	color: transparent;
	font-size: 0;
	cursor: pointer;
	transition: background-color .25s var(--af-ease), border-color .25s var(--af-ease);
}
.af-lb :is(button).af-lb__cerrar::before,
.af-lb :is(button).af-lb__cerrar::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 1.5px;
	border-radius: 2px;
	background: var(--af-ink);
	transform: translate(-50%, -50%) rotate(45deg);
}
.af-lb :is(button).af-lb__cerrar::after { transform: translate(-50%, -50%) rotate(-45deg); }
.af-lb :is(button).af-lb__cerrar:hover,
.af-lb :is(button).af-lb__cerrar:focus-visible { background: var(--af-bg-alt); border-color: var(--af-ink); }
.af-lb :is(button).af-lb__nav { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 253, 249, .92); color: var(--af-ink); border: 1px solid var(--af-line); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.af-lb :is(button).af-lb__nav:hover { background: var(--af-surface); color: var(--af-ink); border-color: var(--af-ink); }

.af-lb__cerrar {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--af-line);
	border-radius: 50%;
	background: var(--af-surface);
	font-size: 1.2rem;
	line-height: 1;
}

.af-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.af-lb__nav[disabled] { opacity: .35; cursor: default; }
.af-lb__nav--prev { left: 20px; }
.af-lb__nav--next { right: 20px; }

.af-lb__panel {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 28px 32px 32px;
	border-left: 1px solid var(--af-line);
	background: var(--af-bg);
	overflow-y: auto;
}

.af-lb__cerrar { align-self: flex-end; }
.af-lb__titulo { margin: 0; font-size: 1.6rem; font-weight: 300; letter-spacing: -.02em; line-height: 1.15; }
.af-lb__compra { display: grid; gap: 12px; margin-top: auto; }
.af-lb__precio-fila { display: flex; justify-content: space-between; align-items: baseline; }
.af-lb__precio { font-size: 1.6rem; font-weight: 400; letter-spacing: -.02em; }
.af-lb__pos, .af-lb__nota { font-size: .8rem; color: var(--af-ink-mute); }
.af-lb__nota { margin: 0; text-align: center; }
.af-lb .af-boton { width: 100%; }

body.af-lb-abierto { overflow: hidden; }

/* ------------------------------------------------ Aviso "agregada al carrito" */

.af-aviso {
	position: fixed;
	z-index: 100000;
	right: 24px;
	bottom: 24px;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: min(420px, calc(100vw - 32px));
	padding: 14px 14px 14px 18px;
	border: 1px solid var(--af-line);
	border-radius: 16px;
	background: var(--af-surface);
	color: var(--af-ink);
	box-shadow: 0 18px 48px -18px rgba(44, 42, 38, .35);
	font-size: .9rem;
	line-height: 1.35;
	opacity: 0;
	transform: translateY(16px);
	pointer-events: none;
	transition: opacity .35s var(--af-ease), transform .35s var(--af-ease);
}

.af-aviso.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.af-aviso__icono {
	flex: none;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--af-accent-wash);
	color: var(--af-accent-ink);
	font-weight: 700;
}

.af-aviso__texto { display: grid; gap: 2px; min-width: 0; }
.af-aviso__texto strong { font-weight: 600; }
.af-aviso__nombre { color: var(--af-ink-mute); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-aviso__nombre:empty { display: none; }

.af-aviso a.af-aviso__enlace {
	flex: none;
	margin-left: auto;
	padding: 8px 14px;
	border-radius: var(--af-pill);
	background: var(--af-ink);
	color: var(--af-bg);
	font-size: .8rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.af-aviso a.af-aviso__enlace:hover { background: #45413B; color: var(--af-bg); }

.af-aviso button.af-aviso__cerrar {
	flex: none;
	min-height: 0;
	padding: 0 4px;
	border: 0;
	background: none;
	color: var(--af-ink-mute);
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
}

/* --------------------------------------------------- Checkout: crear cuenta */

.af-motivo-cuenta {
	margin: 4px 0 18px;
	padding: 14px 16px;
	border-left: 2px solid var(--af-punto);
	border-radius: 0 10px 10px 0;
	background: var(--af-bg-alt);
	color: var(--af-ink-soft);
	font-size: .875rem;
	line-height: 1.6;
}

/* ------------------------------------------------- Pedido recibido (gracias) */

.af-gracias { display: grid; gap: 16px; }

.af-gracias__estado,
.af-gracias__cuenta {
	padding: clamp(20px, 3vw, 32px);
	border: 1px solid var(--af-line);
	border-radius: 20px;
	background: var(--af-surface);
	color: var(--af-ink-soft);
	line-height: 1.65;
}

.af-gracias__estado { display: flex; gap: 18px; align-items: flex-start; }
.af-gracias__estado p,
.af-gracias__cuenta p { margin: 0; }
.af-gracias__estado .af-boton { margin-top: 16px; }

.af-gracias__icono {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--af-accent-wash);
	color: var(--af-accent-ink);
	font-weight: 700;
}

.af-gracias__estado--aviso .af-gracias__icono { background: #FBEFEA; color: #7A3B2A; }

.af-gracias__titulo { margin-bottom: 4px !important; color: var(--af-ink); font-size: 1.05rem; font-weight: 600; }

.af-gracias__cuenta { background: var(--af-bg-alt); border-left: 2px solid var(--af-punto); display: grid; gap: 14px; justify-items: start; }
.af-gracias__form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.af-gracias__nota { color: var(--af-ink-mute); font-size: .85rem; }

/* ------------------------------------------------------------- Mi cuenta */

.af-cuenta { display: grid; gap: clamp(20px, 3vw, 32px); }
.af-cuenta__intro { display: grid; gap: 10px; }
.af-cuenta__intro p { margin: 0; color: var(--af-ink-soft); }
.af-cuenta .af-cuenta__titulo { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 300; letter-spacing: -.02em; color: var(--af-ink); }

.af-cuenta__tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.af-cuenta__tarjeta {
	position: relative;
	display: grid;
	gap: 4px;
	padding: 22px 22px 20px;
	border: 1px solid var(--af-line);
	border-radius: 18px;
	background: var(--af-surface);
	color: var(--af-ink);
	text-decoration: none;
	transition: border-color .3s var(--af-ease), transform .3s var(--af-ease);
}
.af-cuenta__tarjeta:hover { border-color: var(--af-ink); color: var(--af-ink); transform: translateY(-2px); }
.af-cuenta__numero { font-size: 2rem; font-weight: 300; line-height: 1; letter-spacing: -.02em; }
.af-cuenta__nombre { color: var(--af-ink-mute); font-size: .85rem; }
.af-cuenta__ir { position: absolute; top: 20px; right: 20px; color: var(--af-ink-mute); }

.af-cuenta__bloque { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--af-line); border-radius: 18px; background: var(--af-bg-alt); }
.af-cuenta .af-cuenta__bloque h3 { margin: 0 0 14px; font-size: 1rem; font-weight: 600; color: var(--af-ink); letter-spacing: 0; }
.af-cuenta__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.af-cuenta__chips li { padding: 6px 14px; border-radius: 999px; background: var(--af-surface); border: 1px solid var(--af-line); font-size: .85rem; color: var(--af-ink); }
.af-cuenta__vacio { display: grid; gap: 16px; justify-items: start; }
.af-cuenta__vacio p { margin: 0; }
.af-cuenta__pie, .af-cuenta__nota { margin: 0; color: var(--af-ink-mute); font-size: .875rem; }

.af-pedido { border: 1px solid var(--af-line); border-radius: 18px; background: var(--af-surface); overflow: hidden; }
.af-pedido__cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 18px 22px; background: var(--af-bg-alt); border-bottom: 1px solid var(--af-line); }
.af-cuenta .af-pedido__titulo { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--af-ink); }
.af-pedido__meta { margin: 2px 0 0; color: var(--af-ink-mute); font-size: .82rem; }
.af-pedido__ver { font-size: .85rem; color: var(--af-ink); text-decoration: underline; text-underline-offset: 3px; }
.af-pedido__fotos { margin: 0; padding: 0; list-style: none; }
.af-pedido__foto { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 22px; }
.af-pedido__foto + .af-pedido__foto { border-top: 1px solid var(--af-line); }
.af-pedido__foto img.af-pedido__mini { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; margin: 0; }
.af-pedido__datos { display: grid; gap: 2px; min-width: 0; }
.af-pedido__nombre { color: var(--af-ink); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-pedido__detalle { color: var(--af-ink-mute); font-size: .8rem; }
:is(a, button).af-boton.af-pedido__descargar { min-height: 40px; padding: 0 20px; font-size: .85rem; }

@media (max-width: 689px) {
	.af-cuenta__tarjetas { grid-template-columns: minmax(0, 1fr); }
	.af-cuenta__tarjeta { grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; padding: 18px 20px; }
	.af-cuenta__ir { top: 50%; transform: translateY(-50%); }
	.af-pedido__cabecera, .af-pedido__foto { padding-inline: 16px; }
	.af-pedido__foto { grid-template-columns: 56px minmax(0, 1fr); }
	.af-pedido__foto img.af-pedido__mini { width: 56px; height: 42px; }
	:is(a, button).af-boton.af-pedido__descargar { grid-column: 1 / -1; width: 100%; }
}

/* Checkout: botón de pago bloqueado hasta aceptar los términos */
#place_order.af-bloqueado,
#place_order:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------- Carrito flotante (tablet y móvil) */

.af-carrito-flotante { display: none; }

@media (max-width: 999.98px) {
	.af-carrito-flotante {
		position: fixed;
		z-index: 55; /* bajo la cabecera fija y el menú móvil */
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		display: grid;
		place-items: center;
		width: 58px;
		height: 58px;
		border-radius: 50%;
		background: var(--af-ink);
		color: var(--af-bg);
		box-shadow: 0 14px 34px -12px rgba(44, 42, 38, .55);
		transition: transform .3s var(--af-ease), opacity .3s var(--af-ease);
	}
	.af-carrito-flotante:hover,
	.af-carrito-flotante:focus-visible { color: var(--af-bg); transform: scale(1.05); }
	.af-carrito-flotante.is-vacio { opacity: 0; transform: scale(.8); pointer-events: none; }
	.af-carrito-flotante__n {
		position: absolute;
		top: -2px;
		right: -2px;
		min-width: 22px;
		height: 22px;
		padding: 0 6px;
		border: 2px solid var(--af-bg);
		border-radius: 999px;
		background: var(--af-punto);
		color: #fff;
		font-size: .72rem;
		font-weight: 700;
		line-height: 18px;
		text-align: center;
	}
	/* El aviso de "agregada" sube para no quedar bajo el botón */
	.af-aviso { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------- Galería del evento (filas justificadas) */

/* Filas de izquierda a derecha en orden correlativo. Cada foto ocupa un ancho proporcional a su formato
   (--af-r = ancho/alto, lo pone el JS) para que todas las de una fila tengan la misma altura, sin recortes. */
.af-galeria-evento .af-masonry ul.products,
.af-galeria-evento ul.products.af-masonry {
	--af-fila: 250px;
	display: flex !important;
	flex-wrap: wrap;
	gap: clamp(26px, 2.6vw, 36px) clamp(12px, 1.4vw, 20px);
	columns: auto;
}
.af-galeria-evento .af-masonry ul.products::before { display: none; }
.af-galeria-evento .af-masonry ul.products::after { content: ""; flex-grow: 1000000; }
.af-galeria-evento .af-masonry ul.products > li.product {
	flex: var(--af-r, 1) 1 calc(var(--af-r, 1) * var(--af-fila));
	width: auto !important;
	max-width: calc(var(--af-r, 1) * var(--af-fila) * 1.6);
	margin: 0 !important;
	text-align: center;
}
.af-galeria-evento .af-masonry ul.products li.af-foto img {
	width: 100%;
	height: auto !important;
	aspect-ratio: auto !important;
	object-fit: contain;
}
.af-galeria-evento .af-masonry .af-dorsales { justify-content: center; }
@media (max-width: 999.98px) { .af-galeria-evento .af-masonry ul.products { --af-fila: 200px; } }
/* Móvil: una foto por fila, a todo el ancho y con su proporción */
@media (max-width: 689px) {
	.af-galeria-evento .af-masonry ul.products { gap: 22px 0; }
	.af-galeria-evento .af-masonry ul.products::after { display: none; }
	.af-galeria-evento .af-masonry ul.products > li.product { flex: 0 0 100%; max-width: 100%; }
}

/* Barra superior de la galería: dorsal a la izquierda, fotos por página a la derecha */
.af-galeria-evento__barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.af-galeria-evento__barra .af-buscador { flex: 1 1 360px; }
.af-por-pagina label { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--af-ink-mute); font-size: .85rem; }
.af-por-pagina .af-select { width: auto; min-width: 92px; height: 42px; padding: 0 34px 0 14px; }
.af-galeria-evento__barra { margin-bottom: 8px; }
@media (max-width: 689px) {
	.af-galeria-evento__barra { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 18px; }
	.af-galeria-evento__barra .af-buscador { flex: 0 0 auto; }
	.af-por-pagina { display: flex; justify-content: center; }
}

/* Datos del evento en la entrada: solo fecha y lugar */
.af-datos--evento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--af-line); border-radius: 18px; background: var(--af-surface); overflow: hidden; }
.af-datos--evento > div { padding: 18px 22px; }
.af-datos--evento > div + div { border-left: 1px solid var(--af-line); }
.af-datos--evento dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--af-ink-mute); }
.af-datos--evento dd { margin: 6px 0 0; font-size: 1rem; font-weight: 600; color: var(--af-ink); }
.af-datos--evento > div:only-child { grid-column: 1 / -1; }

/* Aviso solo visible en el editor de Elementor para entradas aún sin evento */
.af-guia-editor {
	padding: 22px 24px;
	border: 1px dashed rgba(192, 116, 55, .55);
	border-radius: 16px;
	background: var(--af-accent-wash);
	color: var(--af-accent-ink);
	font-size: .9rem;
	line-height: 1.6;
}

/* Etiquetas internas (dorsales, equipos, marcas): sirven para buscar, no se muestran en las fotos */
.af-foto .af-dorsales,
.af-lb .af-lb__dorsales { display: none !important; }

/* Buscador de la galería del evento: dorsal + palabras + Buscar, y «Limpiar filtros» debajo */
.af-buscador--evento { display: grid; gap: 10px; }
.af-buscador--evento .af-buscador__form { display: flex; flex-wrap: wrap; gap: 8px; }
.af-buscador--evento .af-campo { flex: 0 1 180px; min-width: 0; }
.af-buscador--evento .af-campo--palabras { flex: 1 1 260px; }
.af-buscador--evento .af-input { width: 100%; }
.af-limpiar--filtros { justify-self: start; font-size: .85rem; color: var(--af-ink-mute); }
.af-limpiar--filtros:hover { color: var(--af-ink); }

/* Mensaje tras añadir fotos con una búsqueda por dorsal */
.af-sugerencia {
	display: grid;
	gap: 14px;
	margin: 4px 0 8px;
	padding: 20px 22px;
	border: 1px solid rgba(192, 116, 55, .35);
	border-left: 3px solid var(--af-punto);
	border-radius: 16px;
	background: var(--af-accent-wash);
	color: var(--af-ink-soft);
	line-height: 1.6;
}
.af-sugerencia[hidden] { display: none; }
.af-sugerencia p { margin: 0; }
.af-sugerencia strong { display: block; margin-bottom: 2px; color: var(--af-ink); }
.af-sugerencia__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.af-sugerencia__acciones .af-boton { min-height: 42px; padding: 0 20px; font-size: .85rem; }

@media (max-width: 689px) {
	.af-buscador--evento .af-buscador__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
	.af-buscador--evento .af-campo--palabras { grid-column: 1 / -1; order: 2; }
	.af-buscador--evento .af-buscador__form .af-boton { order: 1; }
	.af-buscador--evento .af-campo:first-child { order: 0; }
	.af-limpiar--filtros { justify-self: center; }
}

/* --------------------------------------------------------------- Responsive */

@media (max-width: 1100px) {
	.af-fila { grid-template-columns: 96px 120px minmax(0, 1fr) 110px 24px; }
	.af-fila__disciplina { display: none; }
}

@media (max-width: 900px) {
	.af-eventos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.af-cabecera { grid-template-columns: 1fr; }

	.af-lb { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
	.af-lb__escenario { padding: 64px 16px 56px; }
	.af-lb__img { max-height: 50vh; }
	.af-lb__nav { top: auto; bottom: 4px; transform: none; }
	.af-lb__panel { border-left: 0; border-top: 1px solid var(--af-line); padding: 20px; max-height: 46vh; }
	.af-lb__cerrar { position: fixed; top: 12px; right: 12px; }
}

@media (max-width: 680px) {
	.af-buscador__form { grid-template-columns: 1fr; padding: 12px; border-radius: 18px; }
	.af-buscador__form .af-boton { width: 100%; }
	.af-buscador--barra .af-buscador__form { flex: 1 1 100%; }
	.af-buscador--barra .af-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }

	.af-eventos__grid { grid-template-columns: 1fr; }

	.af-fila {
		grid-template-columns: 96px minmax(0, 1fr) 20px;
		grid-template-areas: "img nombre flecha" "img fecha flecha";
		gap: 4px 16px;
		padding: 16px 0;
	}
	.af-fila__img { grid-area: img; }
	.af-fila__nombre { grid-area: nombre; }
	.af-fila__nombre strong { font-size: 1.05rem; }
	.af-fila__fecha { grid-area: fecha; display: flex; gap: 6px; align-items: baseline; }
	.af-fila__fecha b { font-size: .82rem; font-weight: 600; letter-spacing: 0; }
	.af-fila__fecha span { font-size: .82rem; letter-spacing: 0; text-transform: none; font-weight: 400; }
	.af-fila__fotos { display: none; }
	.af-fila .af-flecha { grid-area: flecha; }

	.af-resultado { padding: 18px; }
	.af-resultado__acciones, .af-resultado__acciones form, .af-resultado__acciones .af-boton { width: 100%; }
}

@media (max-width: 689px) {
	.af-aviso { left: 16px; right: 16px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
	.af-lb, .af-tarjeta img, .af-fila img, .products .af-foto img { transition: none; }
}

/* Buscadores de la galería del evento: dos barras redondeadas iguales con la lupa en un círculo oscuro.
   Ocupan todo el ancho hasta el selector «Mostrar N fotos»; en móvil van una debajo de la otra. */
.af-galeria-evento .af-buscador--evento .af-buscador__form {
	display: flex;
	flex-wrap: nowrap;
	width: 100%;
	max-width: none;
	gap: 14px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}
.af-galeria-evento .af-buscador--evento .af-pill {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	gap: 8px;
	min-width: 0;
	height: 56px;
	padding: 0 6px 0 24px;
	border-radius: var(--af-pill);
	background: var(--af-surface);
	box-shadow: 0 0 0 1px var(--af-line), 0 8px 24px rgba(44, 42, 38, .08);
	transition: box-shadow .2s var(--af-ease);
}
.af-galeria-evento .af-buscador--evento .af-pill:focus-within {
	box-shadow: 0 0 0 2px var(--af-accent), 0 8px 24px rgba(44, 42, 38, .1);
}
.af-galeria-evento .af-buscador--evento .af-pill .af-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--af-ink);
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0;
}
.af-galeria-evento .af-buscador--evento .af-pill .af-input::placeholder { color: var(--af-ink-mute); opacity: 1; }
.af-galeria-evento .af-buscador--evento .af-pill .af-input:focus { outline: none; box-shadow: none; }
.af-galeria-evento .af-buscador--evento .af-pill .af-pill__boton {
	display: inline-flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--af-ink);
	color: var(--af-surface);
	cursor: pointer;
	transition: background-color .2s var(--af-ease), transform .2s var(--af-ease);
}
.af-galeria-evento .af-buscador--evento .af-pill .af-pill__boton:hover,
.af-galeria-evento .af-buscador--evento .af-pill .af-pill__boton:focus-visible { background: var(--af-punto); color: #fff; }
.af-galeria-evento .af-buscador--evento .af-pill .af-pill__boton:active { transform: scale(.94); }
.af-galeria-evento .af-buscador--evento .af-pill .af-pill__boton svg { display: block; }
.af-galeria-evento .af-buscador--barra { padding: 18px 0; }
.af-galeria-evento__barra .af-buscador { flex: 1 1 520px; min-width: 0; }
@media (max-width: 689px) {
	/* Más específico que la regla de grilla del child theme (style.css) para la barra antigua. */
	.af-galeria-evento .af-buscador--barra.af-buscador--evento .af-buscador__form { display: flex; flex-direction: column; gap: 12px; }
	.af-galeria-evento .af-buscador--evento .af-pill { flex: 0 0 auto; width: 100%; max-width: none; height: 54px; padding-left: 20px; order: 0; grid-column: auto; }
	.af-galeria-evento__barra .af-buscador { flex: 0 0 auto; }
}

/* Pie de la galería, junto a «Siguiente»: página actual, páginas que quedan y fotos por página */
.af-galeria-evento__pie {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--af-line);
}
.af-galeria-evento__estado { margin: 0; color: var(--af-ink-mute); font-size: .875rem; }
@media (max-width: 689px) {
	.af-galeria-evento__pie { flex-direction: column; justify-content: center; text-align: center; }
}

/* Aviso de revisar spam (Mi cuenta, registro, checkout y pedido recibido) */
.af-aviso-spam {
	position: relative;
	margin: 0 0 20px;
	padding: 14px 18px 14px 46px;
	border: 1px solid rgba(192, 116, 55, .3);
	border-radius: 14px;
	background: var(--af-accent-wash);
	color: var(--af-accent-ink);
	font-size: .875rem;
	line-height: 1.55;
}
.af-aviso-spam::before {
	content: "";
	position: absolute;
	left: 18px;
	top: 17px;
	width: 16px;
	height: 12px;
	border: 1.6px solid currentColor;
	border-radius: 2px;
	background:
		linear-gradient(35deg, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%) left top / 50% 70% no-repeat,
		linear-gradient(-35deg, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%) right top / 50% 70% no-repeat;
}
.af-cuenta__intro .af-aviso-spam { margin: 14px 0 0; }
.af-gracias .af-aviso-spam { margin: 16px 0; }
.woocommerce-checkout .af-aviso-spam { margin: 10px 0 0; }

/* Crear o cambiar contraseña (enlace del correo): los dos campos uno bajo el otro, del mismo ancho */
.woocommerce form.lost_reset_password .form-row-first,
.woocommerce form.lost_reset_password .form-row-last {
	float: none;
	width: 100%;
	margin-right: 0;
	margin-left: 0;
}
.woocommerce form.lost_reset_password .form-row label { display: block; margin-bottom: 6px; }
.woocommerce form.lost_reset_password .password-input { display: block; width: 100%; }
.woocommerce form.lost_reset_password .woocommerce-Button { width: 100%; }

/* ------------------------------------------------------------------ Carrito
   Filas más bajas, cupón con el mismo diseño de los buscadores (barra redondeada con botón circular oscuro)
   y «Total del carrito» compacto. El prefijo body.woocommerce-cart gana a las reglas del child theme. */
body.woocommerce-cart .woocommerce-cart-form .shop_table td,
body.woocommerce-cart .woocommerce-cart-form .shop_table th { padding-block: 12px; }
body.woocommerce-cart .woocommerce-cart-form .shop_table thead th { padding-block: 0 12px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--af-ink-mute); }
body.woocommerce-cart .woocommerce-cart-form .product-thumbnail { width: 72px; }
body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
body.woocommerce-cart .woocommerce-cart-form .product-name a { font-size: .9rem; font-weight: 600; color: var(--af-ink); }
body.woocommerce-cart .woocommerce-cart-form .product-name .price { margin: 2px 0 0; font-size: .82rem; color: var(--af-ink-mute); }

body.woocommerce-cart .woocommerce-cart-form td.actions { padding-top: 18px; }
body.woocommerce-cart .ct-cart-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
body.woocommerce-cart .ct-cart-form-actions .coupon {
	display: flex;
	flex: 0 1 420px;
	align-items: center;
	gap: 8px;
	min-width: 0;
	height: 52px;
	margin: 0;
	padding: 0 5px 0 22px;
	border-radius: var(--af-pill);
	background: var(--af-surface);
	box-shadow: 0 0 0 1px var(--af-line), 0 8px 24px rgba(44, 42, 38, .08);
	transition: box-shadow .2s var(--af-ease);
}
/* El CSS de Blocksy para Elementor la fuerza en columna con !important: hace falta igual o más especificidad */
body.woocommerce-cart .woocommerce-cart-form table.cart .actions .coupon { flex-direction: row !important; }
body.woocommerce-cart .ct-cart-form-actions .coupon:focus-within { box-shadow: 0 0 0 2px var(--af-accent), 0 8px 24px rgba(44, 42, 38, .1); }
body.woocommerce-cart .ct-cart-form-actions .coupon .input-text {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-size: .92rem;
	color: var(--af-ink);
}
body.woocommerce-cart .ct-cart-form-actions .coupon .input-text::placeholder { color: var(--af-ink-mute); opacity: 1; }
body.woocommerce-cart .ct-cart-form-actions .coupon .input-text:focus { outline: none; box-shadow: none; }
/* «Aplicar el cupón»: círculo oscuro con flecha (el texto sigue disponible para lectores de pantalla) */
body.woocommerce-cart .ct-cart-form-actions .coupon .button {
	position: relative;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--af-ink);
	color: transparent;
	font-size: 0;
	overflow: hidden;
	cursor: pointer;
	transition: background-color .2s var(--af-ease);
}
body.woocommerce-cart .ct-cart-form-actions .coupon .button::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 16px;
	height: 16px;
	background: var(--af-surface);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%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' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.woocommerce-cart .ct-cart-form-actions .coupon .button:hover,
body.woocommerce-cart .ct-cart-form-actions .coupon .button:focus-visible { background: var(--af-punto); }
/* «Actualizar el carrito»: discreto, de línea */
body.woocommerce-cart .ct-cart-form-actions > .button[name="update_cart"] {
	flex: 0 0 auto;
	height: 42px;
	min-height: 0;
	padding: 0 20px;
	border: 1px solid var(--af-line);
	border-radius: var(--af-pill);
	background: transparent;
	color: var(--af-ink);
	font-size: .82rem;
}
body.woocommerce-cart .ct-cart-form-actions > .button[name="update_cart"]:not(:disabled):hover { border-color: var(--af-ink); }
body.woocommerce-cart .ct-cart-form-actions > .button[name="update_cart"]:disabled { opacity: .45; }

/* Total del carrito compacto */
body.woocommerce-cart .cart_totals { --cart-totals-padding: 24px 26px; padding: 24px 26px; border: 1px solid var(--af-line); border-radius: 18px; background: var(--af-bg-alt); }
body.woocommerce-cart .cart_totals > h2 { margin: 0 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--af-line); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
body.woocommerce-cart .cart_totals table.shop_table { margin: 0; border: 0; }
body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td { padding-block: 10px; font-size: .9rem; }
body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td { padding-top: 14px; font-size: 1.05rem; color: var(--af-ink); }
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout { margin: 16px 0 0; padding: 0; }
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button { min-height: 50px; margin: 0; padding: 0 24px; font-size: .9rem; }

/* Tablet: el total pasa debajo; se limita su ancho y se alinea a la derecha para no estirarlo */
@media (min-width: 690px) and (max-width: 999.98px) {
	body.woocommerce-cart .cart_totals { max-width: 420px; margin-left: auto; }
}

/* Móvil */
@media (max-width: 689px) {
	body.woocommerce-cart .woocommerce-cart-form .shop_table td { padding-block: 10px; }
	body.woocommerce-cart .woocommerce-cart-form .product-thumbnail { width: 64px; }
	body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img { width: 52px; height: 52px; }
	body.woocommerce-cart .woocommerce-cart-form .product-name a { font-size: .85rem; line-height: 1.35; }
	body.woocommerce-cart .woocommerce-cart-form .product-mobile-actions { margin-top: 4px; font-size: .82rem; }
	body.woocommerce-cart .woocommerce-cart-form td.actions { padding-top: 14px; }
	body.woocommerce-cart .ct-cart-form-actions { flex-direction: column; align-items: stretch; gap: 10px; }
	body.woocommerce-cart .ct-cart-form-actions .coupon { flex: 0 0 auto; width: 100%; height: 50px; padding-left: 16px; }
	/* 16 px en el campo evita el zoom de iOS al tocarlo; el texto de ejemplo va más chico para que quepa entero */
	body.woocommerce-cart .ct-cart-form-actions .coupon .input-text { font-size: 16px; }
	body.woocommerce-cart .ct-cart-form-actions .coupon .input-text::placeholder { font-size: 13px; }
	body.woocommerce-cart .ct-cart-form-actions > .button[name="update_cart"] { align-self: center; width: auto; height: 38px; padding: 0 18px; font-size: .78rem; }
	body.woocommerce-cart .ct-woocommerce-cart-form { row-gap: 18px; }
	body.woocommerce-cart .cart_totals { --cart-totals-padding: 18px; padding: 18px 18px 20px; border-radius: 16px; }
	body.woocommerce-cart .cart_totals > h2 { padding-bottom: 12px; font-size: .95rem; }
	body.woocommerce-cart .cart_totals table.shop_table th,
	body.woocommerce-cart .cart_totals table.shop_table td { padding-block: 8px; font-size: .875rem; }
	body.woocommerce-cart .cart_totals .order-total th,
	body.woocommerce-cart .cart_totals .order-total td { padding-top: 12px; font-size: 1rem; }
	body.woocommerce-cart .cart_totals .wc-proceed-to-checkout { margin-top: 14px; }
	body.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button { min-height: 48px; }
}

/* Tarjeta de Instagram (contacto): foto, usuario y «Seguir en Instagram» con el glifo oficial en un solo color */
.af-ig {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px 18px;
	flex-wrap: wrap;
	max-width: 540px;
	padding: 14px 14px 14px 16px;
	border: 1px solid var(--af-line);
	border-radius: 18px;
	background: var(--af-surface);
}
.af-ig__perfil { display: flex; flex: 1 1 220px; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.af-ig__avatar {
	flex: 0 0 52px; width: 52px; height: 52px; padding: 2px; border-radius: 50%;
	background: var(--af-line); overflow: hidden;
}
.af-ig__avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.af-ig__datos { display: grid; gap: 2px; min-width: 0; }
.af-ig__usuario { font-size: 1rem; font-weight: 600; color: var(--af-ink); letter-spacing: 0; }
.af-ig__bajada { font-size: .8rem; line-height: 1.4; color: var(--af-ink-mute); }
.af-ig__perfil:hover .af-ig__usuario { color: var(--af-punto); }
body .af-ig a.af-ig__seguir {
	display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
	height: 40px; padding: 0 16px; border-radius: var(--af-pill);
	background: var(--af-ink); color: var(--af-surface); font-size: .82rem; font-weight: 600; text-decoration: none;
	transition: background-color .2s var(--af-ease);
}
body .af-ig a.af-ig__seguir:hover, body .af-ig a.af-ig__seguir:focus-visible { background: var(--af-punto); color: #fff; }
.af-ig__glifo { display: block; flex: 0 0 auto; }
@media (max-width: 420px) {
	.af-ig { padding: 14px; }
	body .af-ig a.af-ig__seguir { width: 100%; justify-content: center; }
}

/* Estado del evento en el listado: etiqueta siempre visible con punto que late
   (verde disponible, rojo no disponible, naranja próximamente, azul en cobertura).
   Escritorio y tablet: estado | fecha | foto | nombre. Móvil: estado | foto | nombre y fecha. */
.af-fila { grid-template-columns: 158px 88px 148px minmax(0, 1fr) 130px 84px; }
.af-fila .af-flecha { display: none; }
.af-fila__estado {
	order: -1; display: flex; align-items: center; align-self: stretch;
	padding-right: 22px; border-right: 1px solid var(--af-line);
}
.af-estado {
	--af-estado: #2FA36B; --af-estado-tinta: #1D7347;
	/* Ancho fijo igual en ES/EN/PT: cabe «Próximamente» (el más largo) y el contenido va centrado */
	box-sizing: border-box; width: 132px;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 7px 10px; border-radius: 999px; text-align: center;
	background: color-mix(in srgb, var(--af-estado) 11%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--af-estado) 30%, transparent);
	color: var(--af-estado-tinta);
	font-size: .74rem; font-weight: 600; letter-spacing: .02em; line-height: 1; white-space: nowrap;
}
.af-estado--no-disponible, .af-aviso-estado--no-disponible { --af-estado: #D9473F; --af-estado-tinta: #A3302A; }
.af-estado--proximamente, .af-aviso-estado--proximamente { --af-estado: #E8913A; --af-estado-tinta: #9C5714; }
.af-estado--en-cobertura, .af-aviso-estado--en-cobertura { --af-estado: #2F7FD8; --af-estado-tinta: #1D5AA6; }
.af-estado__punto {
	position: relative; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
	background: var(--af-estado);
	animation: af-latido 2.6s cubic-bezier(.4, 0, .2, 1) infinite;
}
.af-estado__punto::before,
.af-estado__punto::after {
	content: ""; position: absolute; inset: 0; border-radius: 50%;
	background: var(--af-estado); opacity: 0;
	animation: af-onda 2.6s cubic-bezier(.2, .6, .35, 1) infinite;
}
.af-estado__punto::after { animation-delay: .32s; }
@keyframes af-latido {
	0%, 100% { transform: scale(1); }
	12% { transform: scale(1.22); }
	24% { transform: scale(.94); }
	36% { transform: scale(1.12); }
	52% { transform: scale(1); }
}
@keyframes af-onda {
	0% { transform: scale(1); opacity: .5; }
	70% { opacity: 0; }
	100% { transform: scale(3.2); opacity: 0; }
}
@media (max-width: 1100px) {
	.af-fila { grid-template-columns: 150px 76px 120px minmax(0, 1fr) 84px; gap: 22px; }
	.af-fila__estado { padding-right: 18px; }
}
/* Móvil: el estado va a la izquierda de la foto, en columna (punto arriba, texto abajo) */
@media (max-width: 680px) {
	.af-fila {
		grid-template-columns: 86px 80px minmax(0, 1fr);
		grid-template-areas: "estado img nombre" "estado img fecha";
		gap: 4px 12px;
	}
	.af-fila__estado { order: 0; grid-area: estado; align-self: center; justify-content: stretch; min-width: 0; padding: 0; border: 0; }
	/* «Próximamente» es la palabra más larga: cabe en una línea dentro del recuadro */
	.af-estado {
		box-sizing: border-box; flex-direction: column; justify-content: center; gap: 7px;
		width: 100%; min-width: 0; min-height: 56px; overflow: hidden;
		padding: 10px 6px; border-radius: 14px;
		font-size: .62rem; letter-spacing: 0; line-height: 1.2; text-align: center; white-space: normal;
	}
	.af-estado__texto { max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
	.af-fila .af-flecha { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.af-estado__punto, .af-estado__punto::before, .af-estado__punto::after { animation: none; }
}

/* Listado por años: línea clara entre años y, en escritorio, filas intercaladas con un gris muy suave */
.af-eventos__lista .af-eventos__anio:not(:first-child) {
	margin-top: clamp(36px, 4vw, 56px);
	padding-top: clamp(28px, 3.5vw, 44px);
	border-top: 1px solid color-mix(in srgb, var(--af-ink) 22%, transparent);
}
@media (min-width: 681px) {
	.af-eventos__lista .af-fila {
		padding: 20px 22px; border-bottom: 0; border-radius: 12px;
		background: color-mix(in srgb, var(--af-ink) 2.5%, transparent);
		transition: background-color .2s ease;
	}
	.af-eventos__lista .af-fila:nth-of-type(even) { background: color-mix(in srgb, var(--af-ink) 5.5%, transparent); }
	/* Con filtro de deporte, el intercalado se recalcula solo con las filas visibles */
	.af-eventos__lista .af-fila:nth-child(odd of .af-fila:not([hidden])) { background: color-mix(in srgb, var(--af-ink) 2.5%, transparent); }
	.af-eventos__lista .af-fila:nth-child(even of .af-fila:not([hidden])) { background: color-mix(in srgb, var(--af-ink) 5.5%, transparent); }
	.af-eventos__lista .af-fila + .af-fila { margin-top: 4px; }
	.af-eventos__lista .af-fila:hover { background: color-mix(in srgb, var(--af-ink) 8.5%, transparent); }
}

/* Aviso del semáforo en la entrada del evento (en cobertura, próximamente, no disponible) */
/* Los colores (--af-estado) vienen de .af-aviso-estado--{estado}, definidos junto a los del badge */
.af-aviso-estado {
	display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 18px; align-items: start;
	margin: 0 0 clamp(28px, 4vw, 44px); padding: clamp(20px, 3vw, 28px) clamp(20px, 3.5vw, 32px);
	border-radius: 18px;
	background: color-mix(in srgb, var(--af-estado) 8%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--af-estado) 24%, transparent);
}
.af-aviso-estado > .af-estado__punto { width: 10px; height: 10px; margin-top: 9px; }
.af-aviso-estado__cuerpo { display: grid; gap: 8px; justify-items: start; }
.af-aviso-estado__titulo { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.3; color: var(--af-estado-tinta); }
.af-aviso-estado__texto { margin: 0; max-width: 62ch; font-size: 1rem; line-height: 1.6; color: var(--af-ink-soft); }
body .af-aviso-estado a.af-aviso-estado__boton { margin-top: 10px; }

/* Aviso de descuento: enlace a la galería del evento */
.woocommerce-info a.af-aviso-galeria, .woocommerce-message a.af-aviso-galeria {
	display: inline-block; margin-left: 6px; font-weight: 600; color: var(--af-ink); text-decoration: underline; text-underline-offset: 3px;
}
.woocommerce-info a.af-aviso-galeria:hover { color: var(--af-punto); }

/* Pie: crédito de desarrollo bajo el copyright */
.ct-footer .ct-footer-copyright .af-credito { display: block; margin-top: 4px; font-size: .74rem; font-weight: 400; letter-spacing: .04em; color: var(--af-ink-mute); }

/* Botón «Comprar» de cada foto: ancho de la foto, dorado #DEB36E con texto en tinta (sobre este tono el blanco no se lee),
   un poco más oscuro al pasar el cursor o al tocar. Añadida: tinta oscura con ✓. */
/* El precio va encima del bloque de acciones (hermano en la tarjeta): +7 % de tamaño y más aire hasta el botón */
body ul.products li.af-foto > .price { display: block; margin: 0 0 14px; font-size: .984rem; }
body ul.products li.af-foto a.button.add_to_cart_button {
	--theme-button-min-height: 42px;
	flex: 1 1 100%; width: 100%; min-height: 42px; margin: 0;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0 14px; border: 0; border-radius: 999px;
	background: #DEB36E; color: var(--af-ink);
	font-size: .84rem; font-weight: 600; letter-spacing: .02em;
	box-shadow: 0 1px 2px rgba(44, 42, 38, .12);
	transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body ul.products li.af-foto a.button.add_to_cart_button:hover,
body ul.products li.af-foto a.button.add_to_cart_button:focus-visible {
	background: #D2A35A; color: var(--af-ink);
	box-shadow: 0 4px 12px rgba(160, 112, 50, .26);
	transform: translateY(-1px);
}
body ul.products li.af-foto a.button.add_to_cart_button:active { background: #C6964E; transform: none; box-shadow: none; }
body ul.products li.af-foto a.button.add_to_cart_button:focus-visible { outline: 2px solid var(--af-ink); outline-offset: 2px; }
body ul.products li.af-foto a.button.add_to_cart_button.loading { opacity: .75; }
body ul.products li.af-foto a.button.add_to_cart_button.added,
body ul.products li.af-foto a.button.add_to_cart_button.added:hover { background: var(--af-ink); color: var(--af-bg); box-shadow: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
	body ul.products li.af-foto a.button.add_to_cart_button { transition: none; }
	body ul.products li.af-foto a.button.add_to_cart_button:hover { transform: none; }
}
