.rpbi-inventory {
    display: grid;
    gap: 18px;
}

.rpbi-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-items: center;
}

.rpbi-filters input,
.rpbi-filters select,
.rpbi-filters button,
.rpbi-reset {
    min-height: 42px;
    border: 1px solid #cfd6dc;
    border-radius: 4px;
    padding: 8px 10px;
    font: inherit;
}

.rpbi-filters button {
    border-color: #163c5a;
    background: #163c5a;
    color: #fff;
    cursor: pointer;
}

.rpbi-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #163c5a;
}

.rpbi-results-meta {
    color: #2d3943;
}

.rpbi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.rpbi-card {
    overflow: hidden;
    border: 1px solid #d9e1e7;
    border-radius: 6px;
    background: #fff;
}

.rpbi-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    background: #eef2f5;
}

.rpbi-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rpbi-card-body {
    padding: 14px;
}

.rpbi-card h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    line-height: 1.3;
}

.rpbi-card h3 a {
    color: inherit;
    text-decoration: none;
}

.rpbi-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.rpbi-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.rpbi-card dt {
    color: #5d6a74;
}

.rpbi-card dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

.rpbi-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rpbi-pagination a,
.rpbi-pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfd6dc;
    border-radius: 4px;
    padding: 6px 10px;
    text-decoration: none;
}

.rpbi-pagination .current {
    background: #163c5a;
    color: #fff;
    border-color: #163c5a;
}

.rpbi-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.rpbi-gallery figure {
    margin: 0;
    aspect-ratio: 4 / 3;
    background: #eef2f5;
}

.rpbi-lightbox-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.rpbi-gallery img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

html.rpbi-lightbox-open,
body.rpbi-lightbox-open {
    overflow: hidden;
}

html body .rpbi-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 18, 26, 0.92);
}

html body .rpbi-lightbox.is-open {
    display: flex;
}

html body div.rpbi-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
}

html body div.rpbi-lightbox:not(.is-open) {
    display: none !important;
}

html body div.rpbi-lightbox.is-open {
    display: flex !important;
}

.rpbi-lightbox-figure {
    display: grid;
    gap: 10px;
    margin: 0;
    max-width: min(1200px, 94vw);
    max-height: 92vh;
}

.rpbi-lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 94vw;
    max-height: calc(92vh - 46px);
    object-fit: contain;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.rpbi-lightbox-caption {
    min-height: 22px;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.rpbi-lightbox-close,
.rpbi-lightbox-prev,
.rpbi-lightbox-next {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(16, 28, 39, 0.76);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.rpbi-lightbox-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: 32px;
}

.rpbi-lightbox-prev,
.rpbi-lightbox-next {
    top: 50%;
    width: 48px;
    height: 48px;
    font-size: 42px;
    transform: translateY(-50%);
}

.rpbi-lightbox-prev {
    left: 18px;
}

.rpbi-lightbox-next {
    right: 18px;
}

.rpbi-lightbox:not(.has-multiple) .rpbi-lightbox-prev,
.rpbi-lightbox:not(.has-multiple) .rpbi-lightbox-next {
    display: none;
}

@media (max-width: 700px) {
    .rpbi-lightbox {
        padding: 14px;
    }

    .rpbi-lightbox-prev,
    .rpbi-lightbox-next {
        width: 42px;
        height: 42px;
        font-size: 34px;
    }

    .rpbi-lightbox-prev {
        left: 8px;
    }

    .rpbi-lightbox-next {
        right: 8px;
    }
}

.rpbi-specs,
.rpbi-engines {
    display: grid;
    gap: 22px;
}

.rpbi-spec-group,
.rpbi-engine {
    display: grid;
    gap: 10px;
}

.rpbi-spec-group h3,
.rpbi-engine h3 {
    margin: 0;
    font-size: 1.15rem;
}

.rpbi-spec-group dl,
.rpbi-engine dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
    margin: 0;
    border-top: 1px solid #d9e1e7;
}

.rpbi-spec-group dl div,
.rpbi-engine dl div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-bottom: 1px solid #d9e1e7;
}

.rpbi-spec-group dt,
.rpbi-engine dt {
    color: #5d6a74;
    font-size: 0.9rem;
}

.rpbi-spec-group dd,
.rpbi-engine dd {
    margin: 0;
    font-weight: 700;
}
