@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Open+Sans:wght@300;400;600&display=swap&subset=cyrillic');

*:focus {
    outline: none !important;
    box-shadow: none !important;
}

body {
    padding-top: 71px;
    font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 0.3em;
}

article {
    padding-top: 16px;
    padding-bottom: 10px;
}

.rounded-border {
    border: 1px solid black;
    border-radius: 10px;
    padding: 16px;
    width: fit-content;
}

#loader-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
}

#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
}

.dark-theme #loader-overlay {
    background: rgba(55, 55, 55, 0.8);
}

.mltv h1, .mltv h2, .mltv h3, .mltv h4, .mltv h5, .mltv h6 {
    text-align: center;
}

.font-init {
    font-size: initial !important;
}

#main-content {
    max-width: 1250px;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

ul.no-bullets, ol.no-bullets {
    list-style-type: none;
}

ul.no-padding, ol.no-padding {
    list-style-position: inside;
    padding-left: 0;
}

a {
    color: #000000;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.nav-item a:hover, a.current-item, .tooltip-inner a:hover, a.red:hover {
    color: #899097 !important;
    text-decoration: none;
}

a.no-underline {
    text-decoration: none;
}

.dropdown-item:active {
    background-color: #c2c2c2;
    color: #A9B7C6;
}

.select2-container {
    z-index: 1070;
}

.modal {
    overflow: visible !important; /* Override bootstrap overflow hidden */
}

.left-menu a, .bible a {
    text-decoration: none;
}

.left-menu a:hover, .bible a:hover {
    text-decoration: underline;
}

.h2 {
    margin-top: 12px;
}

.form-group {
    margin-top: 12px;
}

.active-link {
    padding: 2px 5px;
    background-color: #000;
    color: #fff;
}

.form-group input, .form-group textarea, .form-group img, .form-group select, .input-group-text {
    margin-top: 5px;
}

.buttons-group {
    margin-top: 20px;
}

.navbar-nav {
    margin: 0 40px 0 40px;
}
.navbar-nav > li {
    float: none;
    display: inline-block;
}

