/*
 * Llantas: páginas de tipo (/llantas/{tipo}) y resultados del buscador (por medida y por vehículo).
 * Usa la base de servicios.css (encabezado, secciones, barra fija en celular), el título de
 * promotions-landing.css y los botones de contact-channels.css. Sin adornos propios.
 *
 * El renglón de llanta (partes/llanta-fila) es el mismo en todas: una lista de renglones separados
 * por una línea, como las tiendas de llantas (foto, llanta y medidas, botón a la derecha).
 * Todo en Open Sans, la letra del resto del sitio.
 */

.tires-page,
.tires-page p,
.tires-page select,
.tires-page button,
.tire-list,
.tire-list p {
    font-family: var(--open-sans-fonts, "Open Sans", sans-serif);
}

/* ---------- Renglón de llanta ---------- */

.tire-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #e3e3e5;
    background: #ffffff;
}

.tire-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 230px;
    align-items: center;
    gap: 32px;
    padding: 24px 0;
    border-bottom: 1px solid #e3e3e5;
}

.tire-row__photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 170px;
    height: 170px;
}

.tire-row__photo picture,
.tire-row__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Los logos traen mucho espacio blanco: a 64 px se ven como en los resultados anteriores. */
.tire-row__brand {
    display: block;
    width: auto;
    max-width: 180px;
    height: 64px;
    margin: -14px 0 -10px -18px;
    object-fit: contain;
    object-position: left center;
}

