/**
 * OPP2026100905 — Carrusel de marcas y bloque Lentes de sol.
 * Scope: .opp-shop-commercial. Sin dependencias externas.
 */

.opp-shop-commercial {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e5e7eb;
	min-width: 0;
}

.opp-shop-commercial > * + * {
	margin-top: 1.25rem;
}

.opp-shop-search__heading {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.45rem;
}

.opp-shop-search__title {
	color: #323232;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.2;
}

/* OPP2026101221 — Icono ⓘ (SVG) en un área de 28 px; 40 px en táctil. */
.opp-shop-search__help {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: -6px 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b6b6b;
	line-height: 1;
	cursor: help;
}

.opp-shop-search__help-icon {
	display: block;
	width: 16px;
	height: 16px;
}

.opp-shop-search__help:hover,
.opp-shop-search__heading.is-open .opp-shop-search__help {
	color: #b24c46;
}

.opp-shop-search__help:focus-visible {
	outline: 2px solid #de1a08;
	outline-offset: 0;
}

@media (pointer: coarse) {
	.opp-shop-search__help {
		width: 40px;
		height: 40px;
		margin: -12px -8px;
	}
}

.opp-shop-search__tip {
	position: absolute;
	left: 0;
	top: calc(100% + 0.35rem);
	z-index: 5;
	display: none;
	width: min(22rem, 100%);
	padding: 0.55rem 0.7rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	color: #323232;
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.4;
}

/*
 * Se muestra con hover (solo dispositivos con hover), foco de teclado o
 * toque/clic (.is-open, opp-catalog.js). Escape la oculta (.is-dismissed) hasta
 * salir del área. Sin :focus-within: un segundo toque debe poder cerrarla.
 */
@media (hover: hover) {
	.opp-shop-search__heading:hover .opp-shop-search__tip {
		display: block;
	}
}

.opp-shop-search__heading:has(.opp-shop-search__help:focus-visible) .opp-shop-search__tip,
.opp-shop-search__heading.is-open .opp-shop-search__tip {
	display: block;
}

.opp-shop-search .opp-shop-search__heading.is-dismissed .opp-shop-search__tip {
	display: none;
}

.opp-shop-commercial__title {
	margin: 0 0 0.75rem;
	color: #000000;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
}

.opp-brands-marquee__viewport {
	overflow: hidden;
	min-width: 0;
	width: 100%;
	container-type: inline-size;
	/* OPP2026101225: los logos entran y salen difuminados en lugar de cortados en seco. */
	-webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.opp-brands-marquee__viewport:focus-visible {
	outline: 2px solid rgba(178, 76, 70, 0.55);
	outline-offset: 2px;
}

.opp-brands-marquee__track {
	display: flex;
	align-items: center;
	width: max-content;
	gap: 0;
	margin: 0;
	padding: 0.15rem 0;
	list-style: none;
	animation: opp-brands-scroll 36s linear infinite;
}

.opp-brands-marquee:hover .opp-brands-marquee__track,
.opp-brands-marquee:focus-within .opp-brands-marquee__track {
	animation-play-state: paused;
}

.opp-brands-marquee__item {
	box-sizing: border-box;
	flex: 0 0 50cqw;
	width: 50cqw;
	margin: 0;
	padding: 0 0.35rem;
	line-height: 0;
	text-align: center;
}

.opp-brands-marquee__logo {
	display: block;
	width: auto;
	height: 22px;
	max-width: 100%;
	margin-inline: auto;
	object-fit: contain;
}

@keyframes opp-brands-scroll {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

.opp-sun {
	display: flex;
	flex-direction: column;
	padding: 0.85rem 0 0;
	border-top: 1px solid #eef0f2;
}

.opp-sun__media {
	order: -1;
	margin: 0 0 0.75rem;
	line-height: 0;
}

.opp-sun__media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 140px;
	object-fit: contain;
	border-radius: 8px;
	background: #f7f7f7;
}

.opp-sun__text {
	margin: 0 0 0.5rem;
	color: #323232;
	font-size: 0.82rem;
	line-height: 1.45;
}

.opp-sun__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 0.28rem 0.8rem;
	border: 1px solid #323232;
	border-radius: 8px;
	background-color: #323232;
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.opp-sun__cta:hover,
.opp-sun__cta:focus-visible {
	background-color: #b24c46;
	border-color: #b24c46;
	color: #ffffff;
}

.opp-sun__cta:focus-visible {
	outline: 2px solid rgba(178, 76, 70, 0.55);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.opp-brands-marquee__track {
		animation: none;
	}

	.opp-brands-marquee__viewport {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
	}

	.opp-brands-marquee__item {
		scroll-snap-align: center;
	}

	.opp-brands-marquee__clone {
		display: none;
	}
}

/* Desktop: copia drawer visible bajo filtros laterales; flow oculto. */
@media screen and (min-width: 981px) {
	.opp-shop-commercial--flow {
		display: none;
	}
}

/*
 * OPP2026101221 — Un solo patrón para ≤980 px (antes: dentro del drawer en
 * tablet y tras la grilla en móvil). El drawer contiene solo filtros; el bloque
 * comercial va siempre tras la grilla. El orden de la página lo fija Brand.
 */
@media screen and (max-width: 980px) {
	.opp-shop-commercial--drawer {
		display: none;
	}

	.opp-shop-commercial--flow {
		margin-top: 1.75rem;
		padding-top: 1.25rem;
	}

	.opp-brands-marquee__logo {
		height: 20px;
	}
}

@media screen and (min-width: 601px) and (max-width: 980px) {
	.opp-shop-commercial--flow .opp-brands-marquee__item {
		flex-basis: 25cqw;
		width: 25cqw;
	}

	.opp-shop-commercial--flow .opp-sun {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(160px, 0.85fr);
		gap: 0.75rem 1.25rem;
		align-items: center;
	}

	.opp-shop-commercial--flow .opp-sun__copy,
	.opp-shop-commercial--flow .opp-sun__media {
		order: 0;
		margin: 0;
		min-width: 0;
	}
}

@media screen and (max-width: 600px) {
	.opp-sun__media img {
		max-height: 180px;
	}

	.opp-sun__cta {
		min-height: 36px;
	}
}

/* OPP2026100911 — carrito: foco OPP y ocultar CTA FMA de página Carrito. */
.woocommerce-cart :is(a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus {
	outline: none;
}

.woocommerce-cart :is(a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
	outline: 2px solid rgba(178, 76, 70, 0.55);
	outline-offset: 2px;
	box-shadow: none;
}

.woocommerce-cart .wc-block-cart :is(button, a):focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

.woocommerce-cart .fma_oow_btn,
.woocommerce-cart .fma-oow-share,
.woocommerce-cart .fma_oow_share_btn,
.woocommerce-cart a[href*="wa.me"],
.woocommerce-cart a[href*="api.whatsapp.com"],
.woocommerce-cart .wc-block-cart__submit + .fma_oow,
.woocommerce-cart .oow-whatsapp-button {
	display: none;
}

/*
 * OPP2026101225 — Empty state contextual del catálogo (búsqueda, filtros, ambos
 * o selección vacía). Marcado de Storefront (opp_storefront_no_results).
 */
.opp-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	max-width: 34rem;
	margin: 2rem auto;
	padding: 1.5rem 1rem;
	text-align: center;
}

.opp-empty__title {
	margin: 0;
	color: #323232;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.opp-empty__search {
	display: flex;
	gap: 0.5rem;
	width: 100%;
	max-width: 24rem;
	margin: 0;
}

.opp-empty__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 40px;
	padding: 0 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #ffffff;
	color: #323232;
	font-size: 0.9rem;
}