.nt-btn, .nt-btn:hover, .nt-btn:active, .nt-btn:visited {
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.alert {
    margin-top: 15px;
}

.navbar-main {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar-brand {
    padding: 0 !important;
    margin-right: 0 !important;
}

.row.header {
    padding: 8px;
}

div[contenteditable=true] {
    border: 1px solid #C7C9D0;
    border-radius: 5px;
    padding: 8px 14px;
    margin-top: 7px;
    min-height: 150px;
    white-space: pre-line;
}

div[contenteditable=true] a {
    color: #2563eb;
}

.format-block {
    margin-top: 5px;
}

.format-icon {
    width: 30px;
    height: 30px;
    border: 1px solid #C7C9D0;
    border-radius: 5px;
    text-align: center;
    display: inline-block;
    cursor: pointer;
}

.format-icon img {
    height: 100%;
    object-fit: contain;
    margin: 0 !important;
    width: 20px;
}

.format-icon:hover {
    background-color: #e5e7eb;
}

.format-icon:hover img {
    opacity: 70%;
}

.media-col {
    margin-bottom: 10px;
    border: 1px solid #ccc;
    background-color: #eee;
    padding: 10px;
    cursor: move;
}

button img:hover, .img-link img:hover {
    opacity: 0.6;
}

.img-link {
    text-decoration: none;
}

.img-btn {
    background: none;
    border: none;
    padding: 0;
}

.img-link, .img-btn {
    margin: 0 2px;
}

red, .red {
    color: red;
}

warn, .warn {
    color: #fff500;
}

.dark-theme red, .dark-theme .red {
    color: #BBB529 !important;
}

.bg-red {
    background-color: red;
    color: #fff;
}

.dark-theme .bg-red {
    background-color: #BBB529 !important;
    color: #fff !important;
}

blue {
    color: #007fff;
}

.cs, cs, .translit-table .c1 p .c2 {
    font-family: "triodion-ieUcs","Irmologion ieUcs","Irmologion Ucs","Triodion ieUcs","Triodion Ucs","Orthodox.tt ieUcs8","Orthodox.tt Ucs8";
    font-size: 1.5rem;
}

.top-lower {
    position: relative;
    top: 9px;
    display: inline-block;
}

.bg-mohyla {
    padding: 0 10px 10px 10px;
    background-color: #FFEDB9;
}

h1.cs {
    font-size: 200%;
}

.no-cs, no-cs {
    font-family: Arial, Helvetica, sans-serif;
}

.cs-ostr {
    font-family: "Ostr", sans-serif !important;
    font-size: 25px !important;
    color: #860000;
}

.dark-theme .cs-ostr {
    color: #beb9b4;
}

.cs-ostr2 {
    font-family: "Ostr2", sans-serif !important;
    font-size: 160% !important;
}

.cs-arch {
    font-family: "Arch", sans-serif !important;
}

.compare .cs-ostr {
    font-size: 22px  !important;
}

.cs-svetozar, .arch-capital-add {
    font-family: "Svetozar", sans-serif !important;
}

.arch-capital-i {
    font-family: "Svetozar-I", sans-serif !important;
}

.cs-buky, .arch-capital {
    font-family: "Buky", sans-serif !important;
}

.arch-capital, .arch-capital-add, .arch-capital-i {
    color: #df0000;
    font-size: 200%;
}

.dark-theme .arch-capital, .dark-theme .arch-capital-add, .dark-theme .arch-capital-i {
    color: #BBB529;
}

.arch-capital-z {
    top: 13px;
    position: relative;
}

.single-line {
    height: 1.5em;
    line-height: 1.5em;
    overflow: hidden;
    white-space: nowrap !important;
    min-height: 46px !important;
}

 table.compare {
     border-collapse: collapse;
     line-height: 1.7;
}

.compare td.title {
    vertical-align: middle;
    padding-top: 2px;
    padding-bottom: 2px;
}

.compare td {
    vertical-align: top;
    padding: 5px 10px;
    border: 1px solid #000;
    width: 50%;
}

.compare td.cs {
    font-size: 125%;
    line-height: 1.3;
    padding-top: 3px;
}

.compare .btn {
    outline: none;
    box-shadow: none;
}

#navbarNavDropdown input:focus {
    outline: none;
    border: 1px solid #5C5C5C;
    box-shadow: 0 0 1px #5C5C5C;
}

#scrollTopBtn, #scrollDownBtn {
    width: 40px;
    opacity: 0.3;
}

#scrollTopBtn:hover, #scrollDownBtn:hover {
    opacity: 0.7;
}

.scroll-block {
    z-index: 101;
}

#dropdownMenuLink {
    position: relative;
    padding-left: 25px;
}

#dropdownMenuLink:before {
    content: ' ';
    background: url('../img/compare.png');
    background-size: cover;
    width: 20px;
    height: 20px;
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.dark-theme #dropdownMenuLink:before {
    background: url('../img/compare_light.png');
    background-size: cover;
    opacity: 0.7;
}

.page-link {
    color: #5C5C5C;
}

.page-link:hover {
    color: #000;
}

.page-item.active .page-link {
    background-color: #5C5C5C;
    border-color: #5C5C5C;
}

chapter {
    display: block;
    margin-top: 1rem;
    margin-bottom: 1rem;
    background-color: yellow;
    width: fit-content;
    clear: both;
    font-family: initial;
    font-size: initial;
}

.highlight {
    background-color: yellow;
}

.editable-text {
    max-height: 400px;
    overflow-y: auto;
}

sup {
    display: inline-block;
    padding: 10px 1px 8px 2px;
    cursor: pointer;
    font-weight: bold;
    font-size: 115%;
    top: 0;
    min-width: 10px;
}

.cs-arch sup {
    padding: 14px 3px 8px 7px;
    color: red;
}

.cs-ostr-sup {
    color: #ff8e34;
}

article .footnote {
    display: none;
}

