.book-details-page {
    background: #fff;
    color: #252b2d;
    font-family: var(--font-sans);
}

.book-details-container { max-width: 1280px; }
.book-details-main-section { padding: 24px 0 72px; }

.book-breadcrumbs {
    display: flex;
    gap: 9px;
    overflow: hidden;
    margin-bottom: 38px;
    color: var(--color-muted);
    font-size: 12px;
    white-space: nowrap;
}

.book-breadcrumbs a { color: var(--color-primary-dark); font-weight: 700; }
.book-breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }

.book-details-product-grid {
    display: grid;
    grid-template-columns: minmax(190px, 250px) minmax(0, 1fr) minmax(250px, 315px);
    align-items: stretch;
    gap: clamp(28px, 4vw, 54px);
}

.book-details-left-column,
.book-details-center-column,
.book-details-right-column { min-width: 0; }

.book-details-left-sticky,
.book-purchase-panel {
    position: sticky;
    top: 98px;
}

.book-details-cover {
    display: flex;
    justify-content: center;
}

.book-details-cover img {
    display: block;
    width: min(100%, 238px);
    height: auto;
    max-height: 390px;
    object-fit: contain;
    filter: drop-shadow(0 16px 20px rgba(24, 45, 50, .16));
}

.book-share {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(17, 87, 94, .15);
}

