/* YORUM MODALI - ARKA PLAN KARARTMA */
#comment-modal > .comment-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#comment-modal > .comment-modal-dialog {
    position: relative;
    z-index: 1;
}

/* KİTAP DETAY ANA YERLEŞİM */
.book-detail-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.book-detail-cover-column,
.book-detail-info-column {
    width: 100%;
    min-width: 0;
}

.book-detail-info-column {
    max-width: none;
}

.book-detail-cover-box {
    width: 100%;
}

.book-detail-cover-image {
    display: block;
    height: 500px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.book-detail-cover-placeholder {
    height: 500px;
    width: 330px;
}

.book-detail-info-column .book-category {
    margin-bottom: 8px;
}

/* KİTAP BAŞLIĞI */
.book-heading-wrap {
    position: relative;
    min-height: 86px;
    margin-bottom: 24px;
}

.book-title-block {
    min-width: 0;
    padding-right: 300px;
}

.book-title-block h1 {
    margin: 0;
}

.book-rating-summary {
    position: absolute !important;
    top: 0 !important;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* SATIN ALMA ALANI */
.book-purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
    padding: 0;
}

.book-purchase-row .book-price-group {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.book-purchase-row .book-price {
    font-size: 2.25rem;
    line-height: 1.1;
}

.book-purchase-row .book-stock {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

.book-purchase-row form {
    flex-shrink: 0;
}

.book-quantity-box {
    height: 48px !important;
    width: 132px !important;
    border-radius: 10px !important;
}

.book-cart-button {
    height: 48px !important;
    min-width: 210px;
    border-radius: 10px !important;
    font-size: 0.9375rem !important;
}

/* KİTAP BİLGİLERİ */
.book-meta-grid {
    margin: 0 0 22px;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.book-meta-grid > div {
    min-height: 30px;
    padding-bottom: 0 !important;
}

/* KİTAP AÇIKLAMASI STİLLERİ */
.book-description {
    margin-top: 0;
}

.book-description h2 {
    margin: 0 0 7px;
    font-size: 1.5rem;
    line-height: 1.3;
}

.book-description-content {
    margin-top: 0 !important;
    font-size: 1rem;
    line-height: 1.75;
    max-width: 100%;
}

/* KÜÇÜK MASAÜSTÜ VE TABLET */
@media (max-width: 1100px) {
    .book-detail-layout {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 32px;
    }

    .book-detail-cover-image {
        height: 430px;
    }

    .book-detail-cover-placeholder {
        height: 430px;
        width: 285px;
    }

    .book-title-block {
        padding-right: 230px;
    }

    .book-rating-summary {
        gap: 8px;
    }

    .book-cart-button {
        min-width: 175px;
    }
}

@media (max-width: 900px) {
    .book-detail-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .book-detail-cover-column {
        max-width: 360px;
        margin: 0 auto;
    }

    .book-detail-info-column {
        max-width: none;
    }

    .book-heading-wrap {
        min-height: auto;
    }

    .book-title-block {
        padding-right: 0;
    }

    .book-rating-summary {
        position: static !important;
        margin-top: 14px;
    }
}

/* MOBİL KİTAP DETAYI */
@media (max-width: 767px) {
    .book-detail-layout {
        gap: 22px !important;
    }

    .book-detail-cover-column {
        width: 100%;
        max-width: 330px;
    }

    .book-detail-cover-box > div:first-child {
        padding: 16px 16px 14px !important;
    }

    .book-detail-cover-image {
        height: clamp(260px, 78vw, 330px) !important;
        max-width: 100%;
    }

    .book-detail-cover-placeholder {
        width: min(100%, 245px) !important;
        height: clamp(260px, 78vw, 330px) !important;
        padding: 18px !important;
    }

    .book-detail-info-column {
        min-width: 0;
    }

    .book-heading-wrap {
        margin-bottom: 18px;
    }

    .book-title-block h1 {
        font-size: clamp(23px, 6vw, 30px);
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .book-title-block .text-base {
        overflow-wrap: anywhere;
    }

    .book-rating-summary {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 12px;
    }

    .book-rating-summary .text-right {
        text-align: left !important;
    }

    .book-rating-summary .flex.items-baseline.justify-end {
        justify-content: flex-start;
    }

    .book-purchase-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .book-purchase-row .book-price-group {
        flex-wrap: wrap;
        gap: 8px;
    }

    .book-purchase-row .book-price {
        font-size: 1.8rem;
    }

    .book-purchase-row form {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .book-quantity-box {
        width: 116px !important;
        height: 46px !important;
        flex: 0 0 116px;
    }

    .book-cart-button {
        min-width: 0;
        height: 46px !important;
        flex: 1 1 auto;
        padding-right: 10px !important;
        padding-left: 10px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }

    /* KİTAP BİLGİLERİ */
    .book-meta-grid {
        margin-bottom: 0 !important;
        grid-template-columns: 1fr;
    }

    .book-meta-grid > div {
        gap: 10px;
        align-items: flex-start;
    }

    .book-meta-grid > div > span:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    /* YORUM MODALI */
    #comment-modal > .comment-modal-dialog {
        width: calc(100% - 24px);
        max-width: 32rem;
        max-height: calc(100dvh - 24px);
        margin: 12px;
        padding: 16px !important;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    #comment-modal-form .mt-5.flex.items-center.justify-end {
        flex-wrap: wrap;
    }

    /* ÜST KISIM VE SEKME ALANI ARASINDAKİ BOŞLUK */
    section.bg-zinc-50 > .mx-auto.max-w-7xl {
        padding-bottom: 10px !important;
    }

    section.bg-white > .mx-auto.max-w-7xl {
        padding-top: 0 !important;
    }

    /* ÜÇ SEKMEYİ MOBİL EKRANA SIĞDIR */
    .book-tabs-nav {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .book-tabs-nav > .book-tab {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 14px 1px !important;
        box-sizing: border-box !important;
        font-size: clamp(10px, 3vw, 13px) !important;
        line-height: 1.3 !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    .book-tabs-nav > .book-tab span {
        flex-shrink: 0 !important;
        margin-left: 2px !important;
        font-size: 9px !important;
    }

    .book-tabs-nav + * {
        min-width: 0;
    }
}

/* ÇOK DAR TELEFONLAR */
@media (max-width: 380px) {
    .book-detail-cover-image,
    .book-detail-cover-placeholder {
        height: 250px !important;
    }

    .book-quantity-box {
        width: 104px !important;
        flex-basis: 104px;
    }

    .book-cart-button {
        gap: 5px;
        font-size: 12px !important;
    }
}

@media (max-width: 360px) {
    .book-tabs-nav > .book-tab {
        padding-right: 0 !important;
        padding-left: 0 !important;
        font-size: 10px !important;
    }

    .book-tabs-nav > .book-tab span {
        font-size: 8px !important;
    }
}

/* KÜNYE ALTINDA KISA KİTAP AÇIKLAMASI */
.book-description-preview {
    overflow-wrap: anywhere;
}

/* Kitap Hakkında kartını sekme başlıklarıyla aynı sol hizada tut */
.book-tabs-content-wrap {
    width: 100%;
    min-width: 0;
}
.book-tabs-content-wrap .book-tab-content > div {
    width: 100%;
    min-width: 0;
}
