/*
 * Monta tu Restaurante: design system aplicado a Themify Ultra + WooCommerce.
 * Fuente de verdad: tokens.json del design system. Si cambia un valor allí,
 * cámbialo aquí. Diseño plano: sin sombras ni degradados.
 */

@font-face {
	font-family: "Montserrat";
	src: url("../fonts/Montserrat-Variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Color (tema claro) */
	--surface: #ffffff;
	--surface-soft: #f5f3f0;
	--surface-raised: #ffffff;
	--surface-inverse: #333333;
	--ink: #333333;
	--ink-strong: #1f1f1f;
	--ink-muted: #5c5c5c;
	--on-inverse: #ffffff;
	--on-inverse-muted: #d0ccc6;
	--brand: #e87722;
	--brand-hover: #d2691c;
	--brand-strong: #a84a08;
	--brand-tint: #fdebdc;
	--on-brand: #1f1f1f;
	--carbon: #333333;
	--border: #ddd8d1;
	--border-strong: #8a857e;
	--focus-ring: #1f1f1f;
	--success: #1e6b45;
	--success-tint: #e3f3ea;
	--warning: #7a4b00;
	--warning-tint: #fff1cc;
	--danger: #a8231b;
	--danger-tint: #fbe4e2;

	/* Tipografía */
	--font-sans: "Montserrat", "Poppins", "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Espaciado */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--space-9: 96px;
	--layout-max: 1200px;
	--layout-read: 680px;

	/* Radios */
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 16px;
	--radius-pill: 9999px;
}

/*
 * Variables de Themify Ultra: su CSS se carga después de este archivo, así que
 * "html:root" (más específico que su ":root") las redefine con nuestros tokens.
 */
html:root {
	--theme_accent: #e87722;
	--theme_accent_hover: #d2691c;
	--theme_accent_semi: rgba(232, 119, 34, 0.8);
	--theme_accent_alt: #a84a08;
	--theme_heading_color: #1f1f1f;
	--theme_rounded: 16px;
	--theme_rounded_sm: 8px;
	--theme_input_rounded: 8px;
	--theme_input_border: #8a857e;
	--theme_input_bg: #ffffff;
	--theme_input_color: #333333;
	--theme_btn_rounded: 8px;
}

/*
 * Nota: los selectores de abajo llevan el prefijo "html" para ganar en
 * especificidad al CSS concatenado de Themify, que se carga después.
 */

/* ---------- Base ---------- */

html body {
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 26px;
	color: var(--ink);
	background: var(--surface);
}

html h1, html h2, html h3, html h4, html h5, html h6,
html .page-title, html .post-title, html .product_title {
	font-family: var(--font-sans);
	color: var(--ink-strong);
}
html h1, html .page-title, html .product_title { font-size: 36px; line-height: 42px; font-weight: 700; letter-spacing: -0.01em; }
html h2 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.01em; }
html h3 { font-size: 22px; line-height: 28px; font-weight: 700; }
html h4 { font-size: 18px; line-height: 24px; font-weight: 600; }

html a { color: var(--brand-strong); transition: color 150ms; }
html a:hover { color: var(--ink-strong); }

html :focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

/* ---------- Botones (WooCommerce + Themify) ---------- */

html .woocommerce a.button,
html .woocommerce button.button,
html .woocommerce input.button,
html .woocommerce #respond input#submit,
html .woocommerce .single_add_to_cart_button,
html .woocommerce .checkout-button,
html .woocommerce #place_order,
html .woocommerce-page a.button,
html .woocommerce-page button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: 48px;
	padding: 0 var(--space-5);
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	background: var(--brand);
	color: var(--on-brand);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 20px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	text-shadow: none;
	transition: background-color 150ms, color 150ms, border-color 150ms;
}

html .woocommerce a.button:hover,
html .woocommerce button.button:hover,
html .woocommerce input.button:hover,
html .woocommerce .single_add_to_cart_button:hover,
html .woocommerce .checkout-button:hover,
html .woocommerce #place_order:hover,
html .woocommerce-page a.button:hover,
html .woocommerce-page button.button:hover {
	background: var(--brand-hover);
	color: var(--on-brand);
}

/* Botones secundarios: contorno */
html .woocommerce .cart button[name="update_cart"],
html .woocommerce .coupon button.button,
html .woocommerce a.button.wc-backward,
html .woocommerce .added_to_cart {
	background: transparent;
	color: var(--ink-strong);
	border-color: var(--border-strong);
}
html .woocommerce .cart button[name="update_cart"]:hover,
html .woocommerce .coupon button.button:hover,
html .woocommerce a.button.wc-backward:hover {
	background: var(--surface-soft);
}

