﻿/* ==========================================================================
   BrandTienda Fernanda â€” project layer
   DirecciÃ³n visual: Â«AlmacÃ©n NaturalÂ» (cÃ¡lida, artesanal, limpia).

   Paleta y familias base las genera BT DiseÃ±o en theme.json
   (Designer::filter_theme_json REEMPLAZA esa secciÃ³n, por eso acÃ¡ no hay
   theme.json propio). Este archivo hace dos cosas:

   1. Sobreescribe las variables de preset que el engine no puede expresar
      (fuentes del diseÃ±o, y los colores de apoyo: honey, terra, sageâ€¦).
   2. Define tokens propios del proyecto (--fer-*) para los bloques nuevos.

   Bump de Version en style.css ante cada cambio: es el cache-buster.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */

:root {
	/* Colores del diseÃ±o que la paleta derivada no cubre. */
	--fer-cream: #faf6ee;
	--fer-cream-2: #f3ecdf;
	--fer-paper: #ffffff;
	--fer-forest: #24461f;
	--fer-forest-2: #2f5d1e;
	--fer-leaf: #3f730b;
	--fer-sage: #8eaa8c;
	--fer-sage-soft: #e4ecdd;
	--fer-honey: #e9a23b;
	--fer-honey-soft: #fcefd9;
	--fer-terra: #b4552a;
	--fer-ink: #1e2a1c;
	--fer-muted: #5e6b5a;
	--fer-line: #e7e0d2;

	/* Forma */
	--fer-r-sm: 10px;
	--fer-r-md: 18px;
	--fer-r-lg: 28px;
	--fer-r-pill: 999px;

	/* Profundidad */
	--fer-sh-1: 0 1px 2px rgba(36, 70, 31, 0.06), 0 4px 14px rgba(36, 70, 31, 0.06);
	--fer-sh-2: 0 10px 30px rgba(36, 70, 31, 0.12);

	/* Ritmo */
	--fer-gap: 22px;
	--fer-gap-sm: 12px;
	--fer-container: 1240px;
	--fer-section-y: clamp(56px, 7vw, 96px);

	/* Escala tipogrÃ¡fica (mobile-first) */
	--fer-h1: clamp(38px, 5vw, 66px);
	--fer-h2: clamp(30px, 3.6vw, 44px);
	--fer-h3: clamp(15px, 1.2vw, 16px);
	--fer-body: clamp(16px, 1.1vw, 19px);
	--fer-eyebrow: 13px;
}

/* --------------------------------------------------- 2. Fuentes del diseÃ±o */