.dark-theme {
    background-color: #2B2B2B;
}

.dark-theme, .tooltip-inner a {
    color: #A9B7C6 !important;
}

.dark-theme li, .dark-theme a,
.dark-theme p,
.dark-theme .c0, .dark-theme .c1,
.dark-theme .c2, .dark-theme .c3,
.dark-theme .c4, .dark-theme .c5,
.dark-theme .c6, .dark-theme .c7,
.dark-theme .c8, .dark-theme .c9,
.dark-theme .c10, .dark-theme .c11,
.dark-theme .c12, .dark-theme .c13,
.dark-theme .c14, .dark-theme .c15,
.dark-theme .c16, .dark-theme .c17,
.dark-theme .c18, .dark-theme .c19 {
    color: #A9B7C6;
}

.find-icon:focus {
    outline: none;
    border: none;
}

.find-icon {
    opacity: 0.7;
    width: 32px;
    height: 32px;
}

.select-theme {
    background-image: url("../img/moon.png");
}

.select-theme, .share-btn, .cart, .account, .nav-icon {
    opacity: 0.7;
}

.user-elements {
    margin-left: 28px;
}

.form-select, .remove-author-btn {
    margin-top: 5px;
}

.active-icon, .nav-icon:hover {
    opacity: 1;
}

.auth {
    margin-left: 20px;
    color: #b0b0b0;
}

.auth a {
    color: #b0b0b0;
}

.navbar a:hover {
    color: #fff !important;
}

.search-form {
    min-width: 450px;
    margin: auto;
}

.icon-circle.nav-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    display: none;
    align-items: center;
    justify-content: center;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}


.active-icon .cart-count {
    display: flex;
}

.dark-theme .select-theme {
    background-image: url("../img/sun.png");
}

.share-btn {
    background-image: url("../img/share_light.png");
}

.cart {
    background-image: url("../img/cart.png");
    position: relative;
}

.account {
    background-image: url("../img/account.png");
}

.dark-theme input.form-control, .dark-theme textarea {
    background-color: #423e3e !important;
    color: #A9B7C6 !important;
}

.dark-theme .modal-content {
    background-color: #464646;
}

.chapter-versions {
    margin-bottom: 11px;
    margin-top: 16px;
}

.chapter-versions a {
    text-decoration: none;
    font-size: .75em;
}

.chapter-versions a.bg-red:hover {
    color: #fff !important;
}

.dark-theme .chapter-versions a.bg-red,
.dark-theme .chapter-versions a.bg-red:hover {
    color: #000 !important;
}

.chapter-versions a:not(:last-child) {
    margin-right: 10px;
}

.dark-theme .chapter-versions .bg-active {
    background-color: #f8f9fa;
}

.characteristics li {
    padding: 3px 0 3px 7px;
}

#navbarNavDropdown form {
    align-items: center;
}

#navbarNavDropdown form input[type=search] {
    margin-right: 0;
}

.translit-table .c6 {
    background-color: #d9ead3 !important;
}

.dark-theme .translit-table .c6 {
    background-color: #25620c !important;
}

.translit-table .c3 {
    background-color: #fee1e1 !important;
}

.dark-theme .translit-table .c3 {
    background-color: #863333 !important;
}

.translit-table .c4 {
    font-style: italic;
}

.translit-table .c1 {
    background-color: #efefef !important;
}

.dark-theme .translit-table .c1 {
    background-color: #5c5c5c !important;
}

.translit-table .c17 {
    background-color: #fff2cc !important;
}

.dark-theme .translit-table .c17 {
    background-color: #7e7337 !important;
}

.translit-table .c18 {
    background-color: #c9daf8 !important;
}

.dark-theme .translit-table .c18 {
    background-color: #2854a4 !important;
}

.translit-table td {
    vertical-align: middle;
    overflow-wrap: break-word;
    white-space: normal;
}

.translit-table th:first-child,
.translit-table td:first-child {
    width: 150px;
}

.right-menu {
    font-size: 90%;
}