html .woocommerce .button:disabled,
html .woocommerce .button.disabled,
html .woocommerce ul.products li.product.outofstock a.button {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---------- Cuadrícula de productos: ProductCard ---------- */

html .woocommerce ul.products {
	display: grid !important; /* Themify "masonry" posiciona con JS; la cuadrícula manda */
	height: auto !important;
	grid-template-columns: 1fr;
	gap: var(--space-5);
	margin: 0;
	padding: 0;
}
/* Los "clearfix" de WooCommerce y Themify serían celdas vacías en la cuadrícula. */
html .woocommerce ul.products::before,
html .woocommerce ul.products::after { display: none !important; content: none !important; }

@media (min-width: 600px) {
	html .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	html .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
	html .woocommerce ul.products.columns-4,
	html .woocommerce ul.products.grid4 { grid-template-columns: repeat(4, 1fr); }
}

/* Themify "masonry" coloca cada tarjeta con position:absolute; en cuadrícula no hace falta */
html .woocommerce ul.products.masonry li.product {
	position: static !important;
	transform: none !important;
	left: auto !important;
	top: auto !important;
}

/* Themify Ultra: li.product > figure.post-image + div.product-content */
html .woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	/* Themify fija width:22.6% y márgenes para su diseño con floats. */
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	float: none !important;
	clear: none !important;
	background: var(--surface-raised);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: none;
	text-align: left;
}

html .woocommerce ul.products li.product .post-image {
	aspect-ratio: 4 / 3;
	width: 100%;
	margin: 0;
	overflow: hidden;
	background: #ffffff; /* las fotos van sobre lienzo blanco */
	border-bottom: 1px solid var(--border);
}

html .woocommerce ul.products li.product .post-image a,
html .woocommerce ul.products li.product a img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	/* contain: la foto entera, aunque WooCommerce aún sirva miniaturas cuadradas */
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
}

html .woocommerce ul.products li.product .product-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-2);
	padding: var(--space-4);
}

html .woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	line-height: 24px;
	font-weight: 600;
	color: var(--ink-strong);
}
html .woocommerce ul.products li.product .woocommerce-loop-product__title a { color: inherit; text-decoration: none; }
html .woocommerce ul.products li.product .woocommerce-loop-product__title a:hover { color: var(--brand-strong); }

html .woocommerce ul.products li.product .price {
	display: block;
	margin: 0;
	padding: 0;
	font-size: 22px;
	line-height: 28px;
	font-weight: 800;
	color: var(--ink-strong);
}

html .woocommerce ul.products li.product .mtr-badge { margin: 0; }

html .woocommerce ul.products li.product a.button {
	margin: auto 0 0;
	align-self: stretch;
}

html .woocommerce ul.products li.product.outofstock .price { color: var(--ink-muted); }

/* Sin descuentos tachados ni "Oferta" (regla del design system) */
html .woocommerce span.onsale { display: none; }

/* ---------- Ficha de producto ---------- */

html .woocommerce div.product p.price,
html .woocommerce div.product span.price {
	font-size: 28px;
	line-height: 32px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--ink-strong);
}

html .woocommerce div.product .mtr-badge { margin-bottom: var(--space-4); }

html .woocommerce div.product div.images img {
	border-radius: var(--radius-lg);
	background: var(--surface-soft);
}

html .woocommerce div.product .stock { display: none; } /* La insignia ya dice el estado */

/* ---------- Insignia de estado: Badge ---------- */

html .mtr-badge {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	padding: var(--space-1) var(--space-2);
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	font-family: var(--font-sans);
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	white-space: nowrap;
}
html .mtr-badge--disponible { background: var(--success-tint); color: var(--success); }
html .mtr-badge--reservado { background: var(--warning-tint); color: var(--warning); }
html .mtr-badge--vendido { background: var(--surface-soft); color: var(--ink-muted); border-color: var(--border); }
html .mtr-badge--agotado { background: var(--danger-tint); color: var(--danger); }
html .mtr-badge--lote { background: var(--brand-tint); color: var(--brand-strong); }
html .mtr-icon { flex: none; display: inline-block; vertical-align: middle; }

/* ---------- Formularios (checkout, cuenta) ---------- */

html .woocommerce form .form-row label {
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: var(--ink-strong);
}

html .woocommerce form .form-row .input-text,
html .woocommerce form .form-row select,
html .woocommerce form .form-row textarea,
html .woocommerce .quantity .qty,
html .select2-container--default .select2-selection--single {
	box-sizing: border-box;
	min-height: 48px;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--surface);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 16px;
	box-shadow: none;
}

