/**
 * Rockbros — HOME V2 (PREVIEW, ?rb_home_v2=1)
 * ============================================================================
 * SOLO las piezas nuevas de la vista v2 (.rb2-*): franja de confianza, banda
 * de bicicletas en cuotas, casilla nueva del mosaico y grid de comunidad.
 * Todo lo demás (hero, mosaico, grids, promo, reseñas) lo pintan home.css +
 * home-redesign.css, que cargan antes.
 *
 * Sistema del rediseño 2026 (D1–D4): monocromo negro/blanco, Barlow, esquinas
 * RECTAS salvo botones = píldora. El rojo (--rb-sale) queda reservado a precios
 * de oferta y badges — aquí solo lo usa el badge "Nuevo" del mosaico.
 * ============================================================================ */

/* ── Chip de vista previa ──────────────────────────────────────────────── */
.rb2-preview {
	position: fixed;
	left: 14px;
	bottom: 14px;
	z-index: 9999;
	background: var(--rb-black, #1A1A1A);
	color: var(--rb-white, #fff);
	font: 600 12px/1 var(--rb-font, "Barlow", sans-serif);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 8px 14px;
	border-radius: 999px;
	opacity: 0.92;
	pointer-events: none;
}

/* ── 1 · Hero: imagen única gravel (pedido 9-ago) ──────────────────────── */
/* La imagen ya viene RECORTADA con el ciclista en el centro exacto
   (hero-gravel-centered.webp, 1500×1000): con object-position 50% el sujeto
   queda centrado en CUALQUIER formato — no hay porcentajes por breakpoint
   que mantener. La cadena figure→a→img se estira al alto de la columna. */
.rb-home2 .rb2-hero-media .wp-block-image,
.rb-home2 .rb2-hero-media figure,
.rb-home2 .rb2-hero-media a {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.rb-home2 .rb2-hero-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% center;
}

/* Hero más grande (pedido 9-ago): pisa el clamp de home-redesign.css
   (mismo peso de selector, este archivo carga después). */
.rb-home2.rb-home .rb-hero2 {
	min-height: clamp(540px, 76vh, 820px);
}

@media (max-width: 1100px) {
	.rb-home2.rb-home .rb-hero2 {
		min-height: clamp(480px, 64vh, 640px);
	}
}

@media (max-width: 781px) {
	.rb-home2.rb-home .rb-hero2__media {
		height: 54vh;
		min-height: 340px;
	}
}

/* ── 8 · Banda promo toda clickeable ───────────────────────────────────── */
.rb-home2 a.rb2-promo-link {
	display: block;
	cursor: pointer;
}

.rb-home2 a.rb2-promo-link,
.rb-home2 a.rb2-promo-link:hover,
.rb-home2 a.rb2-promo-link:focus,
.rb-home2 a.rb2-promo-link * {
	text-decoration: none !important;
}

.rb-home2 a.rb2-promo-link .rb-promo__inner {
	display: block;
}

/* ── 1b · Barra de búsqueda en el header (preview) ─────────────────────── */
/* Segunda instancia del buscador propio como barra permanente: se anula el
   toggle, el campo queda abierto y estilizado como píldora. La lupa de los
   iconos desaparece (rb2-with-search) porque sería redundante. */
.rb2-with-search .rb-search--header {
	display: none;
}

.rb2-searchrow {
	background: var(--rb-white, #fff);
	border-bottom: 1px solid var(--rb-border, #e6e6e6);
	padding: 0 24px 10px;
	display: flex;
	justify-content: center;
}

.rb2-searchrow .rb-search--bar {
	width: min(650px, 100%);
}

.rb2-searchrow .rb-search--bar .rb-search-toggle,
.rb2-searchrow .rb-search--bar .rb-search-close {
	display: none;
}

.rb2-searchrow .rb-search--bar .rb-search-field {
	display: block;
	position: relative;
	width: 100%;
	min-width: 0;
}

.rb2-searchrow .rb-search--bar .rb-search-bar {
	display: flex;
	align-items: center;
	background: var(--rb-white, #fff);
	border: 1.5px solid #d0cec9;
	border-radius: 999px;
	padding: 6px 16px 6px 38px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 15px 15px;
	background-position: 15px center;
}

.rb2-searchrow .rb-search--bar .rb-search-bar:focus-within {
	border-color: var(--rb-black, #1A1A1A);
}

.rb2-searchrow .rb-search--bar .rb-search-input {
	border: 0;
	outline: none;
	background: transparent;
	width: 100%;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--rb-black, #1A1A1A);
}

.rb2-searchrow .rb-search--bar .rb-search-input::placeholder {
	color: var(--rb-text-faint, #8a8a8a);
}

@media (max-width: 781px) {
	.rb2-searchrow {
		padding: 0 12px 10px;
	}

	.rb2-searchrow .rb-search--bar .rb-search-bar {
		padding: 6px 14px 6px 36px;
		background-position: 14px center;
	}

	.rb2-searchrow .rb-search--bar .rb-search-input {
		font-size: 16px; /* <16px dispara zoom automático en iOS al enfocar */
	}
}

/* ── 2 · Franja de confianza ───────────────────────────────────────────── */
/* Texto en negro pleno y cuerpo 15px: la primera versión en gris #6b6b6b
   casi no se leía (feedback del dueño). La estrella va en amarillo de marca. */
.rb-home2 .rb2-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 36px;
	padding: 16px 20px;
	background: var(--rb-white, #fff);
	border-top: 1px solid var(--rb-border, #e6e6e6);
	border-bottom: 1px solid var(--rb-border, #e6e6e6);
	font-size: 15px;
	font-weight: 500;
	color: var(--rb-black, #1A1A1A);
}

.rb-home2 .rb2-trust strong {
	color: var(--rb-black, #1A1A1A);
	font-weight: 700;
}

.rb-home2 .rb2-trust .rb2-star {
	color: var(--rb-yellow, #F0C417);
}

/* ── 3 · Banda Bicicletas + cuotas ─────────────────────────────────────── */
.rb-home2 .rb2-bikes {
	background: var(--rb-black, #1A1A1A);
	color: var(--rb-white, #fff);
	padding: 56px 24px;
	margin: 0 0 8px;
}

.rb-home2 .rb2-bikes__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(280px, 420px) 1fr;
	gap: 40px;
	align-items: center;
}

.rb-home2 .rb2-bikes__eyebrow {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #bdbdbd;
	margin-bottom: 10px;
}

.rb-home2 .rb2-bikes h2 {
	color: var(--rb-white, #fff);
	font-size: clamp(26px, 3.2vw, 38px);
	line-height: 1.18;
	font-weight: 700;
	margin: 0 0 14px;
	text-wrap: balance;
}

/* "6 cuotas sin intereses" resaltado en amarillo de marca (feedback: la banda
   monocroma no destacaba la promesa). Marcador amarillo, texto negro. */
.rb-home2 .rb2-hl {
	background: var(--rb-yellow, #F0C417);
	color: var(--rb-black, #1A1A1A);
	padding: 1px 10px 3px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.rb-home2 .rb2-bikes__sub {
	color: #bdbdbd;
	font-size: 13.5px;
	line-height: 1.55;
	margin: 0 0 22px;
	max-width: 46ch;
}

/* CTA píldora. La variante amarilla es la protagonista de la banda de bicis
   (mismo acento que .rb-btn--yellow de la banda promo). */
.rb-home2 .rb2-btn {
	display: inline-block;
	background: var(--rb-white, #fff);
	color: var(--rb-black, #1A1A1A);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.02em;
	padding: 13px 32px;
	border-radius: 999px;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.rb-home2 .rb2-btn:hover {
	color: var(--rb-black, #1A1A1A);
	opacity: 0.85;
}

.rb-home2 .rb2-btn--yellow {
	background: var(--rb-yellow, #F0C417);
	font-size: 16px;
	padding: 14px 38px;
}

.rb-home2 .rb2-bikes__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.rb-home2 .rb2-bike {
	display: flex;
	flex-direction: column;
	background: var(--rb-white, #fff);
	color: var(--rb-black, #1A1A1A);
	padding: 14px;
	text-decoration: none;
}

.rb-home2 .rb2-bike__img {
	width: 100%;
	height: 150px;
	object-fit: contain;
	margin-bottom: 10px;
}

.rb-home2 .rb2-bike__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rb-black, #1A1A1A);
	min-height: 34px;
	text-decoration: none;
}

.rb-home2 a.rb2-bike,
.rb-home2 a.rb2-bike:hover {
	text-decoration: none;
}

/* La cifra de la cuota en rojo de marca: es un dato de precio, el único rol
   que el sistema monocromo le reserva al rojo (feedback: destacar la cuota). */
.rb-home2 .rb2-bike__cuota {
	font-size: 19px;
	font-weight: 800;
	margin-top: 6px;
	color: var(--rb-sale, #DC3545);
}

/* wc_price() mete spans con estilos de precio del tema (rojo de oferta);
   dentro de la tarjeta el monto hereda el negro del card. */
.rb-home2 .rb2-bike__cuota .woocommerce-Price-amount,
.rb-home2 .rb2-bike__cuota bdi,
.rb-home2 .rb2-bike__price .woocommerce-Price-amount,
.rb-home2 .rb2-bike__price bdi {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.rb-home2 .rb2-bike__price {
	font-size: 12.5px;
	color: var(--rb-text-faint, #8a8a8a);
	margin-top: 2px;
}

/* ── 4 · Mosaico deslizable de 2 filas ─────────────────────────────────── */
/* Pisa el grid 4×2 de home.css (que también redefine columnas en 991/767px,
   por eso el !important): flujo por columnas, 2 filas fijas, scroll-x con
   snap. Tarjetas más chicas para que entren más categorías por pantalla. */
.rb-home2 .rb2-cats-slider {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(2, 1fr);
	grid-template-columns: none !important;
	grid-auto-columns: clamp(140px, 15vw, 190px);
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding-bottom: 12px;
	scrollbar-width: thin;
}

.rb-home2 .rb2-cats-slider .rb-cat-card {
	scroll-snap-align: start;
}

.rb-home2 .rb2-cats-slider .rb-cat-card__label {
	font-size: 15px;
	bottom: 12px;
}

@media (max-width: 767px) {
	.rb-home2 .rb2-cats-slider {
		grid-auto-columns: 42vw;
		gap: 10px;
	}
}

/* ── 4b · Banner WhatsApp (estilo LEGO: llamativo, un solo mensaje) ────── */
/* Verde oficial WhatsApp #25D366 — canal que trae ~35% de las ventas.
   Todo el banner es un solo <a> al chat. */
.rb-home2 .rb2-wsp {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 14px 22px;
	padding: 18px 24px;
	background: #25D366;
	color: var(--rb-white, #fff);
	text-decoration: none;
	transition: background 0.15s ease;
}

.rb-home2 .rb2-wsp:hover {
	background: #1eb356;
	color: var(--rb-white, #fff);
}

/* El tema subraya los <a> y sus descendientes; aquí nada va subrayado. */
.rb-home2 a.rb2-wsp,
.rb-home2 a.rb2-wsp:hover,
.rb-home2 a.rb2-wsp:focus,
.rb-home2 a.rb2-wsp * {
	text-decoration: none !important;
}

.rb-home2 .rb2-wsp__logo {
	width: 52px;
	height: 52px;
	display: block;
}

.rb-home2 .rb2-wsp__txt {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.rb-home2 .rb2-wsp__txt strong {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--rb-white, #fff);
}

.rb-home2 .rb2-wsp__txt > span {
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.92);
}

.rb-home2 .rb2-wsp__cta {
	background: var(--rb-white, #fff);
	color: #1a9247;
	font-weight: 700;
	font-size: 14px;
	padding: 11px 26px;
	border-radius: 999px;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.rb-home2 .rb2-wsp {
		gap: 10px 14px;
		padding: 16px;
		text-align: left;
	}

	.rb-home2 .rb2-wsp__logo {
		width: 42px;
		height: 42px;
	}

	.rb-home2 .rb2-wsp__txt strong {
		font-size: 16px;
	}
}

/* ── 5b · Franja de ofertas (entre "Lo más vendido" y Kits) ────────────── */
/* Negro con acentos amarillos, hermana visual de la banda de bicis: repite
   las 3 ofertas comerciales a mitad del scroll. */
.rb-home2 .rb2-offers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 48px;
	padding: 18px 24px;
	background: var(--rb-black, #1A1A1A);
	color: var(--rb-white, #fff);
	font-size: 15px;
	font-weight: 500;
}

.rb-home2 .rb2-offers strong {
	color: var(--rb-yellow, #F0C417);
	font-weight: 700;
}

@media (max-width: 600px) {
	.rb-home2 .rb2-offers {
		gap: 8px 24px;
		font-size: 13.5px;
		padding: 14px 16px;
	}
}

/* ── Casilla nueva del mosaico ─────────────────────────────────────────── */
.rb-home2 .rb2-cat-nueva {
	position: relative;
}

.rb-home2 .rb2-cat-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: var(--rb-sale, #DC3545);
	color: var(--rb-white, #fff);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 3px 9px;
}

/* ── 8b · Nuestras tiendas ─────────────────────────────────────────────── */
/* Tarjetas tipográficas del sistema: blanco, borde fino, esquinas rectas,
   pin como marca de agua tipográfica. El botón "Cómo llegar" es la píldora
   negra estándar del rediseño. */
.rb-home2 .rb2-stores {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	max-width: 900px;
	margin: 0 auto;
}

.rb-home2 .rb2-store {
	background: var(--rb-white, #fff);
	border: 1px solid var(--rb-border, #e6e6e6);
	padding: 26px 28px 24px;
	position: relative;
}

.rb-home2 .rb2-store::before {
	content: "";
	position: absolute;
	top: 22px;
	right: 24px;
	width: 22px;
	height: 22px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}

.rb-home2 .rb2-store__eyebrow {
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--rb-text-muted, #6b6b6b);
	margin-bottom: 8px;
}

.rb-home2 .rb2-store__addr {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.005em;
	color: var(--rb-black, #1A1A1A);
	margin: 0 0 12px;
}

.rb-home2 .rb2-store__meta {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	font-size: 14px;
	color: var(--rb-text-muted, #6b6b6b);
	line-height: 1.7;
}

.rb-home2 .rb2-store__chip {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rb-black, #1A1A1A);
	background: var(--rb-yellow, #F0C417);
	padding: 3px 10px;
	margin-top: 4px;
}

.rb-home2 .rb2-store__actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.rb-home2 a.rb2-store__btn {
	display: inline-block;
	background: var(--rb-black, #1A1A1A);
	color: var(--rb-white, #fff);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 10px 24px;
	border-radius: 999px;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.rb-home2 a.rb2-store__btn:hover {
	color: var(--rb-white, #fff);
	opacity: 0.85;
}

.rb-home2 a.rb2-store__link {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--rb-black, #1A1A1A);
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 700px) {
	.rb-home2 .rb2-stores {
		grid-template-columns: 1fr;
	}
}

/* ── 9 · Comunidad (placeholders hasta tener fotos reales) ─────────────── */
.rb-home2 .rb2-ugc {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.rb-home2 .rb2-ugc__ph {
	aspect-ratio: 4 / 3;
	background: repeating-linear-gradient(45deg, #f0f0f0 0 14px, #e7e7e7 14px 28px);
	display: flex;
	align-items: flex-end;
	padding: 10px 12px;
}

.rb-home2 .rb2-ugc__ph span {
	font-size: 12px;
	color: var(--rb-text-faint, #8a8a8a);
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
	.rb-home2 .rb2-bikes__inner {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.rb-home2 .rb2-bikes__cards {
		grid-template-columns: repeat(3, minmax(150px, 1fr));
		overflow-x: auto;
	}
}

@media (max-width: 600px) {
	.rb-home2 .rb2-trust {
		gap: 8px 18px;
		font-size: 12.5px;
	}

	.rb-home2 .rb2-bikes {
		padding: 40px 16px;
	}

	.rb-home2 .rb2-bikes__cards {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.rb-home2 .rb2-bike {
		flex: 0 0 66%;
		scroll-snap-align: start;
	}

	.rb-home2 .rb2-ugc {
		grid-template-columns: repeat(2, 1fr);
	}
}