.right-menu .cs {
    font-size: 105%;
}

ul, ol {
    overflow-wrap: break-word;
}

li > ul,
li > ol {
    padding-left: 5px;
}

#translationForm textarea {
    max-height: 220px;
    overflow-y: auto;
}

.alert {
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 600px;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
    color: #b0b0b0;
}

.multiple-translations {
    background-color: #ffd481;
    cursor: pointer;
}

.capital-diff {
    background-color: #00ff70;
}

.translation-options {
    background-color: #ffcf2f;
    cursor: pointer;
    display: none;
}

.translation-options span {
    margin-left: 5px;
}

.pdf {
    margin: 7px 0;
}

#versionDropdownImage {
    cursor: pointer;
    width: 15px;
}

#versionDropdownImage:hover {
    opacity: 50%;
}

.dark-theme #versionDropdownImage {
    filter: invert(100%);
}

.list-group-item a {
    cursor: pointer;
}

.list-group-item:hover {
    background-color: #e8e8e8;
}

.compare-select {
    display: none;
    position: absolute;
    width: 236px;
}

tr.parent {
    background-color: #eee;
}

tr.parent:hover {
    background-color: #f5f5f5;
}

tr.parent td:nth-child(3) {
    cursor: pointer;
}

.center-header {
    text-align: center;
    width: 100%;
    display: inline-block;
}

.social-media {
    margin-top: 15px;
    font-size: 85%;
    position: relative;
}

.social-media img {
    max-width: 22px;
}

.social-media ul {
    list-style-type: none;
    padding-left: 0;
}

.search-form .form-control {
    line-height: 2.0;
}

.search-form button {
    width: 53px;
    opacity: 0.7;
}

.search-form button:hover {
    opacity: 1;
}

.navbar-brand img {
    max-height: 55px;
    width: auto;
}

.status-block {
    max-width: 200px;
    margin-left: auto;
}

@media (min-width: 768px) {
    .two-col {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;            /* зменшено відстань між колонками */
        align-items: flex-start;
        margin-bottom: 1rem;  /* зменшено відступ знизу */
    }
    .two-col .char-col {
        flex: 0 1 max-content;
    }
    .two-col .desc-col {
        flex: 1 1 250px;      /* мінімальна ширина опису для швидшого переносу */
        min-width: 0;
    }
}

/* Фіксація лівого сайдбару при прокрутці на екранах ≥992px */
@media (min-width: 992px) {
    .left-menu, .sidebar {
        position: sticky;
        top: 71px;                          /* push it down below the 71px‑high navbar */
        align-self: flex-start;  /* щоб у flex-контейнері займати початкову позицію */
    }

    .search-form {
        max-width: 618px;
    }

    .col-md-3 {
        width: 21%;
    }

    .col-md-9 {
        width: 79%;
    }

    .container {
        max-width: 1610px;
    }

    .two-col {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        align-items: flex-start;
    }
    .two-col .char-col { flex: 0 1 max-content; }
    .two-col .desc-col {
        flex: 1 1 0;
        min-width: 250px;
    }
}

@media (min-width: 1000px) {
    .col-md-3 {
        width: 20%;
    }

    .col-md-9 {
        width: 80%;
    }
}

@media (min-width: 1200px) {
    .img-fluid {
        width: 264px;
        max-width: 264px;
    }
}

@media (min-width: 1540px) {
    .col-md-3 {
        width: 18%;
    }

    .col-md-9 {
        width: 82%;
    }
}

@media (max-width: 992px) {
    #mainNav {
        margin-top: 9px;
        min-width: 350px;
    }
}

