/* Каталог «Книги онлайн»: поиск, горизонтальные карточки как на старом сайте */

.rideandread-search-band {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 0;
    box-sizing: border-box;
    background-color: #eeede7;
    background-image: url(/img/bgsch3.jpg);
    background-size: 1980px 3300px;
    background-position: left -10px;
}

.rideandread-search-band__form {
    display: flex;
    align-items: stretch;
    width: min(1200px, 90%);
    max-width: 1200px;
    margin: 5px auto 0;
    position: relative;
    box-sizing: border-box;
}

.rideandread-search-band__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 34px;
    padding: 6px 2.2rem 6px 12px;
    border: 1px solid #ccc;
    border-right: 0;
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.rideandread-search-band__submit {
    flex: 0 0 100px;
    width: 100px;
    height: 34px;
    padding: 6px 12px;
    border: 1px solid #585b66;
    border-radius: 0 4px 4px 0;
    background: #585b66;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
}

.rideandread-search-band__submit:hover,
.rideandread-search-band__submit:focus-visible {
    color: #fff8a6;
    background: #33363f;
    border-color: #33363f;
}

.rideandread-search-band__clear {
    position: absolute;
    right: 108px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1;
    z-index: 1;
}

.rideandread-search-band__clear:hover {
    color: #333;
}

.rideandread-page {
    padding: 1.5rem 0 3rem;
}

.rideandread-wrap {
    max-width: 1200px;
}

.rideandread-breadcrumbs {
    font-size: 12px;
    color: #999;
    margin-bottom: 1rem;
    text-align: left;
}

.rideandread-breadcrumbs a {
    color: #999;
    text-decoration: none;
}

.rideandread-breadcrumbs a:hover {
    color: #333;
}

.rideandread-breadcrumbs__current {
    color: #333;
}

.rideandread-head {
    margin-bottom: 1.25rem;
}

.rideandread-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-serif, "PT Serif", serif);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text, #333);
}

.rideandread-lead {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.45;
    max-width: 42rem;
}

.rideandread-filters {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: #f7f6f2;
    border: 1px solid var(--line, #ddd);
    border-radius: 4px;
}

.rideandread-filters__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
}

.rideandread-filters__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 11rem;
}

.rideandread-filters__label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.rideandread-filters__select {
    min-width: 11rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 0;
    font: inherit;
    background: #fff;
    color: var(--text, #333);
}

.rideandread-filters__submit {
    border: 0;
    border-radius: 0;
    background: var(--btn, #585b66);
    color: #fff;
    padding: 0.5rem 1.25rem;
    font: inherit;
    cursor: pointer;
    height: 36px;
}

.rideandread-filters__submit:hover,
.rideandread-filters__submit:focus-visible {
    background: var(--header, #33363f);
}

.rideandread-filters__reset {
    align-self: center;
    font-size: 0.9rem;
    color: var(--accent, #337ab7);
    text-decoration: none;
}

.rideandread-filters__reset:hover {
    text-decoration: underline;
}

.rideandread-summary {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    color: #666;
    text-align: center;
}

.rideandread-pagination {
    margin: 0.5rem 0 1.25rem;
}

.rideandread-list {
    margin-bottom: 0.5rem;
}

/* Горизонтальная карточка (как libsmr.ru / dev.css .card_search) */
.rideandread-page .rideandread-card-row.card_search {
    display: grid;
    grid-template-columns: 60px 80px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
    border-radius: 4px;
    position: relative;
    min-height: 130px;
    margin: 8px 0;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    background-color: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.rideandread-page .card_search_l1 {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: auto;
    height: auto;
    float: none;
    margin: 0;
}

.rideandread-page .card_num {
    padding: 4px 10px;
    border-radius: 20px;
    text-align: center;
    background-color: #ccc;
    font-size: 14px;
    font-weight: bold;
    margin: 4px auto 2px;
    width: fit-content;
    min-width: 2em;
}

.rideandread-page .rideandread-gotocard {
    text-decoration: none;
    line-height: 0;
}

.rideandread-page .rar_btn1,
.rideandread-page .rar_btn2 {
    width: 40px;
    height: 40px;
    background-image: url("/img/rar_btn.png");
    background-repeat: no-repeat;
    cursor: pointer;
    position: absolute;
    left: 20px;
}

.rideandread-page .rar_btn1 {
    top: 45px;
    background-position: top left;
}

.rideandread-page .rideandread-gotocard:hover .rar_btn1,
.rideandread-page .rideandread-gotocard:focus-visible .rar_btn1 {
    background-position: bottom left;
}

.rideandread-page .rar_btn2 {
    top: 85px;
    background-position: top right;
}

.rideandread-page .rideandread-gotocard:hover .rar_btn2,
.rideandread-page .rideandread-gotocard:focus-visible .rar_btn2 {
    background-position: bottom right;
}

.rideandread-page .card_af {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 80px;
    height: 105px;
    box-shadow: #999 0 0 6px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #eee;
    float: none;
    margin: 6px 0 0;
    justify-self: center;
}

.rideandread-page .card_af--empty {
    background-image: linear-gradient(145deg, #e0e0e0, #f0f0f0) !important;
}

.rideandread-page .card_title {
    grid-column: 3;
    width: auto;
    float: none;
    margin: 6px 0 4px;
    font-size: 16px;
    text-align: left;
    font-weight: bold;
    line-height: 1.25;
    color: #333;
}

.rideandread-page .card_txt {
    grid-column: 3;
    width: auto;
    min-height: 0;
    float: none;
    margin: 0 0 6px;
    padding-bottom: 4px;
    font-size: 14px;
    text-align: left;
    line-height: 1.35;
    color: #7b8a97;
}

.rideandread-page .card_data {
    width: 100%;
    float: none;
    margin: 4px 0 0;
    font-size: 12px;
    text-align: left;
}

.rideandread-page .rartxt {
    display: inline;
    color: #7b8a97;
}

.rideandread-page .card_data strong {
    color: #5a6a78;
    font-weight: 600;
}

.rideandread-page .card_data strong a {
    color: var(--accent, #337ab7);
    text-decoration: none;
    font-weight: 600;
}

.rideandread-page .card_data strong a:hover {
    text-decoration: underline;
}

.rideandread-empty {
    padding: 2rem 0;
    text-align: center;
    color: #666;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .rideandread-page .rideandread-card-row.card_search {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }

    .rideandread-page .card_search_l1 {
        grid-row: 1 / span 3;
    }

    .rideandread-page .card_af {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
    }

    .rideandread-page .card_title {
        grid-column: 2;
        grid-row: 2;
    }

    .rideandread-page .card_txt {
        grid-column: 2;
        grid-row: 3;
    }
}

@media (max-width: 520px) {
    .rideandread-filters__field,
    .rideandread-filters__select {
        width: 100%;
        min-width: 0;
    }

    .rideandread-filters__submit {
        width: 100%;
    }
}