.book-share-trigger {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(8, 127, 136, .28);
    border-radius: 50%;
    background: #fff;
    color: #087f88;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.book-share-trigger:hover,
.book-share-trigger[aria-expanded="true"] {
    border-color: #087f88;
    background: #f2fbfb;
    box-shadow: 0 8px 20px rgba(17, 87, 94, .14);
    transform: translateY(-1px);
}

.book-share-trigger svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.book-share-menu {
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    padding: 8px;
    border: 1px solid rgba(17, 87, 94, .18);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(24, 45, 50, .16);
    transform: translateX(-50%);
}

.book-share-menu[hidden] { display: none; }

.book-share-option {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef7f7;
    color: #087f88;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.book-share-option:hover,
.book-share-option:focus-visible {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(24, 45, 50, .16);
}

.book-share-option--whatsapp:hover,
.book-share-option--whatsapp:focus-visible {
    background: #25d366;
    color: #fff;
}

.book-share-option--viber:hover,
.book-share-option--viber:focus-visible {
    background: #7360f2;
    color: #fff;
}

.book-share-option--copy:hover,
.book-share-option--copy:focus-visible {
    background: #087f88;
    color: #fff;
}

.book-share-option svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.book-share-message {
    position: absolute;
    top: calc(100% + 205px);
    left: 50%;
    width: max-content;
    max-width: 210px;
    transform: translateX(-50%);
    color: #087f88;
    font-size: 12px;
    font-weight: 700;
}

.book-details-mobile-heading { display: none; }
.book-details-desktop-heading { padding-bottom: 22px; border-bottom: 1px solid rgba(17, 87, 94, .18); }
.book-details-category-line { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-bottom: 12px; }
.book-details-category-line a { color: #087f88; font-size: 14px; font-weight: 800; }

.book-details-desktop-heading h1,
.book-details-mobile-heading h1 {
    max-width: 760px;
    margin: 0 0 10px;
    color: #252b2d;
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 3.4vw, 3.8rem);
    font-weight: 650;
    letter-spacing: -.03em;
    line-height: 1.02;
}

.book-details-author-link { color: #087f88; font-size: 17px; font-weight: 800; }

.book-details-tabs { margin-top: 26px; }
.book-details-tab-list { display: flex; border-bottom: 1px solid #d8e0e1; }
.book-details-tab {
    position: relative;
    padding: 14px 20px 13px;
    border: 0;
    background: transparent;
    color: #68777a;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}
.book-details-tab.is-active { color: #252b2d; }
.book-details-tab.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: #087f88;
    content: "";
}

.book-details-tab-panel { padding: 18px 0 0; }
.book-details-lead { margin: 0 0 17px; color: #39494c; font-size: 16px; line-height: 1.7; }
.book-description-expandable { position: relative; max-height: 210px; overflow: hidden; transition: max-height .35s ease; }
.book-description-expandable.is-expanded { max-height: none; overflow: visible; }
.book-description-content { color: #354548; font-size: 16px; line-height: 1.78; }
.book-description-content > :first-child { margin-top: 0; }
.book-description-content > :last-child { margin-bottom: 0; }
.book-description-fade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 72px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 82%);
    pointer-events: none;
}
.book-description-expandable.is-expanded .book-description-fade { display: none; }
.book-description-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #087f88;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.book-product-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.book-product-table-row { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(0, 1.6fr); }
.book-product-table-row:nth-child(even) { background: #f4f6f7; }
.book-product-table-row > span { padding: 11px 16px; }
.book-product-table-header { background: #edf1f2 !important; font-weight: 850; }

.book-purchase-panel {
    padding: 22px;
    border: 1px solid #dde4e5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26, 50, 55, .09);
}
.book-price-label { display: block; margin-bottom: 7px; color: #536467; font-size: 12px; }
.book-old-price { display: block; margin-bottom: 3px; color: #748083; font-size: 14px; }
.book-current-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.book-current-price-row strong { font-size: clamp(1.8rem, 2.3vw, 2.35rem); line-height: 1; }
.price-discount-badge { padding: 7px 10px; border-radius: 999px; background: #c92720; color: #fff; font-size: 12px; font-weight: 850; }
.book-purchase-controls { display: grid; gap: 14px; margin-top: 24px; }
.quantity-selector label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 800; }
.quantity-control { display: grid; grid-template-columns: 38px 1fr 38px; border: 1px solid #d2dcde; border-radius: 4px; }
.quantity-control button,
.quantity-control input { min-height: 40px; border: 0; background: #fff; text-align: center; }
.quantity-control input { min-width: 0; border-right: 1px solid #e0e6e7; border-left: 1px solid #e0e6e7; }
.book-add-to-cart { width: 100%; min-height: 48px; justify-content: center; }
.book-delivery-information { display: grid; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #e1e6e7; }
.book-delivery-information div { display: grid; gap: 2px; }
.book-delivery-information strong { font-size: 13px; }
.book-delivery-information span { color: #6a787b; font-size: 11px; }

.book-author-section { padding: 54px 0; border-top: 1px solid rgba(17,87,94,.14); background: #f7f9f9; }
.book-author-disclosure { overflow: hidden; max-width: 920px; margin: 0 auto; border: 1px solid #dce4e5; border-radius: 10px; background: #fff; }
.book-author-disclosure-summary { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 18px; padding: 18px 22px; cursor: pointer; list-style: none; }
.book-author-disclosure-summary::-webkit-details-marker { display: none; }
.book-author-disclosure-image img { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.book-author-disclosure-heading { display: grid; gap: 4px; }
.book-author-disclosure-heading strong { font-family: var(--font-serif); font-size: 24px; }
.book-author-disclosure-body { padding: 0 22px 22px 112px; color: #405053; line-height: 1.7; }
.book-author-profile-link { color: #087f88; font-weight: 800; }

.book-set-recommendations { padding: 60px 0; }

@media (max-width: 1050px) {
    .book-details-product-grid { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); }
    .book-details-right-column { grid-column: 2; }
    .book-purchase-panel { position: static; margin-top: 24px; }
}

@media (max-width: 760px) {
    .book-details-main-section { padding: 18px 0 48px; }
    .book-breadcrumbs { margin-bottom: 22px; }
    .book-details-product-grid { display: flex; flex-direction: column; gap: 24px; }
    .book-details-mobile-heading { display: block; order: 1; }
    .book-details-left-column { order: 2; }
    .book-details-right-column { order: 3; }
    .book-details-center-column { order: 4; }
    .book-details-desktop-heading { display: none; }
    .book-details-left-sticky,
    .book-purchase-panel { position: static; }
    .book-details-cover img { width: min(72vw, 230px); max-height: none; }
    .book-share { width: max-content; margin: 18px auto 0; }
    .book-purchase-panel { margin-top: 0; padding: 18px; }
    .book-current-price-row { justify-content: center; }
    .book-price-label,
    .book-old-price { text-align: center; }
    .book-details-tabs { margin-top: 0; }
    .book-details-tab { flex: 1; padding-inline: 8px; }
    .book-details-tab-panel { padding-top: 16px; }
    .book-description-expandable { max-height: 190px; }
    .book-product-table-row { grid-template-columns: 1fr; }
    .book-product-table-row > span:first-child { padding-bottom: 2px; font-weight: 800; }
    .book-product-table-row > span:last-child { padding-top: 2px; }
    .book-author-section { padding: 36px 0; }
    .book-author-disclosure-summary { grid-template-columns: 58px 1fr auto; gap: 13px; padding: 15px; }
    .book-author-disclosure-image img { width: 58px; height: 58px; }
    .book-author-disclosure-heading strong { font-size: 20px; }
    .book-author-disclosure-body { padding: 0 15px 18px; }
}

/* Keep the full purchase CTA visible on book details on small screens.
   The global card rule hides .add-to-cart-text for compact book cards. */
@media (max-width: 760px) {
    .book-details-page .book-add-to-cart {
        display: inline-flex;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        padding: 11px 18px;
        gap: 8px;
    }

    .book-details-page .book-add-to-cart .add-to-cart-text {
        position: static;
        display: inline;
        width: auto;
        height: auto;
        padding: 0;
        overflow: visible;
        clip: auto;
        clip-path: none;
        border: 0;
        white-space: normal;
        font-size: 13px;
        line-height: 1.2;
    }
}