@media (max-width: 768px) {
    .catalog-header {
        display: none;
    }

    #mobileMenuToggle, #mobileRightToggle {
        display: block;
        text-align: center;
        cursor: pointer;
    }

    #mobileMenuToggle {
        margin: 8px 0 4px 0;
    }

    #mobileRightToggle {
        margin: 6px 0 8px 0;
    }

    #mobileMenuToggle:hover, #mobileRightToggle:hover {
        text-decoration: none;
    }

    #mobileMenuContent.d-block, #mobileRightContent.d-block {
        display: block;
    }

    #mobileMenuContent, #mobileRightContent {
        display: block;
    }

    .navbar-brand img {
        max-height: 40px;
        width: auto;
        margin: 4px 0 4px 0;
    }

    .status-block {
        max-width: 250px;
        margin: auto;
    }

}

.search-form {
    min-width: 0 !important;
    width: 100%;
}

@media (max-width: 991.98px) {
    .search-form {
        margin: .4rem 0 0.2rem 0;
    }

    .search-form .form-control {
        flex: 1;
        min-width: 0;
    }
}


.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.underline {
    text-decoration: underline;
    cursor: default;
}

.tooltip.show .tooltip-inner {
    pointer-events: auto;
}

.text-italic {
    font-style: italic;
}

.buy-paper img {
    width: 50%;
    margin-top: 10px;
    margin-bottom: 10px;
}

.buy-paper button {
    background-color: #DF0006;
    border-color: #DF0006;
    margin-bottom: 10px;
}

.buy-paper .btn {
    background-color: #DF0006 !important;
    border-color: #DF0006 !important;
    color: white !important;
    box-shadow: none !important;
    outline: none !important;
}

.buy-paper .btn:hover,
.buy-paper .btn:focus,
.buy-paper .btn:active,
.buy-paper .btn:focus:active,
.buy-paper .btn:visited,
.buy-paper .btn.show {
    background-color: #DF0006 !important;
    border-color: #DF0006 !important;
    color: white !important;
    box-shadow: none !important;
    outline: none !important;
}

.buy-paper .btn::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.font-italic {
    font-style: italic;
}

.popup-gallery .small-image img {
    height: 100px;
    margin: 5px;
}

.popup-gallery .main-image img {
    max-width: 250px;
}

.mfp-figure {
    position: relative;
    display: inline-block;    /* shrink‐wrap to image */
}

.mfp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
}
.mfp-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    pointer-events: none;
}

.mfp-arrow-left {
    left: -50px;    /* sits just left of the image */
}
.mfp-arrow-left::before {
    border-width: 10px 14px 10px 0;
    border-color: transparent white transparent transparent;
    left: 14px;
}

.mfp-arrow-right {
    right: -50px;   /* sits just right of the image */
}
.mfp-arrow-right::before {
    border-width: 10px 0 10px 14px;
    border-color: transparent transparent transparent white;
    right: 14px;
}

.book-item:hover {
    opacity: 0.9;
    background-color: #f2f2f2;
}

.book-item a {
    text-decoration: none;
}

.book-item a:hover .book-title {
    text-decoration: underline;
    text-decoration-skip-ink: none;
}

.book-item .book-title {
    line-height: 1.2;
    max-height: calc(1.2em * 3);   /* максимум 2 рядки */
    margin-bottom: .75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline;
}

.book-item .btn-buy {
    margin-top: auto;
}

.book-item img {
    /*padding: 14px 14px 0 14px;*/
}

.card {
    border-radius: .25rem;
    overflow: hidden;       /* обрізає все, що виходить за кордон */
}

.card-item .card-img-top {
    object-fit: cover;
    border-radius: 0;
}

.book-item {
    transition: box-shadow .2s;
    position: relative;
    z-index: 1;
}
.book-item:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Колонки з книгами мають нижчий z-index */
.row .col {
    position: relative;
    z-index: 1;
}

/* Основний контент має нижчий z-index за сайдбар */
.col-md-9 {
    position: relative;
    z-index: 1;
}

.stock-status {
    font-weight: bold;
}
/* 1. Контейнер із фіксованим співвідношенням сторін 2:3 */
.image-container {
    position: relative;
    width: 100%;
    padding-top: 150%;    /* 2:3 ratio */
    overflow: hidden;
}
.image-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.status-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;    /* дозвіл переносів між статусом і ціною */
    margin-top: auto;
}

