/* Brigade Catálogo Pro — estilos de catálogo (no reemplaza el tema, solo lo complementa) */

:root {
	--bcp-primary: #123a63;
	--bcp-primary-dark: #0b2745;
	--bcp-accent: #f59e0b;
	--bcp-whatsapp: #25d366;
	--bcp-whatsapp-dark: #1ebe5b;
	--bcp-ink: #1e293b;
	--bcp-muted: #64748b;
	--bcp-border: #e2e8f0;
	--bcp-surface: #ffffff;
	--bcp-bg: #f6f8fb;
	--bcp-radius: 14px;
	--bcp-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
	--bcp-shadow-hover: 0 14px 30px rgba(15, 23, 42, 0.12);
}

/* ---------- Barra de logo y salida del catálogo ---------- */
.bcp-exit-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px clamp(12px, 4vw, 32px);
	background: var(--bcp-surface);
	border-bottom: 1px solid var(--bcp-border);
}

.bcp-exit-bar__logo {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.bcp-exit-bar__logo img {
	height: 32px;
	width: auto;
	display: block;
}

.bcp-exit-bar__logo span {
	font-weight: 800;
	font-size: 1.1rem;
	color: var(--bcp-ink);
}

.bcp-exit-bar__cta {
	flex: 0 0 auto;
	padding: 8px 14px;
}
.bcp-exit-bar__cta svg { width: 15px; height: 15px; }

@media (max-width: 480px) {
	.bcp-exit-bar__cta span { display: none; }
	.bcp-exit-bar__cta { padding: 9px; }
	.bcp-exit-bar__cta svg { width: 17px; height: 17px; }
}

/* ---------- Contenedor general ---------- */
.woocommerce ul.products,
.woocommerce-page ul.products {
	background: var(--bcp-bg);
	padding: 28px clamp(12px, 3vw, 28px) 8px;
	border-radius: var(--bcp-radius);
}

.woocommerce-result-count,
.woocommerce-ordering {
	background: var(--bcp-surface);
	border: 1px solid var(--bcp-border);
	border-radius: 10px;
	padding: 10px 16px;
	margin: 0 0 16px;
}

/* ---------- Navegación por categorías ---------- */
.bcp-cat-nav__heading {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--bcp-ink);
	margin: 4px 0 14px;
}

.bcp-cat-nav {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin: 4px 0 28px;
}

.bcp-cat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 190px;
	padding: 20px 20px 22px;
	border-radius: var(--bcp-radius);
	background: linear-gradient(160deg, var(--bcp-primary), var(--bcp-primary-dark));
	color: #fff;
	text-decoration: none;
	overflow: hidden;
	box-shadow: var(--bcp-shadow);
	border-bottom: 4px solid var(--bcp-accent);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bcp-cat-card:hover,
.bcp-cat-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--bcp-shadow-hover);
	color: #fff;
}

.bcp-cat-card__media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.65;
	filter: saturate(1.05);
	transition: opacity 0.2s ease, transform 0.4s ease;
}

.bcp-cat-card:hover .bcp-cat-card__media {
	opacity: 0.5;
	transform: scale(1.08);
}

.bcp-cat-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(190deg, rgba(11, 39, 69, 0.15) 0%, rgba(11, 39, 69, 0.55) 45%, rgba(11, 39, 69, 0.92) 100%);
}

.bcp-cat-card__icon {
	position: relative;
	z-index: 1;
	width: 40px;
	height: 40px;
	margin-bottom: 12px;
	padding: 8px;
	box-sizing: border-box;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 206, 138, 0.55);
	color: var(--bcp-accent);
}
.bcp-cat-card__icon svg { width: 100%; height: 100%; }

.bcp-cat-card__label {
	position: relative;
	z-index: 1;
	font-weight: 800;
	font-size: 1.08rem;
	line-height: 1.25;
	text-wrap: balance;
}

.bcp-cat-card__count {
	position: relative;
	z-index: 1;
	font-size: 0.78rem;
	color: #ffce8a;
	font-weight: 600;
	margin-top: 3px;
}

.bcp-cat-card__arrow {
	position: absolute;
	z-index: 1;
	top: 18px;
	right: 16px;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	transform: rotate(180deg);
	transition: background 0.2s ease, transform 0.2s ease;
}
.bcp-cat-card__arrow svg { width: 13px; height: 13px; }
.bcp-cat-card:hover .bcp-cat-card__arrow {
	background: var(--bcp-accent);
	color: #241705;
	transform: rotate(180deg) translateX(3px);
}

/* ---------- Franja "Productos Destacados" ---------- */
.bcp-featured-strip {
	margin: 4px 0 36px;
}

.bcp-featured-strip__heading {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--bcp-ink);
	margin: 0 0 14px;
}

/* ---------- Tarjeta de producto ("Ficha de flota": la foto ocupa toda la tarjeta,
   el texto vive en una franja navy sobre la imagen, como una placa de vehículo) ---------- */
.woocommerce ul.products li.product {
	position: relative;
	aspect-ratio: 3 / 4;
	border-radius: var(--bcp-radius);
	box-shadow: var(--bcp-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
	background: var(--bcp-bg);
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-3px);
	box-shadow: var(--bcp-shadow-hover);
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: #f1f5f9;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 20px 20px 96px;
	box-sizing: border-box;
	transition: transform 0.35s ease;
}

.woocommerce ul.products li.product:hover .astra-shop-thumbnail-wrap img {
	transform: scale(1.06);
}