.opp-empty__input:focus-visible {
	border-color: #de1a08;
	outline: 2px solid #de1a08;
	outline-offset: 0;
}

.opp-empty__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1rem;
	margin: 0;
}

.opp-empty__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 0.9rem;
	border: 1px solid #323232;
	border-radius: 8px;
	background: #ffffff;
	color: #323232;
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.opp-empty__action--primary {
	background: #323232;
	color: #ffffff;
}

.opp-empty__action:hover,
.opp-empty__action:focus-visible {
	border-color: #b24c46;
	background: #b24c46;
	color: #ffffff;
}

.opp-empty__action:focus-visible {
	outline: 2px solid #de1a08;
	outline-offset: 2px;
}

/*
 * OPP2026101303 — Búsqueda preventiva (Storefront 1.10.0). Mensaje y acciones
 * bajo el campo; el texto dice el estado, el color solo lo acompaña.
 */
.opp-search-preflight {
	margin: 0.4rem 0 0;
	min-width: 0;
}

.opp-search-preflight__message {
	margin: 0;
	color: #4b5563;
	font-size: 0.82rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.opp-search-preflight__message[aria-busy="true"] {
	opacity: 0.6;
}

.opp-search-preflight[data-state="elsewhere"] .opp-search-preflight__message,
.opp-search-preflight[data-state="none"] .opp-search-preflight__message {
	padding-left: 0.55rem;
	border-left: 3px solid #b24c46;
	color: #323232;
	font-weight: 500;
}

.opp-empty .opp-search-preflight {
	width: 100%;
	max-width: 24rem;
	text-align: left;
}

.opp-search-preflight__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.5rem 0 0;
}

.opp-search-preflight__actions[hidden] {
	display: none;
}

.opp-search-preflight__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 36px;
	padding: 0.25rem 0.75rem;
	border: 1px solid #323232;
	border-radius: 8px;
	background: #ffffff;
	color: #323232;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.opp-search-preflight__action--primary {
	background: #323232;
	color: #ffffff;
}

.opp-search-preflight__action:hover,
.opp-search-preflight__action:focus-visible {
	border-color: #b24c46;
	background: #b24c46;
	color: #ffffff;
}

.opp-search-preflight__action:focus-visible {
	outline: 2px solid #de1a08;
	outline-offset: 2px;
}

/* Buscar deshabilitado: semántica real (disabled) y aspecto apagado, sin hover. */
.opp-shop-filters .opp-shop-search .wp-block-search__button:disabled,
.opp-shop-filters .opp-shop-search .wp-block-search__button:disabled:hover,
.opp-empty__action:disabled,
.opp-empty__action:disabled:hover {
	border-color: #9ca3af;
	background: #e5e7eb;
	color: #4b5563;
	cursor: not-allowed;
}