.status-price > span {
    white-space: nowrap;  /* самі статус і ціна не розбиваються */
}

/* 4. Кнопка “Купити” завжди внизу */
.btn-buy {
    margin-top: auto;
}

.icon-circle {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.icon-circle svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2;    /* all strokes = 2px */
    display: block;     /* kill any extra whitespace */
}

.navbar-toggler {
    padding: 0 !important;
    border-color: #f8f9fa !important;
}

/* 1) make the sidebar stretch from under the navbar to bottom */
.sidebar {
    position: sticky;
    background-color: #f8f9f9; /* light grey */
    margin-bottom: 1.5rem; /* so sidebar content does not overlap Telegram link */
    z-index: 50;
}

/* 2) remove all borders on the card and items */
.sidebar-card {
    border: none;
    background: transparent;
    box-shadow: none; /* if you don’t want any shadow */
}

.sidebar-header {
    border-bottom: none;
    background: transparent;
    padding-bottom: 0.5rem;
}

.sidebar .list-group-flush .list-group-item {
    border: none;
    padding: 1rem 1rem 0 1rem;
    font-weight: bold;
}

.sidebar > .list-group {
    margin-bottom: 1.25rem; /* gap between categories block and filters */
}

.catalog-header, .sidebar .list-group-flush .list-group-item {
    background-color: #f8f9f9;
}

.sidebar .list-group-item.active a {
    font-weight: bold;
    color: #212529;
}

.list-group-item a:hover {
    opacity: 0.7;
}

.list-group-item a.active-category {
    color: #a40935 !important;
    font-weight: bold;
}

.list-group-item a.active-category strong {
    color: #a40935 !important;
}

.list-group-item a.all-books-inactive {
    font-weight: bold;
}

.list-group-item a.all-books-inactive strong {
    color: inherit;
}

.list-group-item strong {
    color: #a40935;
}

/* Заголовки фільтрів */
.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #a40935;
}

.accordion-button:not(.collapsed) .filter-title {
    color: #a40935;
}

/* Блок фільтрів */
#filtersAccordion {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.sidebar #filtersAccordion .accordion-item,
.sidebar #filtersAccordion .accordion-button,
.sidebar #filtersAccordion .list-group-item {
    background-color: #fff;
}

.sidebar #filtersAccordion .accordion-item {
    border-radius: 0;
    margin-bottom: 0.25rem;
    border: none;
    box-shadow: none;
}

.sidebar #filtersAccordion .accordion-button {
    border: none;
    padding: 0.65rem 1rem;
    justify-content: space-between;
    position: relative;
}

.sidebar #filtersAccordion .list-group-item.accordion-button {
    padding: 0.65rem 1rem;
}

.sidebar #filtersAccordion .list-group-item {
    padding: 0.35rem 1rem;
}

.sidebar #filtersAccordion .form-check-label {
    font-weight: 400;
}

.sidebar #filtersAccordion .accordion-button,
.sidebar #filtersAccordion .accordion-button:focus {
    box-shadow: none;
    color: #1f1f1f;
}

.sidebar #filtersAccordion .accordion-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e5e5;
}

.sidebar #filtersAccordion .accordion-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #7a7a7a; /* down arrow */
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.sidebar #filtersAccordion .accordion-button.collapsed::after {
    transform: translateY(-50%) rotate(-90deg);
}

.card-body {
    padding: 0.6rem 0.8rem;
}

.category {
    padding-bottom: 2rem;
}

.nav-title {
    color: #dbdbdb;
    font-style: italic;
    margin-left: 37px;
    padding-right: 6px;
    font-size: 14px;
}

.auth-form-wrapper {
    max-width: 446px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .auth-form-wrapper {
        max-width: 100%;
    }
}

.characteristics {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem 2rem 1rem 1rem;
    background: #fafafa;
    list-style-type: none;
}
.characteristics strong {
    font-weight: 600;
}
.characteristics li {
    margin-bottom: .5rem;
}

.cover-switch {
    margin-right: 14px;
}

