/* Plantilla única de catálogo por marca. El color de cada marca va en --rc-marca. */

/* Banner bajo: los productos se ven sin tener que bajar */
section[class^="category-banner-"] { min-height: 260px !important; padding: 36px 0; }
section[class^="category-banner-"] h1 { margin-bottom: 10px !important; }
section[class^="category-banner-"] p { margin-bottom: 0 !important; }

.rc-catalogo { --rc-marca: #1a3d5d; background: #fff; padding: 28px 0 56px; scroll-margin-top: 80px; }
.rc-wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* Ruta y salto a las categorías generales */
.rc-ruta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 18px; font-size: .92rem; color: #5b6675; }
.rc-ruta a { color: #1a3d5d; font-weight: 600; text-decoration: none; }
.rc-ir { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-ir a { padding: 4px 12px; border: 1px solid #d6dce5; border-radius: 999px; font-size: .84rem; }
.rc-ir a:hover { border-color: var(--rc-marca); color: var(--rc-marca); }

/* Selector principal: implementos o repuestos */
.rc-grupos { display: flex; max-width: 560px; margin: 0 auto 20px; padding: 5px; background: #eef0f4; border-radius: 14px; }
.rc-grupos button { flex: 1; padding: 13px 10px; border: 0; border-radius: 10px; background: transparent; color: #1a2433; font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.rc-grupos button span { margin-left: 6px; font-weight: 600; font-size: .84rem; opacity: .75; }
.rc-grupos button[aria-pressed="true"] { background: var(--rc-marca); color: #fff; }

/* Grupos de implementos con foto */
.rc-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 4px; }
.rc-tipos[hidden] { display: none; }
.rc-tipo { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 12px 8px 14px; border: 2px solid #e3e7ed; border-radius: 14px; background: #fff; color: #1a2433; cursor: pointer; transition: border-color .2s, background .2s; }
.rc-tipo:hover { border-color: var(--rc-marca); }
.rc-tipo[aria-pressed="true"] { border-color: var(--rc-marca); background: var(--rc-marca); color: #fff; }
.rc-tipo-foto { display: flex; align-items: center; justify-content: center; width: 100%; height: 92px; margin-bottom: 10px; border-radius: 8px; background: #fff; overflow: hidden; }
.rc-tipo-foto img { width: 100%; height: 100%; object-fit: contain; }
.rc-tipo-total { font-size: 2.4rem; font-weight: 800; color: var(--rc-marca); }
.rc-tipo strong { font-size: 1rem; line-height: 1.2; }
.rc-tipo small { opacity: .75; font-size: .8rem; }

.rc-puente { margin-top: 24px; text-align: center; }
.rc-puente[hidden] { display: none; }
.rc-puente button { padding: 12px 24px; border: 2px solid #1a2433; border-radius: 999px; background: #fff; color: #1a2433; font-weight: 700; cursor: pointer; }
.rc-puente button:hover { background: #1a2433; color: #fff; }
.rc-vacio a { display: inline-block; margin-left: 4px; font-weight: 700; color: var(--rc-marca); }
.rc-grupos button:focus-visible, .rc-tipo:focus-visible, .rc-puente button:focus-visible { outline: 3px solid var(--rc-marca); outline-offset: 2px; }

/* Barra de filtros y búsqueda */
.rc-buscar { display: block; width: 100%; max-width: 420px; margin: 0 auto 16px; padding: 11px 18px; border: 1.5px solid #d6dce5; border-radius: 999px; font-size: 1rem; color: #1a2433; background: #fff; }
.rc-buscar:focus { border-color: var(--rc-marca); outline: 2px solid var(--rc-marca); outline-offset: 1px; }
.rc-filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 2px; }
.rc-filtros[hidden] { display: none; }
.rc-chip { flex: 0 0 auto; border: 1.5px solid #d6dce5; background: #fff; color: #1a2433; border-radius: 999px; padding: 7px 16px; font-size: .92rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rc-chip:hover { border-color: var(--rc-marca); color: var(--rc-marca); }
.rc-chip[aria-pressed="true"] { background: var(--rc-marca); border-color: var(--rc-marca); color: #fff; }
.rc-sub { margin-top: 10px; padding: 10px; background: #f5f6f8; border-radius: 14px; }
.rc-contador { margin: 16px 0; text-align: center; color: #5b6675; font-size: .95rem; }

/* Rejilla y tarjeta */
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.rc-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid #e3e7ed; border-radius: 14px; overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.rc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 35, 55, .12); border-color: var(--rc-marca); }
.rc-foto { display: block; aspect-ratio: 1 / 1; padding: 12px; background: #fff; border-bottom: 1px solid #eef0f4; }
.rc-foto img { width: 100%; height: 100%; object-fit: contain; }
.rc-info { display: flex; flex-direction: column; flex: 1; padding: 14px; text-align: left; }
.rc-codigo { align-self: flex-start; max-width: 100%; margin-bottom: 8px; padding: 2px 8px; border-radius: 6px; background: #f0f2f6; color: #38465a; font: 600 .76rem/1.6 Consolas, Menlo, monospace; overflow-wrap: anywhere; }
.rc-info h3.rc-nombre { margin: 0 0 6px; font-size: .98rem; line-height: 1.35; font-weight: 700; color: #1a2433; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rc-info p.rc-desc { margin: 0 0 12px; font-size: .85rem; line-height: 1.5; color: #5b6675; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-info p.rc-precio { margin: 0 0 10px; font-size: 1.2rem; font-weight: 800; color: var(--rc-marca); }
.rc-acciones { display: flex; gap: 8px; margin-top: auto; }
.rc-ver { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 10px; background: var(--rc-marca); color: #fff !important; font-weight: 700; font-size: .9rem; text-decoration: none !important; }
.rc-ver:hover { filter: brightness(1.12); }
.rc-wa { flex: 0 0 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #25d366; color: #fff !important; }
.rc-wa:hover { filter: brightness(.93); }

.rc-vacio { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: #5b6675; }
.rc-mas { display: block; margin: 28px auto 0; padding: 12px 28px; border: 2px solid var(--rc-marca); border-radius: 999px; background: #fff; color: var(--rc-marca); font-weight: 700; cursor: pointer; }
.rc-mas:hover { background: var(--rc-marca); color: #fff; }
.rc-mas[hidden] { display: none; }
.rc-chip:focus-visible, .rc-ver:focus-visible, .rc-wa:focus-visible, .rc-mas:focus-visible, .rc-foto:focus-visible { outline: 3px solid var(--rc-marca); outline-offset: 2px; }

/* Móvil: filtros en una fila deslizable y dos productos por fila */
@media (max-width: 767px) {
    section[class^="category-banner-"] { min-height: 220px !important; padding: 24px 0; }
    section[class^="category-banner-"] h1 { font-size: 1.4rem !important; line-height: 1.3 !important; }
    section[class^="category-banner-"] p { font-size: 1rem !important; }
    section[class^="category-banner-"] > div img { max-width: 150px !important; } /* solo el logo, no la foto de fondo */
    .rc-wrap { padding: 0 10px; }
    .rc-tipos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .rc-tipo { padding: 8px 4px 10px; }
    .rc-tipo-foto { height: 62px; margin-bottom: 6px; }
    .rc-tipo strong { font-size: .8rem; overflow-wrap: anywhere; }
    .rc-tipo small { font-size: .72rem; }
    .rc-filtros { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rc-info { padding: 10px; }
    .rc-info h3.rc-nombre { font-size: .84rem; }
    .rc-info p.rc-desc { display: none; }
    .rc-acciones { gap: 6px; }
    .rc-ver { font-size: .82rem; min-height: 40px; }
    .rc-wa { flex-basis: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .rc-card { transition: none; }
    .rc-card:hover { transform: none; }
}