html .woocommerce form .form-row.woocommerce-invalid .input-text,
html .woocommerce form .form-row.woocommerce-invalid select {
	border: 2px solid var(--danger);
}

/* ---------- Avisos ---------- */

html .woocommerce-message,
html .woocommerce-info,
html .woocommerce-error {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface-soft);
	color: var(--ink);
	box-shadow: none;
}
html .woocommerce-message { background: var(--success-tint); border-color: var(--success); }
html .woocommerce-info { background: var(--brand-tint); border-color: var(--brand-strong); }
html .woocommerce-error { background: var(--danger-tint); border-color: var(--danger); }
html .woocommerce-message::before { color: var(--success); }
html .woocommerce-info::before { color: var(--brand-strong); }
html .woocommerce-error::before { color: var(--danger); }

/* ---------- Carrito y checkout ---------- */

html .woocommerce table.shop_table {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	border-collapse: separate;
}
html .woocommerce table.shop_table th { background: var(--surface-soft); color: var(--ink-strong); }
html .woocommerce table.shop_table td,
html .woocommerce table.shop_table th { border-color: var(--border); }

html .woocommerce-checkout #payment {
	background: var(--surface-soft);
	border-radius: var(--radius-lg);
}

/* ---------- Banda de llamada a la acción: CtaBand ---------- */
/* Usar con la clase "mtr-cta" en una fila de Themify Builder. */

html .mtr-cta {
	padding: var(--space-8) var(--space-6);
	background: var(--surface-inverse);
	color: var(--on-inverse);
	border-radius: var(--radius-lg);
}
html .mtr-cta h1, html .mtr-cta h2, html .mtr-cta h3 { color: var(--on-inverse); }
html .mtr-cta p { color: var(--on-inverse-muted); }
html .mtr-cta :focus-visible { outline-color: var(--on-inverse); }

/* ---------- Pie ---------- */

html #footerwrap {
	background: var(--surface-inverse);
	color: var(--on-inverse-muted);
}
html #footerwrap a { color: var(--on-inverse); }
html #footerwrap h1, html #footerwrap h2, html #footerwrap h3, html #footerwrap h4 { color: var(--on-inverse); }

/* ---------- Movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
	html * { transition: none !important; }
}

/* Aviso del depósito (carrito, checkout, gracias). */
html .mtr-deposito {
	margin: 0 0 var(--space-6);
	padding: var(--space-4);
	background: var(--brand-tint);
	border: 1px solid var(--brand-strong);
	border-radius: var(--radius-md);
	color: var(--ink);
	font-size: 16px;
	line-height: 1.5;
}
html .mtr-deposito p { margin: 0; }
html .mtr-deposito p + p { margin-top: var(--space-2); }
html .mtr-deposito a { color: var(--brand-strong); font-weight: 600; }

/* ---------- Carrito lateral de Themify (#slide-cart) ---------- */

/* El panel mide 100% de alto más 50px de relleno: con border-box deja de
   salirse por abajo. Dentro, la lista hace scroll y el pie queda fijo. */
html #slide-cart { box-sizing: border-box; display: flex; flex-direction: column; }
html #slide-cart #shopdock-ultra { flex: 1 1 auto; min-height: 0; }
html #slide-cart #cart-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
}
html #slide-cart .cart-scroll-body {
	flex: 1 1 auto;
	min-height: 0;
	height: auto !important;
	max-height: none !important;
	overflow-y: auto;
}
html #slide-cart #cart-list .product { padding: var(--space-3) var(--space-4); }
html #slide-cart .product-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
/* Con stock de 1 no hay cantidad que elegir: Themify deja solo los botones −/+ vacíos. */
html #slide-cart .quantity:has(input[type="hidden"]) { display: none; }

html #slide-cart .cart-total-checkout-wrap {
	position: static !important;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	height: auto !important;
	padding: var(--space-4);
	background: var(--surface-soft);
	border-top: 1px solid var(--border);
}
html #slide-cart .cart-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--space-2);
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	color: var(--ink-strong);
}
html #slide-cart #view-cart { font-size: 14px; font-weight: 600; color: var(--brand-strong); }
html #slide-cart .checkout-button { margin: 0; }
html #slide-cart .checkout-button :is(a, button) {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0 var(--space-4);
	background: var(--brand);
	color: var(--on-brand);
	border: 0;
	border-radius: var(--radius-md);
	font-size: 16px;
	font-weight: 700;
}
html #slide-cart .checkout-button :is(a, button):hover { background: var(--brand-hover); }

/* ---------- Lote completo ([mtr_lote]) ---------- */

html .mtr-lote {
	margin: 0 0 var(--space-6);
	padding: var(--space-6);
	background: var(--surface-raised);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}