.book-description.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 12;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge {
    z-index: 10;
}

.selectpicker {
    margin-top: 5px;
}

#live-search-results {
    top: 100%;                   /* immediately below the input */
    left: 0;
    right: 0;
    z-index: 1050;
    display: none;
    margin-top: .1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .25rem;
    overflow-y: auto;
}
#live-search-results .list-group-item {
    padding: .5rem 1rem;
    cursor: pointer;
}
#live-search-results .list-group-item:hover {
    background-color: #f8f9fa;
}

.small-search-img {
    width: 51px;
    max-height: 73px;
    object-fit: cover;
    border-radius: 4px;
}

#live-search-results .list-group-item-action:hover {
    background-color: #e9ecef;
}

#live-search-results a:hover .search-title {
    color: #212529 !important;
}

/* Title & author styling */
.search-title {
    font-weight: 500;
    line-height: 1.1;
}
.search-author {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

/* remove icon styling */
.remove-recent {
    font-size: 1.5rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    margin-right: .3rem;
}
.remove-recent:hover {
    color: #dc3545; /* bootstrap danger */
}

/* Make indicators static below the carousel */
#bookGalleryCarousel .carousel-indicators {
    position: static;
    justify-content: center;
}
/* Style each dot */
#bookGalleryCarousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.3);
    border: none;
    margin: 0 .25rem;
}
/* Highlight the active dot */
#bookGalleryCarousel .carousel-indicators .active {
    background-color: rgba(0,0,0,0.8);
}

#bookGalleryCarousel .carousel-control-prev,
#bookGalleryCarousel .carousel-control-next {
    top: 50%;
    bottom: auto;
    width: auto;         /* don’t span full height */
    height: auto;
    transform: translateY(-50%);
    padding: 0;          /* remove that big p-2 */
}

.breadcrumbs a {
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #646464;
}

/* start all images invisible */
.fade-in {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

/* once we tag them .is-loaded, they fade to 100% */
.fade-in.is-loaded {
    opacity: 1;
}

/* make each item two rows, always */
#cartOffcanvas .list-group-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

/* second row: full-width flex container */
#cartOffcanvas .price-qty-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* hide native spinner arrows if ever visible */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input {
    -moz-appearance: textfield;
}

/* style the stepper buttons & display */
.qty-display {
    width: 55px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* in your existing stylesheet, after the other cart rules… */
#cartOffcanvas .price-qty-wrapper {
    /* remove space-between so items hug the left by default */
    justify-content: flex-start;
}

#cartOffcanvas .qty-stepper {
    /* eat up all the free space to the left */
    margin-left: auto;
}

/* tiny gap between stepper and “×” */
#cartOffcanvas .remove-item {
    margin-left: 0.5rem;
}

.empty-cart:hover {
    background-color: initial;
}

/* public/css/custom.css */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-top: none;
    display: none;
}
.autocomplete-results .list-group-item {
    cursor: pointer;
}
.autocomplete-results .list-group-item:hover {
    background-color: #f8f9fa;
}

@media (min-width: 576px) {
    .modal-auth {
        max-width: 400px;
    }
}

/* Фіксована кнопка фільтра */
.filter-button-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #f8f9f9;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    width: 100%;
    z-index: 102;
    margin-top: 0;
}

@media (min-width: 768px) {
    .filter-button-fixed {
        width: auto;
        left: auto;
        right: auto;
    }
}

/* На десктопі accordion має працювати нормально, але початковий стан - розгорнутий */
@media (min-width: 768px) {
    #langsCollapse.show,
    #publishersCollapse.show {
        display: block !important;
    }

    #langsCollapse:not(.show),
    #publishersCollapse:not(.show) {
        display: none !important;
    }

    /* Прибираємо затримку анімації на десктопі */
    #langsCollapse,
    #publishersCollapse {
        transition: none !important;
    }
}

/* Прибираємо синій фон у заголовків фільтрів */
.accordion-button {
    background-color: transparent !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background-color: transparent !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    background-color: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}
