.book_item {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    text-decoration: none;
}
.book_item2 {
    /*padding: var(--space-24) var(--space-12);*/
    gap: var(--space-24);
}
.book_item_card {
    align-items: center;
    gap: var(--space-24);
    position: relative;
    padding: var(--space-48) var(--space-24) var(--space-24);
    border-radius: var(--space-12);
}
.book_item_card.color1 {
    background-color: #EEF2FF;
}
.book_item_card.color2 {
    background-color: #ECFDF5;
}
.book_item_card.color3 {
    background-color: #F5F3FF;
}
.book_thumnail {
    position: relative;
}
.book_img {
    border-radius: var(--space-16);
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.book_item_card .book_img {
    width: 200px;
    border-radius: var(--space-12);
}
.book_img img {
    width: 100%;
}
.book_info {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}
.book_title {
    height: 50px;
    font-size: var(--font-size-title-md);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-2);
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;        /* flexbox 컨테이너로 설정 */
    -webkit-box-orient: vertical;/* 박스 방향 설정 */
    -webkit-line-clamp: 2;
}
.book_title_sm {
    height: 45px;
    font-size: var(--font-size-body-md);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-4);
    color: var(--gray-800);
}
.book_item_card .book_title {
    text-align: center;
}
.book_meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}
.book_author {
    font-size: var(--font-size-body-md);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-4);
    color: var(--gray-600);
}
.book_author_sm {
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-3);
    color: var(--gray-600);
}
.book_price {
    font-size: var(--font-size-button);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-2);
    color: var(--gray-800);
}
.book_price_xl {
    font-size: var(--font-size-title-md);
}


.book_info_bg {
    background-color: var(--color-surface);
    border-radius: var(--space-8);
    padding: var(--space-16);
    gap: var(--space-6);
}

/* 리스트 책 */
.book_item_default {
    display: block;
}
.book_item_default a,
.book_item_default .book_gird {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    text-decoration: none;
}
.book_item_default .book_info {
    align-items: baseline;
}
.book_item_default .chip {
    color: var(--primary-500);
    display: inline-flex;
    height: 26px;
    align-items: center;
    padding: 0 var(--space-10);
    background-color: var(--primary-100);
}
.book_item_default .book_title {
    max-height: 56px;
    height: auto;
    font-size: var(--font-size-body-md);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-2);
}
.book_item_default .book_meta {
    gap: var(--space-8);
}
.book_item_default .book_price {
    font-size: var(--font-size-title-md);
    font-weight: var(--font-weight-medium);
}

.book_item_type_240 {
    width: 240px;
}
.book_item_type_224 {
    width: 224px;
}
.book_item_type_192 {
    width: 192px;
}

.rank_book_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: column; /* 핵심 */
    grid-template-rows: repeat(3, auto); /* 필요시 */
    column-gap: 72px;
    row-gap: 24px;
}
.rank_book_item {
    display: block;
}
.rank_book_item a {
    display: grid;
    grid-template-columns: 28px 64px 1fr;
    align-items: center;
    gap: 16px;
    min-height: 84px;
    text-decoration: none;
    color: inherit;
}
.rank_book_num {
    font-size: var(--font-size-title-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--gray-400);
    line-height: var(--line-height-2);
    text-align: center;
}
.rank_book_item:nth-child(-n+3) .rank_book_num {
    color: var(--gray-700);
    font-weight: var(--font-weight-semibold);
}
.rank_book_img {
    width: 64px;
    height: 80px;
    margin: 0;
    border-radius: var(--space-8);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rank_book_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rank_book_info {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.rank_book_title {
    font-size: var(--font-size-body-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--gray-700);
    line-height: var(--line-height-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rank_book_author {
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-regular);
    color: var(--gray-600);
    line-height: var(--line-height-3);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rank_book_item a:hover .rank_book_title {
    color: #2563eb;
}

@media screen and (max-width: 1024px) {
    .book_item2 {
        width: 240px;
    }
    .book_img {
        border-radius: var(--radius-md);
    }
    .rank_book_list {
        grid-template-columns: 1fr;
        row-gap: 18px;
        column-gap: var(--space-32);
    }
    .rank_book_item {
        width: 220px;
    }
    .rank_book_item a {
        grid-template-columns: 24px 52px 1fr;
        gap: 14px;
        min-height: 72px;
    }
    .rank_book_num {
        font-size: 18px;
    }
    .rank_book_img {
        width: 52px;
        height: 68px;
    }
    .rank_book_title {
        font-size: 14px;
    }


    .book_title {
        height: auto;
        word-break: keep-all;
    }

    .book_item_type_240 {
        width: 120px;
    }
}