.tire-row__name {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.tire-row__name a {
    color: var(--salinas-black, #171717);
}

.tire-row__name a:hover {
    color: var(--salinas-red, #c8272f);
}

.tire-row__use,
.tire-row__size {
    margin: 4px 0 0;
    color: #55575b;
    font-size: 16px;
}

.tire-row__size strong {
    color: var(--salinas-black, #171717);
}

.tire-row__desc {
    display: -webkit-box;
    max-width: 640px;
    margin: 6px 0 0;
    overflow: hidden;
    color: #55575b;
    font-size: 15px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tire-row__sizes-label {
    margin: 14px 0 2px;
    color: var(--salinas-black, #171717);
    font-size: 14px;
    font-weight: 700;
}

/* Medidas en rojo, como la tabla de precios del inicio. */
.tire-row__sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tire-row__sizes a {
    color: var(--salinas-red, #c8272f);
    font-size: 16px;
    font-weight: 800;
}

.tire-row__sizes a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tire-row__sizes .tire-row__more-sizes a {
    color: #55575b;
    font-weight: 600;
}

.tire-row__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

/* "Agregar a cotización" con la forma de los botones de contacto, en contorno negro. */
.tire-row .tire-row__quote {
    min-height: 36px;
    padding: 0 14px;
    border: 2px solid var(--salinas-black, #171717);
    background: #ffffff;
    color: var(--salinas-black, #171717);
    font-size: 15px;
}

.tire-row .tire-row__quote:hover {
    background: #f1f2f4;
    color: var(--salinas-black, #171717);
}

.tire-row__link {
    color: var(--salinas-black, #171717);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tire-row__link:hover {
    color: var(--salinas-red, #c8272f);
}

/* ---------- Páginas de tipo ---------- */

/* Fondo blanco como Promociones y Sucursales. */
.services-page.tires-page {
    padding: 0;
    background: #ffffff;
}

/* Título a la izquierda; en mayoreo, "Cotizar por mayoreo" a la derecha. */
.tires-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
}

.tires-head .services-header__intro {
    flex: 1 1 auto;
}

.tires-head > .contact-wa {
    flex: 0 0 auto;
    margin-bottom: 18px;
}

/* Filtros en una línea, con su nombre a la vista. */
.tires-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0 0 18px;
}

.tires-filter__field {
    margin: 0;
    color: var(--salinas-black, #171717);
    font-size: 15px;
    font-weight: 700;
}

.tires-filter select + .tires-filter__field {
    margin-left: 14px;
}

.tires-filter select {
    width: 200px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #c9cacf;
    border-radius: 8px;
    background: #ffffff;
    color: var(--salinas-black, #171717);
    font-size: 16px;
}

.tires-filter__submit {
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px !important;
    background: var(--salinas-black, #171717);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.tires-filter__submit[hidden] {
    display: none;
}

/* "Buscar por vehículo": botón rojo como "Buscar llantas" (el amarillo es solo para ofertas). */
/* "¿No sabes tu medida? Busca por vehículo →": renglón aparte debajo de los filtros, como enlace rojo (abre el buscador). */
.tires-filter__vehiculo {
    margin: 10px 0 0;
    color: #55575b;
    font-size: 15px;
}

.tires-filter__vehicle {
    padding: 0;
    border: 0;
    background: none;
    color: var(--salinas-red, #c8272f);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.tires-filter__vehicle:hover,
.tires-filter__vehicle:focus-visible {
    color: var(--salinas-red-dark, #a91f27);
}

.tires-filter__clear {
    margin-left: 6px;
    color: #55575b;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tires-empty {
    margin: 0;
    padding: 24px 0;
    border-top: 1px solid #e3e3e5;
    color: #55575b;
    font-size: 17px;
}

/* Marcas y medidas al pie de la lista. */
/* Cada logo en una tarjeta blanca, como los tipos y las medidas. */
.tires-brand-logos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tires-brand-logos a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    padding: 10px 20px;
    border: 1px solid var(--salinas-surface-border, #ebebeb);
    border-radius: 14px;
    background: #ffffff;
    color: var(--salinas-black, #171717);
    font-weight: 800;
    transition: border-color .15s ease;
}

.tires-brand-logos a:hover,
.tires-brand-logos a:focus-visible {
    border-color: var(--salinas-red, #c8272f);
}

.tires-brand-logos img {
    display: block;
    width: 100%;
    max-width: 260px;
    height: 100px;
    object-fit: contain;
}

/* En /llantas son 9 marcas: 3 por fila para que no quede una sola abajo. */
.tires-home .tires-brand-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tires-size-index {
    margin: 28px 0 0;
    color: #55575b;
    font-size: 16px;
    line-height: 1.9;
}

.tires-size-index strong {
    color: var(--salinas-black, #171717);
}

.tires-size-index a {
    color: var(--salinas-red, #c8272f);
    font-weight: 700;
    white-space: nowrap;
}

/* Vehículo elegido en el buscador, sucursales y datos de la medida: texto simple, sin recuadros. */
.tires-vehicle {
    margin: 0 0 16px;
    color: #55575b;
    font-size: 17px;
}

.tires-vehicle strong {
    color: var(--salinas-black, #171717);
}

.tires-vehicle__change {
    padding: 0;
    border: 0;
    background: none;
    color: var(--salinas-black, #171717);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tires-vehicle__change:hover {
    color: var(--salinas-red, #c8272f);
}

.tires-branches {
    margin: 22px 0 0;
    color: #55575b;
    font-size: 15px;
    line-height: 1.8;
}

.tires-branches strong {
    color: var(--salinas-black, #171717);
}

.tires-branches a {
    color: #55575b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tires-size-specs {
    width: 100%;
    max-width: 640px;
    border-collapse: collapse;
    font-size: 17px;
}

.tires-size-specs th,
.tires-size-specs td {
    padding: 12px 0;
    border-bottom: 1px solid #ebebeb;
    text-align: left;
    vertical-align: top;
}

/* Espacio entre la etiqueta y su texto: sin él, "Auto y camioneta" queda pegado a la descripción. */
.tires-size-specs th {
    width: 176px;
    padding-right: 16px;
    color: var(--salinas-black, #171717);
    font-weight: 800;
}

.tires-size-specs td {
    color: #3d3d40;
}

/* Más específico que ".services-page .salinas-section-title" (servicios.css), que dejaba el margen en 0. */
.services-page .tires-section-gap,
.tires-section-gap {
    margin-top: 40px;
}

.tires-size-specs th a {
    color: var(--salinas-red, #c8272f);
}

.tires-size-specs td a {
    color: var(--salinas-red, #c8272f);
    font-weight: 700;
}

.tires-size-note {
    margin: 18px 0 0;
    color: #55575b;
    font-size: 16px;
}

/* ---------- Pantallas medianas ---------- */

@media (max-width: 991.98px) {
    .tire-row {
        grid-template-columns: 130px minmax(0, 1fr) 200px;
        gap: 24px;
    }

    .tire-row__photo {
        width: 130px;
        height: 130px;
    }
}

/* ---------- Celular ---------- */

@media (max-width: 767.98px) {
    .tire-row {
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: start;
        gap: 12px 16px;
        padding: 18px 0;
    }

    .tire-row__photo {
        width: 96px;
        height: 96px;
    }

    .tire-row__brand {
        height: 48px;
        margin: -10px 0 -8px -14px;
    }

    .tire-row__name {
        font-size: 19px;
    }

    .tire-row__desc {
        display: none;
    }

    .tire-row__sizes-label {
        margin-top: 8px;
    }

    .tire-row__sizes {
        gap: 2px 14px;
    }

    .tire-row__sizes a {
        font-size: 15px;
    }

    .tire-row__actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .tire-row__actions .contact-wa,
    .tire-row__actions .tire-row__quote {
        flex: 1 1 auto;
    }

    .tire-row__link {
        flex: 0 0 auto;
        padding: 6px 4px;
    }

    .tires-head {
        display: block;
    }

    /* En celular "Cotizar por mayoreo" ya está en la barra fija de abajo. */
    .tires-head > .contact-wa {
        display: none;
    }

    .tires-filter {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 12px;
    }

    .tires-filter select {
        width: 100%;
    }

    .tires-filter select + .tires-filter__field {
        margin-left: 0;
    }

    .tires-filter__submit,
    .tires-filter__clear {
        grid-column: 1 / -1;
        justify-self: start;
    }


    .tires-brand-logos,
    .tires-home .tires-brand-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .tires-brand-logos a {
        min-height: 84px;
        padding: 8px 10px;
    }

    .tires-brand-logos img {
        height: 68px;
    }
}

/* ---------- /llantas: el buscador y los 4 tipos ---------- */

.tires-home {
    padding-bottom: 64px;
}

/* Buscador a lo ancho: tarjeta blanca como las demás (sin sombra ni barra de colores),
   pestañas a la izquierda y los campos en una fila con el botón al final. */
.tires-home .tires-home__finder .search__filter--area {
    margin: 0;
    padding: 20px 22px 22px;
    border: 1px solid var(--salinas-surface-border, #ebebeb);
    border-radius: 14px;
    box-shadow: none;
}

.tires-home .tires-home__finder .search__filter--area::before {
    display: none;
}

.tires-home .tires-home__finder #myTabs {
    max-width: 380px;
}

.tires-home .tires-home__finder .search__filter--hint {
    margin: 0 0 12px;
}

.tires-home .tires-home__finder #vehicle-search {
    display: grid;
    flex: none;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 10px;
    align-items: start;
}

.tires-home .tires-home__finder .vehicle-search__fields {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
}

.tires-home .tires-home__finder .vehicle-search__submit {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
}

.tires-home .tires-home__finder .vehicle-search__status {
    grid-column: 1 / -1;
    margin: 0;
}

.tires-home .tires-home__finder .vehicle-search__status:empty {
    display: none;
}

.tires-home .tires-home__finder .tab-pane > .search__filter--form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 220px;
    gap: 10px;
    align-items: center;
}

.tires-home .tires-home__finder .search__filter--size-hint {
    grid-column: 1 / -1;
}

.tires-home .tires-home__finder .search__filter--form .search__filter--btn {
    margin-top: 0;
}

/* Los 4 tipos, 2x2. */
.tires-types {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tires-types__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 16px 12px 18px;
    border: 1px solid var(--salinas-surface-border, #ebebeb);
    border-radius: 14px;
    background: #ffffff;
    color: var(--salinas-black, #171717);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s ease;
}

.tires-types__item:hover {
    border-color: var(--salinas-red, #c8272f);
    color: var(--salinas-red, #c8272f);
}

.tires-types__item img {
    width: 100%;
    max-width: 130px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

@media (max-width: 991.98px) {
    .tires-home .tires-home__finder #vehicle-search,
    .tires-home .tires-home__finder .tab-pane > .search__filter--form {
        grid-template-columns: minmax(0, 1fr);
    }

    .tires-home .tires-home__finder .vehicle-search__fields {
        grid-auto-flow: row;
    }

    .tires-home .tires-home__finder .vehicle-search__submit {
        grid-column: auto;
        grid-row: auto;
    }

}

@media (max-width: 575.98px) {
    .tires-home.services-section--first {
        padding-top: 24px;
    }

    .tires-home .tires-home__finder .search__filter--area {
        padding: 16px 14px 16px;
    }

    .tires-home .tires-home__finder #myTabs {
        max-width: none;
    }

    .tires-types {
        gap: 10px;
    }

    .tires-types__item {
        padding: 12px 10px 14px;
        font-size: 15px;
    }

    .tires-types__item img {
        max-width: 110px;
    }
}

/* /llantas: franja de promoción, medidas más vendidas y marcas debajo de los tipos y el buscador. */
.tires-home__promo {
    margin-bottom: 28px;
}

.tires-home .tires-home__heading {
    margin: 44px 0 14px;
}

.tires-home .tires-home__heading--first {
    margin-top: 0;
}

/* Por tipo y medidas más vendidas, lado a lado. */
.tires-home__browse {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: stretch;
}

.tires-home__browse > div {
    display: flex;
    flex-direction: column;
}

/* Las dos columnas terminan a la misma altura. */
.tires-home__browse .tires-types {
    flex: 1;
    grid-auto-rows: 1fr;
}

/* Medidas más vendidas: una tarjeta blanca con los grupos y cada medida como botón. */
.tires-sizes {
    flex: 1;
    display: grid;
    align-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid var(--salinas-surface-border, #ebebeb);
    border-radius: 14px;
    background: #ffffff;
}

.tires-home .tires-sizes__title {
    margin: 0 0 8px;
    color: var(--salinas-black, #171717);
    font-size: 16px;
    font-weight: 700;
}

.tires-sizes__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tires-sizes__item {
    display: block;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f4f4f5;
    color: var(--salinas-black, #171717);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}

.tires-sizes__item:hover,
.tires-sizes__item:focus-visible {
    border-color: var(--salinas-red, #c8272f);
    background: #ffffff;
    color: var(--salinas-red, #c8272f);
}

@media (max-width: 991.98px) {
    .tires-home__browse {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}

@media (max-width: 575.98px) {
    .tires-sizes {
        padding: 16px 14px;
    }

    .tires-sizes__item {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* En /llantas el botón va junto a los campos, no empujado al fondo de la pestaña. */
.tires-home .tires-home__finder .tab-content .search__filter--btn {
    margin-top: 0;
}

/* Buscador compacto en computadora: pestañas a la izquierda y campos con el botón a la derecha, en una fila.
   Sin las ayudas (los campos ya dicen Año, Marca, Modelo / Ancho, Alto, Rin). */
@media (min-width: 992px) {
    .tires-home .tires-home__finder .search__filter--area {
        display: grid;
        grid-template-columns: 270px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
        padding: 16px 18px;
    }

    .tires-home .tires-home__finder #myTabs {
        max-width: none;
    }

    .tires-home .tires-home__finder #myTabs .nav-link {
        min-height: 42px;
    }

    .tires-home .tires-home__finder .tab-content {
        margin-top: 0 !important;
    }

    .tires-home .tires-home__finder .search__filter--hint,
    .tires-home .tires-home__finder .search__filter--size-hint {
        display: none;
    }

    .tires-home .tires-home__finder .vehicle-search__fields {
        margin-bottom: 0;
    }

    /* Por vehículo y Por medida con los campos y el botón en el mismo lugar: arriba de su pestaña, no centrados. */
    .tires-home .tires-home__finder .tab-pane > .search__filter--form,
    .tires-home .tires-home__finder #vehicle-search {
        grid-template-columns: repeat(3, minmax(0, 1fr)) 200px;
        align-content: start;
        align-items: start;
    }

    .tires-home .tires-home__finder .vehicle-search__fields {
        grid-column: 1 / 4;
    }

    .tires-home .tires-home__finder .vehicle-search__submit {
        grid-column: 4;
    }

    /* Solo la pestaña activa ocupa lugar: el aviso de Por vehículo no deja un hueco en Por medida. */
    .tires-home .tires-home__finder .tab-content > .tab-pane:not(.active) {
        display: none;
    }
}
