/* Agency Shop Core — estilos del front (mínimos, accesibles). */

.agency-carousel {
	margin: 2rem 0;
}
.agency-carousel__heading {
	margin: 0 0 1rem;
	font-size: clamp(1.25rem, 2vw + 1rem, 1.75rem);
}

/* Pista con scroll-snap horizontal (doc maestro §4.1). */
.agency-carousel__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.agency-carousel__viewport:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}
.agency-carousel__track {
	display: flex;
	gap: 1rem;
	margin: 0;
	padding: 0.25rem 0 1rem;
	list-style: none;
}
.agency-carousel__item {
	flex: 0 0 auto;
	width: min(72vw, 260px);
	scroll-snap-align: start;
}

/* Tarjeta de producto. */
.agency-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	gap: 0.5rem;
	/*
	 * Contiene los .screen-reader-text de WooCommerce (p. ej. el rango de precios), que son
	 * position:absolute. Sin un ancestro posicionado se colocan respecto al bloque contenedor
	 * inicial, escapan del recorte del carrusel y provocan scroll horizontal en toda la página.
	 */
	position: relative;
}
.agency-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.agency-card__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
.agency-card__media img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
}
.agency-card__title {
	display: block;
	margin-top: 0.5rem;
	font-weight: 600;
	line-height: 1.3;
}
.agency-card__price {
	font-size: 1rem;
}
.agency-card__price del {
	opacity: 0.6;
	margin-right: 0.35rem;
}
.agency-card__cta {
	align-self: start;
	margin-top: auto;
	display: inline-block;
	padding: 0.5rem 0.9rem;
	border-radius: 6px;
	background: currentColor;
	text-decoration: none;
}
.agency-card__cta {
	color: #fff;
	background: var(--wp--preset--color--brand-primary, #1a1a1a);
}
.agency-card__cta:hover {
	background: var(--wp--preset--color--brand-secondary, #1a1a1a);
}
.agency-card__cta:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-primary, #1a1a1a);
	outline-offset: 2px;
}

/* Texto solo para lectores de pantalla (técnica segura: no desborda la página). */
.agency-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Tarjeta de oferta. */
.agency-offer,
.agency-offer--link {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	gap: 0.5rem;
	text-decoration: none;
	color: inherit;
}
.agency-offer--link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
.agency-offer__media img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	object-fit: cover;
}

/*
 * Ofertas en modo "flyer": carteles anchos que la clienta diseña ella misma. Ocupan mucho más que
 * una tarjeta de producto y mantienen todos la misma proporción (16:9) para que el carrusel no
 * baile de altura. Tamaño recomendado del cartel: 1200 x 675 px.
 */
.agency-offers .agency-carousel__item {
	width: min(88vw, 640px);
}
.agency-offer--flyer .agency-offer__media {
	display: block;
}
.agency-offer--flyer .agency-offer__media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.agency-offer--flyer.agency-offer--link:hover .agency-offer__media img {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

/* Oferta sin cartel: tarjeta de texto de reserva. */
.agency-offer--text {
	justify-content: center;
	padding: 1.25rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.6);
}
.agency-offer__title {
	display: block;
	font-weight: 600;
}
.agency-offer__subtitle {
	display: block;
	opacity: 0.8;
	font-size: 0.95rem;
}

/* Controles del carrusel (mejora progresiva; los muestra el JS). */
.agency-carousel__controls {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.25rem;
}
.agency-carousel__btn {
	min-width: 44px;
	min-height: 44px;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	border: 1px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit;
}
.agency-carousel__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
.agency-carousel__btn[disabled] {
	opacity: 0.4;
	cursor: default;
}

/* Botón de WhatsApp. */
.agency-whatsapp-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1rem;
	border-radius: 999px;
	background: #25d366;
	color: #073b23;
	font-weight: 600;
	text-decoration: none;
}
.agency-whatsapp-button:focus-visible {
	outline: 2px solid #073b23;
	outline-offset: 2px;
}

/* Respeto a prefers-reduced-motion: sin desplazamiento suave. */
@media (prefers-reduced-motion: reduce) {
	.agency-carousel__viewport {
		scroll-behavior: auto;
	}
}
@media (prefers-reduced-motion: no-preference) {
	.agency-carousel__viewport {
		scroll-behavior: smooth;
	}
}
