/**
 * Catálogo público pastillas de freno.
 */

/* Página: fondo oscuro como mantenciones */
body.page-pastillas-freno-index {
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

body.page-pastillas-freno-index main {
    background: #f4f6fb;
    color: #111;
}

/* Hero: imagen de fondo y dimensiones (variables en el section inline) */
body.page-pastillas-freno-index .hero-section--mantenciones-search {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    background-color: #000;
    overflow: hidden;
    isolation: isolate;
    padding-bottom: 0;
    margin-top: 0 !important;
    padding-top: 0;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 100 / 28;
    height: auto;
    max-height: none;
}

body.page-pastillas-freno-index .hero-section--mantenciones-search::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            rgba(0, 0, 0, calc(var(--mantenciones-hero-bg-darken-pct, 0) / 100)),
            rgba(0, 0, 0, calc(var(--mantenciones-hero-bg-darken-pct, 0) / 100))
        ),
        var(--mantenciones-hero-bg-desktop, url('/mantenciones/fondohero01.png'));
    background-size: cover, cover;
    background-position: center center, center center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: local, local;
    z-index: 0;
    pointer-events: none;
}

body.page-pastillas-freno-index .hero-section--mantenciones-search .hero-content--mantenciones-search {
    position: relative;
    z-index: 1;
}

body.page-pastillas-freno-index .hero-mantenciones-hero-stack,
body.page-pastillas-freno-index .hero-mantenciones-panel {
    position: relative;
    z-index: 2;
}

@media (min-width: 769px) {
    body.page-pastillas-freno-index .hero-section--mantenciones-search {
        aspect-ratio: unset;
        height: auto;
        min-height: var(--hero-desktop-height, 538px);
        max-height: none;
    }

    body.page-pastillas-freno-index .hero-section--mantenciones-search .hero-content--mantenciones-search {
        justify-content: flex-start;
    }

    body.page-pastillas-freno-index .hero-section--mantenciones-search::after {
        background-size: 100% 100%, 100% auto;
    }
}

@media (max-width: 768px) {
    body.page-pastillas-freno-index .hero-section--mantenciones-search {
        aspect-ratio: unset;
        min-height: calc(100vw * 42 / 25);
        height: auto;
        max-height: none;
    }

    body.page-pastillas-freno-index .hero-section--mantenciones-search::after {
        background-image:
            linear-gradient(
                rgba(0, 0, 0, 0.32),
                rgba(0, 0, 0, 0.32)
            ),
            linear-gradient(
                rgba(0, 0, 0, calc(var(--mantenciones-hero-bg-darken-pct, 0) / 100)),
                rgba(0, 0, 0, calc(var(--mantenciones-hero-bg-darken-pct, 0) / 100))
            ),
            var(--mantenciones-hero-bg-mobile, var(--mantenciones-hero-bg-desktop, url('/mantenciones/fondohero01.png')));
    }

    body.page-pastillas-freno-index .hero-mantenciones-panel {
        box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
    }

    body.page-pastillas-freno-index .hero-mantenciones-panel__submit {
        min-height: 44px;
    }
}

/* Badge y título del panel */
body.page-pastillas-freno-index .hero-mantenciones-panel__km-badge {
    background: #113885;
    color: #fff;
    letter-spacing: 0.05em;
}

body.page-pastillas-freno-index .hero-mantenciones-panel__highlight {
    color: #4da3ff;
}

body.page-pastillas-freno-index .hero-mantenciones-panel__heading-line--rich {
    display: block;
}

/* Resultados */
.pf-resultados-wrap {
    padding: 2rem 0 1rem;
    background: #f4f6fb;
}

.pf-resultados-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
}

.pf-resultados-title {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.pf-resultados-lead {
    color: #64748b;
    margin-bottom: 1.25rem;
}

.pf-producto-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    height: 100%;
}

.pf-producto-card__media {
    width: 100%;
    max-width: 220px;
    margin-inline: auto;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid #e2e8f0;
}

.pf-producto-card__media picture,
.pf-producto-card__media img {
    display: block;
    width: 100%;
    height: 100%;
}

.pf-producto-card__media img {
    object-fit: cover;
}

.pf-producto-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 56, 133, 0.1);
    color: #113885;
    font-size: 1.2rem;
}

.pf-producto-card__nombre {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.pf-producto-card__codigo {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.pf-producto-card__precio {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.pf-producto-card__nombre,
.pf-producto-card__codigo {
    width: 100%;
}

.pf-producto-card__precio-old {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.pf-producto-card__precio-actual {
    color: #113885;
    font-size: 1.3rem;
    font-weight: 800;
}

.pf-btn-agregar-carrito.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pf-producto-card--mensaje {
    justify-content: center;
    align-items: stretch;
}

.pf-producto-card--mensaje-ancho {
    text-align: left;
}

.pf-producto-card__mensaje {
    width: 100%;
    text-align: inherit;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pf-producto-card__mensaje.pf-texto-rico > :first-child {
    margin-top: 0;
}

.pf-producto-card__mensaje.pf-texto-rico > :last-child {
    margin-bottom: 0;
}

.pf-producto-card__mensaje.pf-texto-rico h1,
.pf-producto-card__mensaje.pf-texto-rico h2,
.pf-producto-card__mensaje.pf-texto-rico h3,
.pf-producto-card__mensaje.pf-texto-rico h4 {
    color: #0f172a;
    font-weight: 700;
}

.pf-producto-card__mensaje.pf-texto-rico a:not(.btn) {
    color: #113885;
    text-decoration: underline;
}

.pf-producto-card__mensaje.pf-texto-rico a.btn {
    text-decoration: none;
    margin-top: 0.35rem;
}

.pf-producto-card__mensaje.pf-texto-rico p:has(> a.btn:only-child) {
    margin-bottom: 0;
}

.pf-producto-card__mensaje.pf-texto-rico img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 767.98px) {
    .pf-resultados-wrap {
        padding-top: 1.25rem;
    }

    .pf-resultados-card {
        padding: 1rem;
        border-radius: 12px;
    }
}
