/* Kontener zapasowego szablonu strony: marginesy jak w motywie (zmienne motywu, jeśli istnieją). */
.tp-ebook-page {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--container-max, 1100px);
    padding: var(--space-6, 2rem) var(--space-4, 1.25rem);
    width: 100%;
}

.tp-ebook-page .entry-header {
    margin-bottom: 1.5rem;
}

.tp-ebook-page .entry-content > p,
.tp-ebook-page .entry-content > h2,
.tp-ebook-page .entry-content > ul,
.tp-ebook-page .entry-content > .tp-ebook-box {
    max-width: 46rem;
}

.tp-ebook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.tp-ebook-card {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.tp-ebook-card-cover {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.tp-ebook-cover {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.tp-ebook-card-title {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0.9rem 0 0.3rem;
}

.tp-ebook-card-subtitle {
    flex: 1;
    font-size: 0.9rem;
    margin: 0 0 0.8rem;
    opacity: 0.8;
}

.tp-ebook-card-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
}

.tp-ebook-button {
    background: #1f2937;
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-weight: 600;
    padding: 0.55rem 1rem;
    text-decoration: none;
}

.tp-ebook-button:hover,
.tp-ebook-button:focus {
    background: #111827;
    color: #fff;
}

.tp-ebook-more {
    font-size: 0.9rem;
}

.tp-ebook-box {
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
}

.tp-ebook-box .tp-ebook-cover {
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    flex: 0 0 180px;
    max-width: 180px;
}

.tp-ebook-box-body {
    flex: 1 1 220px;
}

.tp-ebook-meta {
    margin: 0 0 0.8rem;
    opacity: 0.8;
}