html .mtr-lote p { margin: 0; }
html .mtr-lote__meta { font-size: 14px; font-weight: 600; color: var(--ink-muted); }
html .mtr-lote__precio {
	margin-top: var(--space-2) !important;
	font-size: clamp(36px, 6vw, 56px);
	font-weight: 800;
	line-height: 1.1;
	color: var(--ink-strong);
}
html .mtr-lote__suelto { margin-top: var(--space-2) !important; font-size: 16px; color: var(--ink); }
html .mtr-lote__suelto s { color: var(--ink-muted); }
html .mtr-lote__nota { margin-top: var(--space-4) !important; font-size: 14px; color: var(--ink-muted); }
html .mtr-lote__titulo {
	margin-top: var(--space-2) !important;
	font-size: clamp(24px, 4vw, 32px);
	font-weight: 800;
	line-height: 1.2;
	color: var(--ink-strong);
}

/* ---------- Páginas del lote (paginas/*.html, clases mtr-lp-*) ---------- */

html .mtr-lp { color: var(--ink); }
html .mtr-lp > section + section,
html .mtr-lp > section + .mtr-lp-pie { margin-top: var(--space-9); }
html .mtr-lp p { margin: 0; }

html .mtr-lp-eyebrow {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--brand-strong);
}
html .mtr-lp .mtr-lp-h1 {
	margin: var(--space-3) 0 0;
	font-size: clamp(32px, 5vw, 48px);
	font-weight: 800;
	line-height: 1.1;
	color: var(--ink-strong);
}
html .mtr-lp .mtr-lp-h2 {
	margin: 0;
	font-size: clamp(24px, 3.5vw, 32px);
	font-weight: 800;
	line-height: 1.2;
	color: var(--ink-strong);
}
html .mtr-lp-lead { margin-top: var(--space-4) !important; font-size: 18px; line-height: 1.6; max-width: 60ch; }
html .mtr-lp-sub { margin-top: var(--space-2) !important; font-size: 16px; line-height: 1.6; color: var(--ink-muted); max-width: 60ch; }

/* Botones */
html .mtr-lp-acciones { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
html .mtr-lp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 var(--space-6);
	background: var(--brand);
	color: var(--on-brand);
	border: 1px solid var(--brand);
	border-radius: var(--radius-md);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}
html .mtr-lp-btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--on-brand); }
html .mtr-lp-btn--secundario { background: transparent; color: var(--ink-strong); border-color: var(--border-strong); }
html .mtr-lp-btn--secundario:hover { background: var(--surface-soft); border-color: var(--ink-strong); color: var(--ink-strong); }
html .mtr-lp-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Hero */
html .mtr-lp-hero { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 900px) {
	html .mtr-lp-hero { grid-template-columns: 1.1fr 1fr; }
}
html .mtr-lp-checks {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-5);
	margin: var(--space-5) 0 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 600;
}
html .mtr-lp-checks li::before { content: "✓"; margin-right: var(--space-2); color: var(--success); }
html .mtr-lp-hero__fotos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
html .mtr-lp img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }

/* Categorías */
html .mtr-lp-categorias { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
@media (min-width: 600px) { html .mtr-lp-categorias { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { html .mtr-lp-categorias { grid-template-columns: repeat(4, 1fr); } }
html .mtr-lp-cat {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	padding: var(--space-4);
	background: var(--surface-raised);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	color: var(--ink);
	text-decoration: none;
}
html .mtr-lp-cat strong { font-size: 16px; color: var(--ink-strong); }
html .mtr-lp-cat span { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
html .mtr-lp-cat:hover { border-color: var(--brand); }

/* Destacados */
html .mtr-lp-destacados { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); margin-top: var(--space-5); }
@media (min-width: 900px) { html .mtr-lp-destacados { grid-template-columns: repeat(3, 1fr); } }
html .mtr-lp-destacados figure { margin: 0; }
html .mtr-lp-destacados figcaption { margin-top: var(--space-2); font-size: 15px; font-weight: 600; color: var(--ink-strong); }

/* Beneficios */
html .mtr-lp-beneficios { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
@media (min-width: 900px) { html .mtr-lp-beneficios { grid-template-columns: repeat(3, 1fr); } }
html .mtr-lp-beneficios > div { padding: var(--space-5); background: var(--surface-soft); border-radius: var(--radius-lg); }
html .mtr-lp-beneficios strong { display: block; font-size: 18px; color: var(--ink-strong); }
html .mtr-lp-beneficios p { margin-top: var(--space-2); font-size: 15px; line-height: 1.6; }

/* Registro: texto + formulario */
html .mtr-lp-registro {
	display: grid;
	gap: var(--space-6);
	padding: var(--space-6);
	background: var(--brand-tint);
	border-radius: var(--radius-lg);
	scroll-margin-top: 100px;
}
@media (min-width: 900px) { html .mtr-lp-registro { grid-template-columns: 1fr 1fr; padding: var(--space-8); } }
html .mtr-lp-registro .mtr-lp-sub { color: var(--ink); }
html .mtr-lp-registro .mtr-lote { margin: var(--space-5) 0 0; }
html .mtr-lp-registro__form { min-height: 486px; padding: var(--space-4); background: var(--surface-raised); border-radius: var(--radius-lg); }

/* Pasos numerados */
html .mtr-lp-pasos { margin: var(--space-5) 0 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: var(--space-3); }
html .mtr-lp-pasos li { counter-increment: paso; display: flex; gap: var(--space-3); align-items: baseline; font-size: 16px; }
html .mtr-lp-pasos li::before {
	content: counter(paso);
	flex: 0 0 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--brand);
	color: var(--on-brand);
	border-radius: var(--radius-pill);
	font-size: 14px;
	font-weight: 800;
}
@media (min-width: 900px) { html .mtr-lp-pasos--grandes { grid-template-columns: repeat(3, 1fr); } }
html .mtr-lp-pasos--grandes li { flex-direction: column; gap: var(--space-2); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-lg); }
html .mtr-lp-pasos--grandes strong { font-size: 18px; color: var(--ink-strong); }
html .mtr-lp-pasos--grandes span { font-size: 15px; line-height: 1.6; color: var(--ink-muted); }

/* Gracias + precio */
html .mtr-lp-gracias .mtr-lote { margin-top: var(--space-6); border-color: var(--brand); border-width: 2px; }

/* Banda final */
html .mtr-lp-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-5);
	padding: var(--space-6);
	background: var(--surface-inverse);
	color: var(--on-inverse);
	border-radius: var(--radius-lg);
}
html .mtr-lp-cta .mtr-lp-h2 { color: var(--on-inverse); }
html .mtr-lp-cta p { margin-top: var(--space-2); color: var(--on-inverse-muted); }

html .mtr-lp-pie { font-size: 15px; color: var(--ink-muted); }
html .mtr-lp-pie a { color: var(--brand-strong); font-weight: 600; }

/* ---------- Encabezado: menú ---------- */

html #main-nav > li > a { font-weight: 600; }
/* Ítem del menú con la clase CSS "mtr-menu-cta" (Apariencia → Menús): botón. */
html #main-nav > li.mtr-menu-cta > a {
	padding: 10px var(--space-5);
	background: var(--brand);
	color: var(--on-brand);
	border-radius: var(--radius-md);
	font-weight: 700;
}
html #main-nav > li.mtr-menu-cta > a:hover,
html #main-nav > li.mtr-menu-cta.current-menu-item > a { background: var(--brand-hover); color: var(--on-brand); }

/* ---------- Pie ---------- */

html #footer .footer-text { font-size: 14px; line-height: 1.7; color: var(--on-inverse-muted); }
html #footer .footer-text a { color: var(--on-inverse); text-decoration: underline; text-underline-offset: 3px; }
html #footer .footer-text a:hover { color: var(--brand); }
html #footer .footer-nav a { color: var(--on-inverse); font-weight: 600; }
html #footer .footer-nav a:hover { color: var(--brand); }
/* Botón "volver arriba": flecha oscura sobre naranja (nunca blanco sobre naranja). */
html #pagewrap .back-top-float { background-color: var(--brand); color: var(--on-brand); box-shadow: none; }
html #pagewrap .back-top-float:hover { background-color: var(--brand-hover); }

/* ---------- Logos (archivos recortados de 640 px, se muestran a ~2x) ---------- */

html #site-logo img { width: auto !important; height: 44px !important; max-width: none; }
@media (min-width: 900px) {
	html #site-logo img { height: 56px !important; }
}
html #footer-logo img { width: auto !important; height: 48px !important; max-width: none; }

/* Formulario de GHL: alto mínimo propio mientras form_embed.js calcula el real. */
html .mtr-lp-registro__form { min-height: 0; }
html .mtr-lp-registro__form iframe { display: block; width: 100%; min-height: 486px; }

/* ---------- Páginas legales (paginas/politica-*.html, terminos-*.html) ---------- */

