.books-promo {
    padding: 28px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #f6f3f9;
}

.books-promo-heading h2 {
    font-size: 26px;
    line-height: 1.4;
}

.books-promo-heading p {
    max-width: 760px;
    margin: 0 auto 24px;
}

.books-promo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.books-promo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 24px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.books-promo-card img {
    width: 140px;
    height: 210px;
    max-width: 100%;
    margin-bottom: 16px;
    object-fit: contain;
}

.books-promo-card h3 {
    font-size: 22px;
}

.books-promo-card p {
    font-size: 15px;
}

.books-promo-price strong {
    margin-left: 6px;
    color: #78541c;
    font-size: 24px;
}

.books-promo-price span {
    display: block;
    margin-top: 4px;
}

.books-promo-card .btn {
    padding-right: 20px;
    padding-left: 20px;
}

.books-promo-pdf {
    margin-top: 16px;
    color: #684688;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.books-promo-note {
    margin: 20px 0 0;
    font-size: 14px;
}

.books-page {
    padding: 80px 0;
    background: #f6f6f6;
}

.books-page .title {
    padding-bottom: 40px;
}

.books-faq {
    max-width: 850px;
    margin: 0 auto;
}

.books-intro-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
    align-items: start;
    gap: 32px;
    margin-bottom: 40px;
}

.books-page .books-intro {
    padding-bottom: 0;
    text-align: left;
}

.books-intro .border {
    margin-left: 0;
}

.books-intro-purchases {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.books-intro-purchase {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.books-intro-purchase img {
    max-width: 100%;
    margin-bottom: 12px;
    object-fit: contain;
}

.books-intro-purchase h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.books-intro-purchase .btn {
    width: 100%;
    padding: 10px;
    font-size: 12px;
}

.books-quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 20px;
    margin-top: 24px;
}

.books-page .books-quick-links a {
    color: #684688;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.books-quick-links a {
    display: inline-block;
    padding: 8px 0;
}

#nabidka,
#ukazky,
#otazky,
.book-card[id] {
    scroll-margin-top: 130px;
}

.books-sale {
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid #dbc49a;
    border-radius: 8px;
    background: #fff8eb;
}

.books-sale h3 {
    font-size: 24px;
}

.books-sale p:last-child {
    margin-bottom: 0;
}

.book-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 28px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.book-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    margin-bottom: 24px;
}

.book-cover img {
    width: auto;
    max-height: 300px;
    object-fit: contain;
}

.book-content {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.book-content h3 {
    font-size: 23px;
    line-height: 1.4;
}

.book-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0 0 12px;
    list-style: none;
}

.book-facts li {
    padding: 5px 10px;
    border-radius: 6px;
    background: #f3eff7;
    color: #59416f;
    font-size: 14px;
}

.book-toc {
    margin: 4px 0 16px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-align: left;
}

.book-toc summary {
    padding: 12px 14px;
    color: #59416f;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.book-toc[open] summary {
    border-bottom: 1px solid #e5e5e5;
}

.book-toc-list {
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 12px 14px 12px 32px;
    color: #444;
    font-size: 14px;
    line-height: 1.8;
}

.book-toc-list:focus-visible {
    outline: 2px solid #a07cc5;
    outline-offset: -2px;
}

.book-pricing {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding: 16px 0 24px;
}

.book-stockist {
    margin: 0 0 16px;
    padding: 16px;
    border: 1px solid #ddd2e8;
    border-radius: 6px;
    background: #f8f5fb;
    text-align: left;
}

.book-stockist h4 {
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 1.4;
}

.book-stockist p,
.book-stockist address {
    margin: 0 0 10px;
    font-size: 14px;
    font-style: normal;
}

.book-stockist a {
    color: #684688;
    text-decoration: underline;
}

.book-stockist .book-stockist-note {
    margin-bottom: 0;
    color: #606060;
    font-size: 13px;
}

.book-regular-price,
.book-sale-until,
.book-shipping {
    color: #606060;
    font-size: 15px;
}

.book-price {
    color: #78541c;
    font-size: 32px;
    line-height: 1.3;
}

.book-total {
    margin-top: 8px;
    color: #444;
    font-size: 17px;
}

.book-checkout-note,
.book-order-note {
    color: #606060;
    font-size: 13px;
    line-height: 1.6;
}

.book-order-note {
    margin: 16px 0 0;
}

.book-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.books-page .book-pdf {
    border: 1px solid #777;
    padding: 12px 20px;
    border-radius: var(--button-radius, 6px);
    color: #333;
}

.books-page .book-pdf:hover,
.books-page .book-pdf:focus {
    background: #f0f0f0;
}

.books-previews,
.books-upcoming,
.books-faq {
    padding-top: 60px;
}

.books-page .book-preview-link {
    display: inline-block;
    margin-top: 16px;
    color: #684688;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.books-preview-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.book-preview-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    scroll-margin-top: 130px;
}

.book-preview-heading,
.book-preview-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.book-preview-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.book-preview-heading h3 {
    margin-bottom: 6px;
    font-size: 20px;
    line-height: 1.4;
}

.book-preview-heading p {
    margin: 0;
    font-size: 14px;
}

.book-preview-heading .book-preview-link {
    margin-top: 0;
}

.book-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 140px));
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.book-preview-item {
    min-width: 0;
    margin: 0;
    text-align: center;
}

.book-preview-item a {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
}

.book-preview-item img {
    display: block;
    width: 100%;
    height: auto;
}

.book-preview-zoom {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #684688;
    color: #fff;
    font-size: 13px;
}

.book-preview-item a:hover,
.book-preview-item a:focus-visible {
    outline: 3px solid #a07cc5;
    outline-offset: 3px;
}

.book-preview-item figcaption {
    margin-top: 8px;
    color: #444;
    font-size: 13px;
    line-height: 1.4;
}

.book-preview-footer {
    justify-content: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.books-preview-note {
    margin-bottom: 0;
    color: #606060;
    font-size: 14px;
}

.book-upcoming .book-cover {
    min-height: 240px;
}

.book-upcoming .book-cover img {
    max-height: 240px;
}

.book-upcoming h3 {
    font-size: 20px;
}

.book-progress {
    margin-top: auto;
    padding-top: 16px;
    text-align: left;
}

.book-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.book-progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #ece8f2;
}

.book-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #73509a, #a07cc5);
    transform-origin: left;
}

.book-progress-fill.is-visible {
    animation: book-progress-reveal 1.4s ease-out both;
}

.book-progress-date {
    margin: 8px 0 0;
    color: #606060;
    font-size: 13px;
}

@keyframes book-progress-reveal {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-progress-fill.is-visible {
        animation: none;
    }
}

.books-faq details {
    margin-bottom: 12px;
    padding: 20px 24px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
}

.books-faq summary {
    color: #333;
    font-weight: 600;
    cursor: pointer;
}

.books-faq details p {
    margin: 16px 0 0;
}

.books-faq a {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .books-intro-layout,
    .books-preview-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575px) {
    .books-promo {
        padding: 20px 14px;
    }

    .books-promo-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .books-page {
        padding: 48px 0;
    }

    .book-card {
        padding: 24px 18px;
    }

    .book-preview-group {
        padding: 20px 14px;
    }

    .book-preview-grid {
        gap: 10px;
    }

    .book-preview-heading h3 {
        font-size: 20px;
    }

    .book-preview-zoom {
        right: 4px;
        bottom: 4px;
        padding: 3px 5px;
        font-size: 11px;
    }

    .books-faq details {
        padding: 18px;
    }
}
