/* =============================================
   Volume Chapters Section
   Mirrors volumes-section / volume-grid layout
   ============================================= */

.chapters-section {
    padding: 3rem 0;
    border-top: 1px solid #e5e5e5;
}

.chapters-section__header {
    margin-bottom: 2.5rem;
}

.chapters-section__title {
    font-family: "Maax Bold";
    font-weight: 400;
    font-size: 3.125rem;
    font-style: normal;
    line-height: 90%;
    letter-spacing: -1.5px;
    padding-bottom: 1rem;
    border-bottom: 4px solid var(--color-black);
}

.chapters-section__count {
    font-size: 1.25rem;
    font-style: normal;
    font-family: "Maax Medium";
    font-weight: 400;
    line-height: 110%;
    letter-spacing: -0.6px;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem 2rem;
    margin-top: 2rem;
}

/* =============================================
   Chapter Card — mirrors volume-card layout
   ============================================= */

.chapter-card {
    display: flex;
    gap: 1.5rem;
    background: transparent;
    position: relative;
}

.chapter-card__cover-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 150px;
}

.chapter-card__poster-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background-color: var(--color-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chapter-card__poster-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.chapter-card__placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--color-gray-light);
}

.chapter-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chapter-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-card__title {
    font-family: "Maax Medium";
    font-size: 1.875rem;
    font-weight: 400;
    line-height: 90%;
    letter-spacing: -1.8px;
    margin: 0;
}

.chapter-card__subtitle {
    font-family: "Maax Medium";
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 110%;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-card__meta {
    font-size: 0.875rem;
    color: var(--color-gray-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chapter-card__actions {
    margin-top: auto;
}

.chapter-card .button--buy {
    text-decoration: none;
    font-size: 0.75rem;
}

/* =============================================
   Responsive — matches volume-grid breakpoints
   ============================================= */

@media (max-width: 1024px) {
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 2.5rem 1.5rem;
    }

    .chapter-card__cover-wrapper {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .chapters-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .chapter-card {
        gap: 1.25rem;
    }

    .chapters-section {
        padding: 2rem 0;
    }

    .chapters-section__title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .chapter-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .chapter-card__cover-wrapper {
        width: 160px;
    }
}