/* Oculta el botón "bolsa de compra" heredado del modo catálogo: lo reemplazamos por CTAs propios */
.woocommerce ul.products li.product .ast-on-card-button {
	display: none !important;
}

/* Listón "Destacado" — aparece solo en productos marcados como Destacado en WooCommerce */
.woocommerce ul.products li.product.bcp-featured::before {
	content: "Destacado";
	position: absolute;
	top: 14px;
	right: -30px;
	z-index: 3;
	background: var(--bcp-accent);
	color: #241705;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 4px 34px;
	transform: rotate(35deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

.astra-shop-summary-wrap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 16px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	/* Fondo sólido: el texto debe leerse siempre, sin importar cuán clara sea la foto detrás */
	background: var(--bcp-primary-dark);
}

/* Transición suave desde la foto hacia la franja navy, sin texto encima (solo decorativa) */
.astra-shop-summary-wrap::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 40px;
	background: linear-gradient(180deg, rgba(11, 39, 69, 0) 0%, var(--bcp-primary-dark) 100%);
	pointer-events: none;
}

.woocommerce ul.products li.product .ast-woo-product-category {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ffce8a !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	font-weight: 700;
	color: #fff !important;
	line-height: 1.32;
	margin: 0;
}

.ast-loop-product__link {
	text-decoration: none;
}

/* Botones de acción propios (Ver detalles / Cotizar por WhatsApp) */
.bcp-card-actions {
	display: flex;
	gap: 8px;
	margin-top: 2px;
}

.bcp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 0.86rem;
	font-weight: 700;
	text-decoration: none;
	border-radius: 9px;
	padding: 10px 14px;
	line-height: 1.1;
	transition: background 0.15s ease, transform 0.1s ease;
	white-space: nowrap;
}

.bcp-btn:active { transform: scale(0.98); }

.bcp-btn--ghost {
	flex: 0 0 auto;
	color: var(--bcp-primary);
	background: #eaf1f9;
}
.bcp-btn--ghost:hover { background: #dbe7f5; color: var(--bcp-primary); }

/* Dentro de la tarjeta de producto el botón "ghost" vive sobre el fondo navy de la franja inferior */
.woocommerce ul.products li.product .bcp-btn--ghost {
	color: #fff;
	background: rgba(255, 255, 255, 0.16);
}
.woocommerce ul.products li.product .bcp-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.26);
	color: #fff;
}

.bcp-btn--whatsapp {
	flex: 1 1 auto;
	color: #fff;
	background: var(--bcp-whatsapp);
}
.bcp-btn--whatsapp:hover { background: var(--bcp-whatsapp-dark); color: #fff; }
.bcp-btn--whatsapp svg { width: 16px; height: 16px; flex: none; }

.bcp-btn--block { width: 100%; padding: 13px 14px; font-size: 0.92rem; }

/* ---------- Paginación ---------- */
.woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	list-style: none;
	padding: 0;
	margin: 20px 0 0;
}

.woocommerce-pagination ul.page-numbers li { margin: 0; }

.woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border-radius: 8px;
	background: var(--bcp-surface);
	border: 1px solid var(--bcp-border);
	color: var(--bcp-ink);
	text-decoration: none;
	font-weight: 600;
}

.woocommerce-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers:hover {
	background: var(--bcp-primary);
	border-color: var(--bcp-primary);
	color: #fff;
}

/* ---------- Ficha de producto ---------- */
.single-product .woocommerce-product-gallery {
	border-radius: var(--bcp-radius);
	overflow: hidden;
	background: #f1f5f9;
}

.single-product span.single-product-category a {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--bcp-primary);
}

.single-product .product_title.entry-title {
	color: var(--bcp-ink);
	margin-top: 6px;
}

/* Botón de WhatsApp existente en la ficha: se homogeniza con el sistema visual (con !important porque trae estilo inline) */
.single-product .summary a[href*="wa.me"] {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 420px;
	justify-content: center;
	margin-top: 18px !important;
	padding: 14px 20px !important;
	background: var(--bcp-whatsapp) !important;
	border-radius: 10px !important;
	font-size: 0.98rem;
	box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
}
.single-product .summary a[href*="wa.me"]:hover {
	background: var(--bcp-whatsapp-dark) !important;
}

.bcp-badges {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px 16px;
	list-style: none;
	padding: 16px;
	margin: 20px 0 0;
	background: var(--bcp-bg);
	border: 1px solid var(--bcp-border);
	border-radius: 12px;
}

.bcp-badges li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--bcp-ink);
}

.bcp-badges svg {
	width: 20px;
	height: 20px;
	flex: none;
	color: var(--bcp-primary);
}

.related.products h2 {
	font-size: 1.3rem;
	color: var(--bcp-ink);
	border-left: 4px solid var(--bcp-accent);
	padding-left: 12px;
	margin: 40px 0 20px;
}

/* Barra fija de cotización en móvil (ficha de producto) */
.bcp-sticky-cta {
	display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.bcp-cat-nav {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		padding: 18px 10px 4px;
	}

	.bcp-cat-nav {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.bcp-cat-card { min-height: 120px; padding: 14px; }

	.bcp-card-actions { flex-direction: column; }
	.bcp-btn--ghost { width: 100%; }

	.bcp-badges { grid-template-columns: 1fr; }

	/* Reserva espacio para la barra fija y evita que tape el contenido */
	.single-product { padding-bottom: 78px; }

	.bcp-sticky-cta {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid var(--bcp-border);
		box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product,
	.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
	.bcp-cat-card,
	.bcp-cat-card__media {
		transition: none !important;
	}
}