html .mtr-legal { max-width: 72ch; color: var(--ink); font-size: 16px; line-height: 1.7; }
html .mtr-legal__fecha { margin-top: var(--space-2); font-size: 14px; color: var(--ink-muted); }
html .mtr-legal .mtr-lp-h1 + .mtr-legal__fecha + p { margin-top: var(--space-6); }
html .mtr-legal h2 {
	margin: var(--space-7) 0 var(--space-3);
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--ink-strong);
}
html .mtr-legal p { margin: 0 0 var(--space-3); }
html .mtr-legal ul,
html .mtr-legal ol { margin: 0 0 var(--space-3); padding-left: 1.4em; }
html .mtr-legal li + li { margin-top: var(--space-2); }
html .mtr-legal a { color: var(--brand-strong); font-weight: 600; }

/* ---------- Portada / landing (paginas/inicio.html) ---------- */

/* La portada ocupa todo el ancho aunque Themify la meta en un contenedor. */
html body:has(.mtr-home) { overflow-x: clip; }
html body:has(.mtr-home) #layout,
html body:has(.mtr-home) #content { padding-top: 0 !important; padding-bottom: 0 !important; }
html body:has(.mtr-home) .page-title { display: none; }
html .mtr-home { --home-dark: #1c1b1a; --home-dark-2: #2a2826; position: relative; width: 100vw; margin-left: calc(50% - 50vw); font-family: var(--font-sans); color: var(--ink); overflow-x: clip; }
html .mtr-home *, html .mtr-home *::before, html .mtr-home *::after { box-sizing: border-box; }
html .mtr-home p { margin: 0; }
html .mtr-home a { text-decoration: none; }
html .mtr-home img { display: block; max-width: 100%; height: auto; }
html .mtr-home__wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Botones */
html .mtr-home .h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: var(--radius-md); font-size: 16px; font-weight: 800; line-height: 1.2; letter-spacing: .01em; text-align: center; transition: transform .15s ease, background-color .15s ease; }
html .mtr-home .h-btn:hover { transform: translateY(-2px); }
html .mtr-home .h-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
html .mtr-home .h-btn--brand { background: var(--brand); color: var(--on-brand); }
html .mtr-home .h-btn--brand:hover { background: var(--brand-hover); color: var(--on-brand); }
html .mtr-home .h-btn--dark { background: var(--ink-strong); color: #fff; }
html .mtr-home .h-btn--dark:hover { background: #000; color: #fff; }
html .mtr-home .h-btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
html .mtr-home .h-btn--ghost:hover { border-color: #fff; color: #fff; }
html .mtr-home .h-btn svg { width: 18px; height: 18px; flex: none; }

/* Hero oscuro */
html .mtr-home__hero { position: relative; background: var(--home-dark); color: var(--on-inverse); padding: 72px 0 0; isolation: isolate; }
html .mtr-home__hero::before { content: ""; position: absolute; inset: -20% auto auto -10%; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; z-index: -1; background: radial-gradient(circle, rgba(232,119,34,.28) 0%, rgba(232,119,34,0) 62%); }
html .mtr-home__hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%); mask-image: linear-gradient(180deg, #000 30%, transparent 95%); }
html .mtr-home__eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--on-inverse-muted); }
html .mtr-home__pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; animation: h-pulse 2s infinite; }
@keyframes h-pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.55); } 70% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
html .mtr-home h1.mtr-home__title { margin: 22px 0 0; padding: 0; max-width: 16ch; font-family: var(--font-sans); font-size: clamp(38px, 6.6vw, 76px); font-weight: 900; line-height: 1.02; letter-spacing: -.025em; color: #fff; }
html .mtr-home__title em { font-style: normal; color: var(--brand); }
html .mtr-home p.mtr-home__lead { margin-top: 22px; max-width: 56ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--on-inverse-muted); }