/* Designer referencia las presets por slug: pisan la familia, no el peso. */
:root {
	--wp--preset--font-family--heading: 'Fraunces', Georgia, 'Times New Roman', serif;
	--wp--preset--font-family--system: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* AdemÃ¡s de la variable, se fija la familia en los tÃ­tulos: no depende del
   orden en que WordPress imprima los global styles. */
h1, h2, h3, h4, h5,
.wp-block-heading,
.bt-hero2__title,
.bt-section-head h2 {
	font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
}

body,
button,
input,
select,
textarea,
.wp-block-button__link {
	font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* La itÃ¡lica solo se usa para una palabra por tÃ­tulo. */
h1, h2, .wp-block-heading {
	font-variation-settings: 'SOFT' 0, 'WONK' 0;
	letter-spacing: -0.01em;
	line-height: 1.1;
}

/* Fraunces variable: sin `opsz` explÃ­cito el navegador elige el Ã³ptico. */
h1 { font-size: var(--fer-h1); }
h2 { font-size: var(--fer-h2); }

/* --------------------------------------------------- 3. Base de la tienda */

body {
	background-color: var(--fer-cream);
	color: var(--fer-ink);
	font-size: var(--fer-body);
	line-height: 1.55;
}

/* Contenedor del proyecto: 1240 con 24 de aire. */
.wp-block-group.alignwide,
.alignwide {
	max-width: var(--fer-container);
}

/* Precios alineados en columna (tabulares) en toda la tienda. */
.price,
.woocommerce-Price-amount,
.bt-card__price {
	font-variant-numeric: tabular-nums;
}

/* ------------------------- 4. Card de producto (loop Woo + grillas engine) */
/* Tarjeta Â«CompletaÂ», opciÃ³n A del brief: badges de dieta, marca, chips de
   formato, precio con tachado, nota de retiro y CTA outline â†’ fill.
   Se estiliza el markup que ya emiten WooCommerce y el engine (no se toca el
   HTML ni las clases de Woo, para no romper el agregar al carrito). Las piezas
   nuevas las agrega inc/card.php con las clases .fer-card__* / .fer-badge.
   Las dos superficies, una sola tarjeta:
   - `ul.products li.product`      â†’ tienda, categorÃ­as, relacionados, upsells.
   - `.wc-block-product`           â†’ grillas del engine (home, ofertas).
   El selector largo del engine no es capricho: engine.css define su propia
   variante de tarjeta (`.btd-cards--outlined .wc-block-product-template
   .wc-block-product`) con borde y radio propios y GANA por especificidad; con
   estas tres clases quedamos empatados y custom.css carga despuÃ©s. */

.woocommerce ul.products li.product,
.wc-block-product-template .wc-block-product,
.wp-block-woocommerce-product-collection .wc-block-product-template .wc-block-product {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px;
	border: 1px solid var(--fer-line, #e7e0d2);
	border-radius: var(--fer-r-md, 18px);
	background: var(--fer-paper, #fff);
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.woocommerce ul.products li.product:hover,
.wc-block-product-template .wc-block-product:hover,
.wp-block-woocommerce-product-collection .wc-block-product-template .wc-block-product:hover {
	border-color: color-mix(in srgb, var(--fer-sage) 60%, var(--fer-line));
	box-shadow: var(--fer-sh-2, 0 10px 30px rgba(36, 70, 31, 0.12));
	transform: translateY(-3px);
}

/* Badges de dieta (mÃ¡ximo tres, los corta el PHP) + sello de oferta a la
   derecha. El bloque se imprime antes del link, asÃ­ que la imagen dejÃ³ de ser
   el `a:first-child` del padre: el marco del link se declara por su clase. */
.fer-card__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
}
.fer-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.28rem;
	padding: 0.14rem 0.45rem;
	border-radius: var(--fer-r-pill, 999px);
	background: var(--fer-sage-soft, #e4ecdd);
	color: var(--fer-forest, #24461f);
	font-size: 0.66rem;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.01em;
	white-space: nowrap;
}
.fer-badge svg {
	width: 11px;
	height: 11px;
	flex: none;
}
.fer-badge--promo {
	margin-left: auto;
	background: var(--fer-honey, #e9a23b);
	color: #4a2d05;
}

/* Marca en versalitas: el nombre del producto ya no necesita decirla. */
.fer-card__brand {
	margin: 0;
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--fer-muted, #5e6b5a);
}

/* La imagen se enmarca en la <img>, NO en el <a>. En el loop de Woo el <a>
   envuelve imagen + marca + tÃ­tulo + precio; darle `aspect-ratio: 1/1` y
   `overflow: hidden` recortaba todo lo que venÃ­a despuÃ©s de la imagen: la
   tarjeta se veÃ­a sin nombre y sin precio (el texto estaba, pero fuera del
   recorte). El wrapper con aspect-ratio solo sirve en las tarjetas del engine,
   donde el bloque de imagen es un contenedor propio. */
.wc-block-product .wc-block-components-product-image {
	display: block;
	aspect-ratio: 1 / 1;
	padding: 18px;
	background: #fff;
	border-radius: var(--fer-r-sm, 10px);
	overflow: hidden;
}

.wc-block-product .wc-block-components-product-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
	display: block;
}

.woocommerce ul.products li.product .woocommerce-LoopProduct-link img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	padding: 18px;
	background: #fff;
	border-radius: var(--fer-r-sm, 10px);
}

/* Sin zoom en el loop: no hay contenedor que recorte la imagen y el escalado
   se montaba sobre la marca. En las tarjetas del engine sigue. */
.woocommerce ul.products li.product:hover .woocommerce-LoopProduct-link img {
	transform: none;
}

/* LÃ­nea de precio en efectivo (brandgen-precios, `bgp-precios--loop`): el
   plugin la imprime a .9em en verde #1a7a3c despuÃ©s del precio. Se baja a lÃ­nea
   secundaria para que el precio de lista siga siendo el protagonista.
   Nota: `brandgen-dynamic-pricing` imprimÃ­a una SEGUNDA lÃ­nea idÃ©ntica
   (Â«Efectivo/ContadoÂ») y quedÃ³ desactivado â€” ver odd/tasks/card-producto.md. */
.woocommerce ul.products li.product .bgp-precios--loop,
.wc-block-product .bgp-precios--loop {
	display: block;
	margin: 0.15rem 0 0;
	line-height: 1.4;
}
.woocommerce ul.products li.product .bgp-precios--loop .bgp-precios__efectivo,
.wc-block-product .bgp-precios--loop .bgp-precios__efectivo {
	font-size: 0.72rem;
	color: var(--fer-leaf, #3f730b);
	font-weight: 500;
}
.woocommerce ul.products li.product .bgp-precios--loop .bgp-precios__efectivo strong,
.wc-block-product .bgp-precios--loop .bgp-precios__efectivo strong {
	font-size: 1em;
	font-weight: 600;
}

.wc-block-product .wp-block-post-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}

.wc-block-product .wp-block-post-title a,
.woocommerce ul.products li.product .woocommerce-loop-product__title a {
	color: var(--fer-forest, #24461f);
	text-decoration: none;
}

/* Chip de formato (pa_formato): untable, cÃ¡psulas, en polvo, barraâ€¦ */
.fer-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0;
}
.fer-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.1rem 0.4rem;
	border-radius: var(--fer-r-sm, 10px);
	background: var(--fer-cream-2, #f3ecdf);
	color: var(--fer-ink, #1e2a1c);
	font-size: 0.66rem;
	font-weight: 600;
	line-height: 1.5;
}

.wc-block-product .wc-block-components-product-price,
.woocommerce ul.products li.product .price {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: var(--fer-forest, #24461f);
	font-variant-numeric: tabular-nums;
}

.wc-block-product .wc-block-components-product-price del,
.woocommerce ul.products li.product .price del {
	font-size: 13px;
	font-weight: 400;
	color: var(--fer-muted, #5e6b5a);
}

/* Slots apagados por falta de dato (ver inc/card.php): precio unitario y nota
   de retiro. El CSS queda listo para cuando se enciendan. */
.fer-card__unit,
.fer-card__note {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	margin: 0;
	font-size: 0.7rem;
	line-height: 1.45;
	color: var(--fer-muted, #5e6b5a);
}
.fer-card__note svg {
	width: 11px;
	height: 11px;
	flex: none;
	color: var(--fer-sage, #8eaa8c);
}

/* CTA: pill outline que se rellena al hover. El `background` va con !important
   porque el padre pinta el botÃ³n desde un selector con mÃ¡s peso y con
   !important (`.woocommerce ul.products li.product .button`). */
.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
.woocommerce ul.products li.product .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	border: 1.5px solid var(--fer-forest, #24461f);
	border-radius: var(--fer-r-pill, 999px);
	background: transparent !important;
	color: var(--fer-forest, #24461f) !important;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link:hover,
.woocommerce ul.products li.product .button:hover {
	border-color: var(--fer-forest-2, #2f5d1e);
	background: var(--fer-forest-2, #2f5d1e) !important;
	color: #fff !important;
}

/* CorazÃ³n de lista de deseos: sobre la FOTO, abajo a la derecha.
   La caja de la imagen es cuadrada, pero su altura depende del ancho de la
   tarjeta y de si la tarjeta tiene badges de dieta, asÃ­ que la posiciÃ³n exacta
   la calcula `fer-favorito-foto.php` contra el rectÃ¡ngulo real de la imagen.
   AcÃ¡ sÃ³lo se saca del flujo y se apila sobre la foto. */
.woocommerce ul.products li.product .brandtienda-wl {
	position: absolute;
	top: auto;
	right: 22px;
	bottom: auto;
	z-index: 4;
	margin: 0;
	align-self: auto;
	backdrop-filter: none;
}

@media (max-width: 600px) {
	.fer-badge {
		font-size: 0.62rem;
	}
	.wc-block-product .wp-block-post-title,
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 15px;
	}
}

/* Mobile: carrusel con snap en las grillas del home.
   Ojo: WooCommerce marca el template con `columns-N`, que fija
   `grid-template-columns: repeat(N, 1fr)`. Con eso el carrusel no desborda
   (las tarjetas se aprietan a ~30px) y no hay nada que desplazar. Hay que
   anular esas columnas explÃ­citas y dejar que las cree `grid-auto-flow`.
   Selector con la clase del bloque de colecciÃ³n para ganarle a `columns-N`. */
@media (max-width: 900px) {
	.wp-block-woocommerce-product-collection .wc-block-product-template.is-flex-container {
		display: grid;
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 46%;
		gap: 12px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 8px;
		-webkit-overflow-scrolling: touch;
	}

	.wp-block-woocommerce-product-collection .wc-block-product-template.is-flex-container > .wc-block-product {
		width: auto;
		min-width: 0;
		scroll-snap-align: start;
	}
}

/* ------------------------------- 5. Carrito: layout y tablas */

/* El theme pinta las cabeceras de tabla con `surface`; con la paleta nueva
   eso deja una franja crema dentro de la tarjeta de totales. Se sube la
   especificidad para ganarle a woo.css del padre. */
.woocommerce .cart_totals table.shop_table th,
.woocommerce .woocommerce-checkout-review-order table.shop_table th,
.woocommerce .cart table.shop_table th {
	background: transparent;
	color: var(--fer-muted, #5e6b5a);
	font-weight: 600;
	font-size: 14px;
	text-transform: none;
	letter-spacing: 0;
	border-top: 1px solid var(--fer-line, #e7e0d2);
	vertical-align: middle;
}

.woocommerce .cart_totals table.shop_table td {
	border-top: 1px solid var(--fer-line, #e7e0d2);
	vertical-align: middle;
}

/* Carrito y checkout: 80% del viewport (95% en mobile), 70% productos / 30%
   resumen. El `main` del theme usa layout constrained (1240 px), asÃ­ que
   primero se libera la pÃ¡gina y despuÃ©s se centra el contenido. */
.woocommerce-cart main.wp-block-group,
.woocommerce-checkout main.wp-block-group {
	/* Fluido: ocupa el ancho disponible de la ventana y tope 1600 px.
	   No se usa 80vw porque en pantallas de ~1250 px eso da 1000, mÃ¡s
	   angosto que el contenedor del theme (1240). */
	--fer-page-w: min(calc(100vw - 48px), 1600px);
	max-width: none;
}

/* Carrito y checkout fluidos. WooCommerce trae en `woocommerce-blocktheme.css`
   `.woocommerce-cart main .woocommerce { max-width: 1000px }`, que gana por
   especificidad: hay que igualar el selector (main + .woocommerce). */
.woocommerce-cart main .wp-block-post-title,
.woocommerce-checkout main .wp-block-post-title,
.woocommerce-cart main .woocommerce,
.woocommerce-checkout main .woocommerce {
	width: 100%;
	max-width: var(--fer-page-w, min(calc(100vw - 48px), 1600px));
	margin-inline: auto;
}

.woocommerce-cart .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr);
	column-gap: 40px;
	align-items: start;
}

@media (max-width: 899px) {
	.woocommerce-cart main.wp-block-group,
	.woocommerce-checkout main.wp-block-group {
		--fer-page-w: 95vw;
	}
}

.woocommerce-cart .woocommerce > .woocommerce-cart-form {
	grid-column: 1;
	grid-row: 1;
	margin-bottom: 0;
	/* Sin overflow: la tabla tiene que entrar, no scrollear. */
	min-width: 0;
	max-width: 100%;
}

/* La tabla del carrito entra en 6 columnas sin desbordar: menos aire y
   miniatura mÃ¡s chica. */
.woocommerce-cart table.shop_table td,
.woocommerce-cart table.shop_table th {
	padding: 10px 8px;
	font-size: 14px;
}

.woocommerce-cart table.shop_table .product-thumbnail img {
	width: 56px;
	height: auto;
}

.woocommerce-cart table.shop_table .product-name a {
	word-break: break-word;
}

.woocommerce-cart table.shop_table {
	width: 100%;
	min-width: 0;
	table-layout: auto;
}

.woocommerce-cart .cart-collaterals {
	display: contents;
}

.woocommerce-cart .cart-collaterals .cart_totals {
	grid-column: 2;
	grid-row: 1;
	float: none;
	width: auto;
	margin: 0;
	position: sticky;
	top: 24px;
	min-width: 0;
}

.woocommerce-cart .cart-collaterals .cross-sells {
	grid-column: 1 / -1;
	grid-row: 2;
	float: none;
	width: auto;
	margin-top: 8px;
	padding-top: 24px;
	border-top: 1px solid var(--fer-line, #e7e0d2);
}

.woocommerce .cart-collaterals .cart_totals h2 {
	font-family: 'Fraunces', Georgia, serif;
	font-size: clamp(20px, 2vw, 26px);
	margin: 0 0 12px;
}

.woocommerce .cart_totals .order-total th,
.woocommerce .cart_totals .order-total td,
.woocommerce .cart_totals .order-total .amount {
	font-size: 19px;
	font-weight: 700;
	color: var(--fer-forest, #24461f);
	font-variant-numeric: tabular-nums;
}

.woocommerce .cart_totals tr:first-child th,
.woocommerce .cart_totals tr:first-child td {
	border-top: 0;
}

.woocommerce .cart_totals .woocommerce-shipping-methods {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 6px;
}

.woocommerce .cart_totals .woocommerce-shipping-methods label {
	font-size: 14px;
	line-height: 1.35;
}

/* Cross-sells ("SumÃ¡ a tu compra"): misma tarjeta que las grillas. */
.cross-sells > h2 {
	font-family: 'Fraunces', Georgia, serif;
	font-size: clamp(20px, 2vw, 26px);
	margin-bottom: 14px;
}

.cross-sells ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: var(--fer-gap, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cross-sells ul.products li.product {
	margin: 0;
}

/* "SumÃ¡ a tu compra" â€” bloque de upsell del engine, dentro del form. */
.brandtienda-upsell__add,
.woocommerce .brandtienda-upsell__add {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: 6px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--fer-r-pill, 999px);
	background: var(--fer-forest-2, #2f5d1e);
	color: #fff;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
}

.brandtienda-upsell__add:hover,
.brandtienda-upsell__add:focus-visible {
	background: var(--fer-forest, #24461f);
	color: #fff;
	text-decoration: none;
}

.cross-sells ul.products li.product .button,
.cross-sells ul.products li.product .add_to_cart_button,
.cross-sells ul.products li.product a[href*="add-to-cart"],
.cross-sells ul.products li.product button,
.woocommerce .cross-sells ul.products li.product .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: 6px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--fer-r-pill, 999px);
	background: var(--fer-forest-2, #2f5d1e);
	color: #fff;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
}

.cross-sells ul.products li.product .button:hover,
.cross-sells ul.products li.product .button:focus-visible,
.cross-sells ul.products li.product a[href*="add-to-cart"]:hover,
.woocommerce .cross-sells ul.products li.product .button:hover {
	background: var(--fer-forest, #24461f);
	text-decoration: none;
	color: #fff;
}

@media (max-width: 899px) {
	.woocommerce-cart .woocommerce {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 24px;
	}

	.woocommerce-cart .woocommerce > .woocommerce-cart-form {
		grid-column: 1;
		grid-row: 1;
	}

	.woocommerce-cart .cart-collaterals .cart_totals {
		grid-column: 1;
		grid-row: 2;
		position: static;
	}

	.woocommerce-cart .cart-collaterals .cross-sells {
		grid-column: 1;
		grid-row: 3;
	}
}

/* ------------------------------------------------- 6. Marca facet (long) */

/* Solo el grupo Marca espejado: el resto de grupos no se toca. */
.btf__group--marca .btf__list {
	max-height: 260px;
	overflow-y: auto;
}

.btf-marca-search {
	width: 100%;
	margin-bottom: 0.5rem;
}

.btf-marca-empty {
	font-size: 0.85em;
	opacity: 0.7;
	margin: 0.25rem 0 0;
}

/* ------------------------------------------------- 7. Footer: logo de marca */

/* El footer es un template part de archivo (parts/footer.html del child), asÃ­
   que el logo no puede apuntar a uploads con URL absoluta: quedarÃ­a atada al
   dominio y al path de cada instalaciÃ³n (local en la raÃ­z, producciÃ³n en
   /fernandaalimentos). Por eso usa core/site-logo, que resuelve el attachment
   con el dominio de la instalaciÃ³n; acÃ¡ solo se ajusta el tamaÃ±o, porque la
   regla global del padre (44px de alto) es la del header.
   El ancho sigue el del tÃ­tulo de texto que reemplaza: el wordmark es 568x172. */
.bt-footer__logo {
	margin-bottom: 1rem;
}
/* Selector con mÃ¡s peso que `.wp-block-site-logo.is-default-size img` del
   padre (el bloque se imprime con is-default-size), que fija 44px de alto. */
.bt-footer__brand .wp-block-site-logo.bt-footer__logo img {
	width: 200px;
	height: auto;
	max-width: 100%;
}

/* ------------------------------------------- 8. Ficha: datos del producto */

/* Reemplaza el `product_meta` de Woo (SKU + categorÃ­a + etiquetas + marca en
   una sola lÃ­nea corrida). Es una lista de definiciÃ³n: la etiqueta va muda, en
   mayÃºsculas chicas a la izquierda, y el valor legible a la derecha. */
.fer-meta {
	display: grid;
	grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
	align-items: start;
	gap: 0.7rem 1rem;
	margin: 1.4rem 0 0;
	padding-top: 1.15rem;
	border-top: 1px solid var(--fer-line);
	font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 0.95rem;
	line-height: 1.45;
}

.fer-meta__label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	padding-top: 0.1rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fer-muted);
}

.fer-meta__icon {
	display: inline-flex;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	color: var(--fer-leaf);
}

.fer-meta__icon svg {
	width: 100%;
	height: 100%;
}

.fer-meta__value {
	margin: 0;
	color: var(--fer-ink);
	overflow-wrap: anywhere;
}

.fer-meta__value a {
	color: var(--fer-forest-2);
	text-decoration: none;
	border-bottom: 1px solid rgba(47, 93, 30, 0.28);
	transition: border-color 0.15s ease, color 0.15s ease;
}

.fer-meta__value a:hover,
.fer-meta__value a:focus-visible {
	color: var(--fer-forest);
	border-bottom-color: currentColor;
}

/* Etiquetas como pastillas: son atributos, no una frase. */
.fer-meta__pill {
	display: inline-block;
	margin: 0 0.22rem 0.35rem 0;
	padding: 0.16rem 0.62rem;
	border: 0;
	border-radius: var(--fer-r-pill);
	background: var(--fer-sage-soft);
	color: var(--fer-forest-2);
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.6;
}

.fer-meta__value--etiquetas a.fer-meta__pill:hover,
.fer-meta__value--etiquetas a.fer-meta__pill:focus-visible {
	background: #d6e3cb;
	color: var(--fer-forest);
	border-bottom-color: transparent;
}

.fer-meta__value--etiquetas a.fer-meta__pill:last-child,
.fer-meta__value--etiquetas span.fer-meta__pill:last-child {
	margin-right: 0;
}

@media (max-width: 520px) {
	.fer-meta {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.15rem;
	}

	.fer-meta__value {
		margin-bottom: 0.7rem;
	}

	.fer-meta__value:last-child {
		margin-bottom: 0;
	}
}

/* -------------------------------------- 8b. Ficha: descripciÃ³n legible */

/* El texto de la descripciÃ³n corrÃ­a a todo el ancho del contenedor (1085 px,
   ~130 caracteres por lÃ­nea), asÃ­ que el ojo perdÃ­a el renglÃ³n. Se limita a
   una medida de lectura y se le da ritmo a los pÃ¡rrafos. */
.woocommerce-Tabs-panel--description {
	max-width: 68ch;
}

.woocommerce-Tabs-panel--description > p {
	margin: 0 0 1.05em;
	line-height: 1.7;
}

.woocommerce-Tabs-panel--description > p:first-of-type {
	margin-top: 0;
}

.woocommerce-Tabs-panel--description > p:last-child {
	margin-bottom: 0;
}

.woocommerce-Tabs-panel--description strong,
.woocommerce-Tabs-panel--description b {
	color: var(--fer-forest);
	font-weight: 700;
}

.woocommerce-Tabs-panel--description ul,
.woocommerce-Tabs-panel--description ol {
	margin: 0 0 1.05em 1.2em;
	padding: 0;
}

.woocommerce-Tabs-panel--description li {
	margin: 0 0 0.35em;
	line-height: 1.65;
}

/* --------------------------- 9. Accesibilidad: contraste AA
   Medido con Lighthouse + color real computado en el navegador:
   - `.fer-hero__pill strong`: naranja #E9A23B sobre blanco = 2.17 (mÃ­nimo 4.5).
   - `.fer-story__eyebrow`: #8EAA8C sobre verde #24461F = 4.20 (mÃ­nimo 4.5).
   - Texto muted del footer: #7A8074 sobre crema #F3ECDF = 3.46 (mÃ­nimo 4.5).
   Se mantiene la paleta: el naranja se oscurece, el verde claro se aclara y
   el muted del footer se cambia solo dentro del footer (por variable). */

.fer-hero__pill strong {
	color: #9a5200; /* 5.86 : 1 sobre blanco */
}

.fer-story__eyebrow {
	color: #a9c5a6; /* 5.70 : 1 sobre #24461F */
}

.bt-footer {
	--wp--preset--color--muted: #4e5748; /* 6.43 : 1 sobre #F3ECDF */
}

/* Los tÃ­tulos del footer usan `opacity: .55` (theme padre) y eso mezcla el
   verde con la crema: contraste real 3.38 (mÃ­nimo 4.5). Con .8 queda ~7. */
.bt-footer .bt-footer__head {
	opacity: 0.8;
}

/* ============================================================
   PÃ¡gina Nosotros â€” rediseÃ±o editorial
   Hero a sangre con la imagen de granos, intro en dos columnas,
   banda de datos, misiÃ³n/visiÃ³n, valores y categorÃ­as con fotos.
   ============================================================ */

.page-id-2 { overflow-x: clip; }
.page-id-2 main { padding-top: 0 !important; }
.page-id-2 h1.wp-block-post-title { display: none; }

/* El contenido de la pÃ¡gina vive en un contenedor de 720px. Estas secciones
   usan la retÃ­cula ancha del sitio (1240px): sin esto, `alignwide` no expande
   porque el padre lo recorta. El hero y el cierre igual rompen a 100vw. */
.page-id-2 .wp-block-post-content {
	max-width: var(--fer-container, 1240px);
}

/* --- Hero ------------------------------------------------- */
.fer-nos-hero.alignfull {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	min-height: min(74vh, 640px);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background: var(--fer-forest);
	padding: 0;
}

.fer-nos-hero__media {
	position: absolute;
	inset: 0;
	margin: 0;
}

.fer-nos-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fer-nos-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(18, 32, 16, 0.9) 0%, rgba(18, 32, 16, 0.55) 48%, rgba(18, 32, 16, 0.12) 100%);
}

.fer-nos-hero__panel {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--fer-container);
	margin: 0 auto;
	padding: clamp(40px, 6vw, 80px) var(--fer-gap) clamp(36px, 4.5vw, 64px);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

.fer-nos-hero__eyebrow {
	margin: 0;
	color: var(--fer-honey);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.fer-nos-hero__title {
	margin: 0;
	color: #fff;
	font-size: var(--fer-h1);
	line-height: 1.05;
	max-width: 22ch;
}

.fer-nos-hero__text {
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: var(--fer-body);
	max-width: 46ch;
}

.fer-nos-hero__actions {
	margin-top: 12px;
}

/* BotÃ³n del hero: el tema pinta el <a> de verde y el fondo honey quedaba en el
   contenedor, asÃ­ que se veÃ­a un pill verde dentro de otro naranja. AcÃ¡ el
   color va directo en el link y el contenedor queda transparente. */
.fer-nos-hero__actions .wp-block-button {
	background: none;
	padding: 0;
}

.fer-nos-hero__actions .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 30px;
	background: var(--fer-honey);
	color: var(--fer-ink);
	border: 0;
	border-radius: var(--fer-r-pill);
	font-family: var(--wp--preset--font-family--system);
	font-size: 15.5px;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-decoration: none;
	box-shadow: 0 10px 26px rgba(12, 22, 10, 0.28);
	transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.fer-nos-hero__actions .wp-block-button__link:hover {
	background: #f2b455;
	color: var(--fer-ink);
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(12, 22, 10, 0.34);
}

.fer-nos-hero__actions .wp-block-button__link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* --- Intro ------------------------------------------------ */
.fer-nos-intro {
	margin-top: var(--fer-section-y);
}

.fer-nos-intro__cols {
	gap: clamp(28px, 5vw, 72px);
	align-items: start;
}

.fer-nos-intro__lead p {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(22px, 2.3vw, 31px);
	line-height: 1.35;
	color: var(--fer-ink);
}

.fer-nos-intro__rest p {
	margin: 0;
	font-size: var(--fer-body);
	line-height: 1.72;
	color: var(--fer-muted);
}

.fer-nos-intro__rest p + p {
	margin-top: 1.1em;
}

/* --- Banda de datos --------------------------------------- */
.fer-nos-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--fer-line);
	border: 1px solid var(--fer-line);
	border-radius: var(--fer-r-md);
	overflow: hidden;
	margin-top: clamp(44px, 6vw, 78px);
}

.fer-nos-stats__item {
	background: var(--fer-paper);
	padding: clamp(22px, 2.6vw, 34px);
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.fer-nos-stats__num {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(26px, 3vw, 40px);
	line-height: 1.05;
	color: var(--fer-forest);
}

.fer-nos-stats__label {
	margin: 0;
	font-size: 12.5px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--fer-muted);
}

/* --- TÃ­tulos de secciÃ³n ----------------------------------- */
.fer-nos-section-title {
	margin: 0 0 0.4em;
	font-size: var(--fer-h2);
}

.fer-nos-section-sub {
	margin: 0 0 1.8em;
	color: var(--fer-muted);
	font-size: var(--fer-body);
}

/* --- MisiÃ³n / visiÃ³n -------------------------------------- */
.fer-nos-mv {
	margin-top: var(--fer-section-y);
}

.fer-nos-mv__card {
	height: 100%;
	background: var(--fer-cream-2);
	border: 1px solid var(--fer-line);
	border-radius: var(--fer-r-md);
	padding: clamp(24px, 3vw, 38px);
	margin: 0;
}

.fer-nos-card__kicker {
	margin: 0 0 0.55rem;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--fer-leaf);
}

.fer-nos-mv__card h3,
.fer-nos-valores__card h3 {
	margin: 0 0 0.5rem;
	font-size: clamp(20px, 1.9vw, 25px);
}

.fer-nos-mv__card p:last-child,
.fer-nos-valores__card p:last-child {
	margin: 0;
	color: var(--fer-muted);
	line-height: 1.65;
}

/* --- Valores ---------------------------------------------- */
.fer-nos-valores {
	margin-top: var(--fer-section-y);
}

.fer-nos-valores__card {
	height: 100%;
	background: var(--fer-paper);
	border: 1px solid var(--fer-line);
	border-radius: var(--fer-r-md);
	padding: clamp(24px, 3vw, 34px);
	margin: 0;
	box-shadow: var(--fer-sh-1);
}

/* --- CategorÃ­as ------------------------------------------- */
.fer-nos-cats {
	margin-top: var(--fer-section-y);
}

.fer-nos-cats__card {
	margin: 0;
	border: 1px solid var(--fer-line);
	border-radius: var(--fer-r-md);
	overflow: hidden;
	background: var(--fer-paper);
}

.fer-nos-cats__img {
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.fer-nos-cats__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.fer-nos-cats__card:hover .fer-nos-cats__img img {
	transform: scale(1.045);
}

.fer-nos-cats__card h3 {
	margin: 0;
	padding: 16px 20px 20px;
	font-size: 19px;
}

.fer-nos-cats__card h3 a {
	color: inherit;
	text-decoration: none;
}

.fer-nos-cats__card h3 a:hover {
	color: var(--fer-forest-2);
}

/* --- Cierre ----------------------------------------------- */
.fer-nos-cta.alignfull {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	min-height: 420px;
	margin-top: var(--fer-section-y);
	display: flex;
	align-items: center;
	overflow: hidden;
	padding: 0;
}

.fer-nos-cta__media {
	position: absolute;
	inset: 0;
	margin: 0;
}

.fer-nos-cta__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fer-nos-cta::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(18, 32, 16, 0.88) 0%, rgba(18, 32, 16, 0.42) 70%);
}

.fer-nos-cta__panel {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--fer-container);
	margin: 0 auto;
	padding: clamp(40px, 5vw, 72px) var(--fer-gap);
}

.fer-nos-cta__title {
	margin: 0 0 0.4em;
	color: #fff;
	font-size: var(--fer-h2);
}

.fer-nos-cta__text {
	margin: 0 0 1.1em;
	color: rgba(255, 255, 255, 0.86);
	font-size: var(--fer-body);
	max-width: 44ch;
}

.fer-nos-cta__phone {
	margin: 0;
}

.fer-nos-cta__phone a {
	color: var(--fer-honey);
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(22px, 2.4vw, 30px);
	text-decoration: none;
}

.fer-nos-cta__phone a:hover {
	color: #fff;
}

/* --- Ajustes mÃ³viles -------------------------------------- */
@media (max-width: 782px) {
	.fer-nos-hero {
		min-height: 560px;
	}

	.fer-nos-hero__title {
		font-size: clamp(30px, 8.4vw, 42px);
		max-width: none;
	}

	.fer-nos-stats {
		grid-template-columns: 1fr;
	}

	.fer-nos-mv__card,
	.fer-nos-valores__card {
		margin-bottom: 14px;
	}

	.fer-nos-cta {
		min-height: 360px;
	}
}