/* Las dos rutas (el objetivo de la página) */
html .mtr-home__rutas { display: grid; gap: 20px; margin-top: 44px; }
@media (min-width: 860px) { html .mtr-home__rutas { grid-template-columns: 1fr 1fr; } }
html .mtr-home .h-ruta { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 30px; border-radius: 20px; transition: transform .2s ease; }
html .mtr-home .h-ruta:hover { transform: translateY(-4px); }
html .mtr-home .h-ruta--suelto, html .mtr-home .h-ruta--suelto:hover { background: var(--home-dark-2); border: 1px solid rgba(255,255,255,.12); color: #fff; }
html .mtr-home .h-ruta--lote, html .mtr-home .h-ruta--lote:hover { background: var(--brand); color: var(--on-brand); }
html .mtr-home .h-ruta__tag { align-self: flex-start; padding: 6px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
html .mtr-home .h-ruta--suelto .h-ruta__tag { background: rgba(255,255,255,.1); color: var(--on-inverse-muted); }
html .mtr-home .h-ruta--lote .h-ruta__tag { background: var(--ink-strong); color: #fff; }
html .mtr-home .h-ruta__badge { position: absolute; top: -14px; right: 24px; padding: 7px 14px; border-radius: var(--radius-pill); background: #fff; color: var(--ink-strong); font-size: 13px; font-weight: 800; border: 2px solid var(--ink-strong); transform: rotate(3deg); }
html .mtr-home .h-ruta h2 { margin: 0; padding: 0; font-family: var(--font-sans); font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; line-height: 1.12; letter-spacing: -.015em; color: inherit; }
html .mtr-home .h-ruta ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 16px; line-height: 1.45; font-weight: 500; }
html .mtr-home .h-ruta li { display: flex; gap: 10px; margin: 0; padding: 0; }
html .mtr-home .h-ruta li::before { content: none; }
html .mtr-home .h-ruta li svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
html .mtr-home .h-ruta--suelto li svg { color: var(--brand); }
html .mtr-home .h-ruta .h-btn { margin-top: auto; align-self: stretch; }

/* Cifras */
html .mtr-home__cifras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 56px; background: rgba(255,255,255,.1); border-radius: 16px; overflow: hidden; }
@media (min-width: 860px) { html .mtr-home__cifras { grid-template-columns: repeat(4, 1fr); } }
html .mtr-home__cifras div { padding: 22px 20px; background: var(--home-dark); }
html .mtr-home__cifras strong { display: block; font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; line-height: 1.2; color: #fff; letter-spacing: -.02em; }
html .mtr-home__cifras span { font-size: 14px; color: var(--on-inverse-muted); }

/* Cinta de fotos en movimiento */
html .mtr-home__cinta { margin-top: 56px; padding: 22px 0 64px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
html .mtr-home__cinta-pista { display: flex; gap: 14px; width: max-content; animation: h-cinta 60s linear infinite; }
html .mtr-home__cinta:hover .mtr-home__cinta-pista { animation-play-state: paused; }
html .mtr-home__cinta img { width: 200px; max-width: none; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 12px; }
html .mtr-home__cinta img:nth-child(odd) { transform: rotate(-1.5deg); }
html .mtr-home__cinta img:nth-child(even) { transform: rotate(1.5deg) translateY(10px); }
@keyframes h-cinta { to { transform: translateX(-50%); } }

/* Secciones claras */
html .mtr-home__seccion { padding: 88px 0; background: var(--surface); }
html .mtr-home__seccion--suave { background: var(--surface-soft); }
html .mtr-home p.mtr-home__kicker { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-strong); }
html .mtr-home h2.mtr-home__h2 { margin: 10px 0 0; padding: 0; max-width: 22ch; font-family: var(--font-sans); font-size: clamp(30px, 4vw, 46px); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; color: var(--ink-strong); }
html .mtr-home p.mtr-home__sub { margin-top: 14px; max-width: 58ch; font-size: 17px; line-height: 1.6; color: var(--ink-muted); }

/* Categorías con foto */
html .mtr-home__cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 40px; }
@media (min-width: 860px) { html .mtr-home__cats { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
html .mtr-home .h-cat { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: var(--ink-strong); transition: border-color .15s ease, transform .15s ease; }
html .mtr-home .h-cat:hover { border-color: var(--brand); color: var(--ink-strong); transform: translateY(-3px); }
html .mtr-home .h-cat img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-bottom: 1px solid var(--border); }
html .mtr-home .h-cat span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; font-size: 15px; font-weight: 700; line-height: 1.3; }
html .mtr-home .h-cat span::after { content: "→"; color: var(--brand-strong); font-weight: 800; }

/* Equipos estrella: el shortcode [products] usa las tarjetas de la tienda */
html .mtr-home .woocommerce { margin-top: 40px; }
/* El shortcode no envuelve la foto en .post-image como la tienda: se le da el mismo marco. */
html .mtr-home .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link:first-child { display: flex; align-items: center; justify-content: center; height: auto; margin: 0; background: #fff; border-bottom: 1px solid var(--border); overflow: hidden; }
/* Sin alturas en %: Safari estiraba la tarjeta. Las miniaturas ya vienen recortadas a 4:3. */
html .mtr-home .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link:first-child img { width: 100%; height: auto !important; aspect-ratio: 4 / 3; object-fit: contain; background: #fff !important; /* tapa las franjas de color del lazy load de Themify */ }
html .mtr-home .woocommerce ul.products li.product a.button { display: flex; align-items: center; justify-content: center; text-align: center; }
/* Enlaces vacíos que deja el HTML anidado del shortcode */
html .mtr-home .woocommerce ul.products li.product .product-content > a.woocommerce-LoopProduct-link { display: none; }
html .mtr-home .woocommerce ul.products li.product .woocommerce-loop-product__title a { margin: 0; }
/* Móvil: tarjeta horizontal (foto a la izquierda), sin huecos blancos */
@media (max-width: 599px) {
	html .mtr-home .woocommerce ul.products { gap: var(--space-3); }
	html .mtr-home .woocommerce ul.products li.product { display: grid; grid-template-columns: 116px 1fr; }
	html .mtr-home .woocommerce ul.products li.product { align-items: stretch; }
	html .mtr-home .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link:first-child { padding: 8px; border-bottom: 0; border-right: 1px solid var(--border); }
	html .mtr-home .woocommerce ul.products li.product > a.woocommerce-LoopProduct-link:first-child img { width: 100px; max-width: 100%; }
	html .mtr-home .woocommerce ul.products li.product .product-content { gap: 6px; padding: var(--space-3); }
	html .mtr-home .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 15px; line-height: 20px; }
	html .mtr-home .woocommerce ul.products li.product .price { font-size: 19px; line-height: 24px; }
	html .mtr-home .woocommerce ul.products li.product .mtr-badge { font-size: 12px; }
	html .mtr-home .woocommerce ul.products li.product a.button { min-height: 40px; margin-top: 4px; padding-top: 0; padding-bottom: 0; font-size: 14px; }
}
html .mtr-home__mas { margin-top: 28px; text-align: center; }

/* Cómo funciona */
html .mtr-home__como { display: grid; gap: 22px; margin-top: 40px; }
@media (min-width: 860px) { html .mtr-home__como { grid-template-columns: 1fr 1fr; } }
html .mtr-home .h-pasos { padding: 30px; background: #fff; border: 1px solid var(--border); border-radius: 20px; }
html .mtr-home .h-pasos--lote { border: 2px solid var(--brand); }
html .mtr-home .h-pasos h3 { margin: 0 0 20px; padding: 0; font-family: var(--font-sans); font-size: 22px; font-weight: 900; line-height: 1.25; color: var(--ink-strong); }
html .mtr-home .h-pasos ol { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 16px; }
html .mtr-home .h-pasos li { counter-increment: p; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; margin: 0; padding: 0; font-size: 16px; line-height: 1.5; }
html .mtr-home .h-pasos li::before { content: counter(p); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-strong); font-weight: 900; }
html .mtr-home .h-pasos--lote li::before { background: var(--brand); color: var(--on-brand); }
html .mtr-home .h-pasos li b { display: block; color: var(--ink-strong); }

/* Preguntas */
html .mtr-home__faq { display: grid; gap: 12px; margin-top: 36px; max-width: 820px; }
html .mtr-home__faq details { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
html .mtr-home__faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 700; color: var(--ink-strong); }
html .mtr-home__faq summary::-webkit-details-marker { display: none; }
html .mtr-home__faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-soft); font-size: 20px; font-weight: 600; transition: transform .2s ease; }
html .mtr-home__faq details[open] summary::after { transform: rotate(45deg); background: var(--brand); color: var(--on-brand); }
html .mtr-home__faq details p { padding: 0 22px 20px; font-size: 16px; line-height: 1.6; color: var(--ink); }

/* Cierre oscuro */
html .mtr-home__cierre { position: relative; padding: 96px 0; background: var(--home-dark); color: #fff; text-align: center; isolation: isolate; overflow: hidden; }
html .mtr-home__cierre::before { content: ""; position: absolute; left: 50%; bottom: -60%; width: 900px; height: 900px; transform: translateX(-50%); z-index: -1; background: radial-gradient(circle, rgba(232,119,34,.32) 0%, rgba(232,119,34,0) 60%); }
html .mtr-home__cierre h2.mtr-home__h2 { margin-left: auto; margin-right: auto; color: #fff; }
html .mtr-home__cierre p.mtr-home__sub { margin-left: auto; margin-right: auto; color: var(--on-inverse-muted); }
html .mtr-home__cierre-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }

/* Barra fija en móvil: ocupa el lugar del botón ↑ de Themify y deja aire al pie */
html .mtr-home__barra { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; background: rgba(28,27,26,.94); border-radius: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html .mtr-home__barra .h-btn { min-height: 46px; padding: 0 12px; font-size: 15px; }
@media (max-width: 859px) {
	html body:has(.mtr-home) #pagewrap .back-top-float { display: none !important; }
	html body:has(.mtr-home) #footerwrap { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (min-width: 860px) { html .mtr-home__barra { display: none; } }

@media (prefers-reduced-motion: reduce) {
	html .mtr-home *, html .mtr-home *::before, html .mtr-home *::after { animation: none !important; transition: none !important; }
	html .mtr-home__cinta { overflow-x: auto; }
}
