/* ==========================================================================
   Bengali Bookstore Details Page & Flipbook Modal Styles
   ========================================================================== */
.book-details-page-wrapper {
    background-color: #ffffff;
    font-family: inherit;
}

/* --- Left Cover & Badges --- */
.book-main-cover-section {
    max-width: 100%;
}

.book-main-cover-wrap {
    position: relative;
    display: inline-block;
    border-radius: 2px 6px 6px 2px;
    box-shadow: -4px 8px 22px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.book-main-cover-img {
    max-height: 350px;
    width: auto;
    max-width: 100%;
    border-radius: 2px 6px 6px 2px;
    object-fit: cover;
    display: block;
}

.book-main-spine {
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.26) 0%, rgba(255, 255, 255, 0.22) 25%, transparent 100%);
    border-radius: 2px 0 0 2px;
    pointer-events: none;
}

.book-main-edge {
    position: absolute;
    top: 2px;
    right: -3px;
    width: 3px;
    height: calc(100% - 4px);
    background: #cbd5e1;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

.book-details-discount-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 44px;
    height: 44px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.4);
    z-index: 10;
    line-height: 1;
}

.book-details-discount-badge .val {
    font-size: 13px;
    font-weight: 800;
}

.book-details-discount-badge .lbl {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-look-inside-link {
    color: #dc2626;
    background: #fef2f2;
    border: 1px dashed #f87171;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px !important;
}

.btn-look-inside-link:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #dc2626;
    transform: translateY(-1px);
}

.book-thumb-item {
    width: 48px;
    height: 64px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.book-thumb-item.active, .book-thumb-item:hover {
    border-color: #dc2626;
}

.book-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Center Metadata & Typography --- */
.book-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
}

.book-meta-lines {
    font-size: 14px;
    line-height: 1.8;
}

.meta-row {
    color: #475569;
}

.meta-label {
    color: #334155;
    font-weight: 500;
    margin-right: 4px;
}

.meta-link {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.meta-link:hover {
    text-decoration: underline;
    color: #b91c1c;
}

.meta-specs-row .meta-item {
    margin-right: 14px;
}

.book-short-desc p {
    font-size: 13.5px;
    line-height: 1.6;
}

/* --- Pricing Section --- */
.book-final-price {
    font-size: 24px;
    font-weight: 700;
    color: #dc2626;
}

.book-del-price {
    font-size: 16px;
    color: #94a3b8;
    text-decoration: line-through;
}

.book-discount-text {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
}

/* --- Variant Pills --- */
.book-variant-chips [class*="attribute-option-"] {
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex;
}

.book-variant-pill {
    padding: 5px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #334155;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
}

.book-variant-pill:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.dynamic-attribute-radio:checked + .book-variant-pill {
    border-color: #dc2626;
    background: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}

/* --- Order Button --- */
.btn-book-order-now {
    background: #dc2626;
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-book-order-now:hover {
    background: #b91c1c;
}

.btn-action-text {
    background: none;
    border: none;
    padding: 0;
    font-size: 13.5px;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px !important;
}

.btn-action-text:hover {
    color: #dc2626;
}

/* Utility Gap Classes */
.gap-1 { gap: 4px !important; }
.gap-1\.5, .gap-1-5 { gap: 6px !important; }
.gap-2 { gap: 8px !important; }
.gap-2\.5, .gap-2-5 { gap: 10px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }

/* --- Right Sidebar ("আরো দেখুন...") --- */
.book-sidebar-box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
}

.sidebar-heading {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.sidebar-all-link {
    color: #dc2626;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}

.sidebar-book-img {
    width: 50px;
    height: 70px;
    min-width: 50px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: block;
}

.sidebar-book-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 2px;
}

.sidebar-book-title a {
    color: #1e293b;
    text-decoration: none;
}

.sidebar-book-title a:hover {
    color: #dc2626;
}

.sidebar-book-author {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.sidebar-book-price {
    font-size: 13px;
    line-height: 1.2;
}

.sidebar-book-price .cur-price {
    font-size: 13.5px;
    font-weight: 700;
    color: #dc2626;
}

.sidebar-book-price .old-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

.sidebar-book-price .disc-txt {
    font-size: 11.5px;
    color: #dc2626;
}

/* --- Offer Card --- */
.book-offer-card {
    border: 1px solid #fee2e2;
    background: #fff5f5;
    border-left: 4px solid #dc2626;
}

.offer-badge-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

/* ==========================================================================
   LOOK INSIDE FLIPBOOK MODAL STYLES
   ========================================================================== */
/* ==========================================================================
   LOOK INSIDE FLIPBOOK MODAL STYLES (Clean Light Mode)
   ========================================================================== */
.flipbook-modal .modal-content {
    background: #ffffff !important;
    min-height: 80vh;
}

.flip-tool-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #ffffff;
    transition: all 0.15s ease;
    padding: 0;
}

.flip-tool-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.flipbook-viewport-body {
    min-height: 540px;
    height: 72vh;
    background: #f1f5f9;
    overflow: auto;
    position: relative;
    user-select: none;
}

.flipbook-stage-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
    transform-origin: center center;
    margin: auto;
}

.flipbook-book {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 4px;
}

/* Arrow Navigation Buttons */
.flipbook-arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.flipbook-arrow-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.25);
}

.flip-prev-btn { left: 18px; }
.flip-next-btn { right: 18px; }

/* Flipbook Pages Styling */
.flip-page {
    background-color: #ffffff;
    color: #1e293b;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    height: 100%;
    width: 100%;
}

.flip-page canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

/* Hard Page Cover */
.flip-page.--hard {
    background-color: #f8fafc;
}

.flip-page.--hard-back {
    background-color: #f8fafc;
}

.flip-page-inner {
    padding: 30px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.75;
}

.flip-page-cover-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.flip-page-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Page Header and Footer */
.flip-page-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 6px;
    margin-bottom: 14px;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
}

.flip-page-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
    margin-top: auto;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

/* Dotted TOC Row (Matching Reference Screenshot) */
.flip-toc-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #0f172a;
    font-family: inherit;
}

.flip-toc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flip-toc-item {
    display: flex;
    align-items: baseline;
    font-size: 13.5px;
    color: #1e293b;
}

.flip-toc-name {
    font-weight: 500;
    white-space: nowrap;
}

.flip-toc-dots {
    flex-grow: 1;
    border-bottom: 1px dotted #94a3b8;
    margin: 0 6px;
    min-width: 10px;
}

.flip-toc-page {
    font-weight: 600;
    color: #475569;
}

/* Page Spine Gradient */
.flip-page:nth-child(odd) {
    box-shadow: inset 18px 0 20px -15px rgba(0, 0, 0, 0.12);
}

.flip-page:nth-child(even) {
    box-shadow: inset -18px 0 20px -15px rgba(0, 0, 0, 0.12);
}

@media (max-width: 767.98px) {
    .flipbook-viewport-body {
        min-height: 420px;
        height: 65vh;
    }
    .flip-prev-btn { left: 6px; }
    .flip-next-btn { right: 6px; }
    .flipbook-arrow-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    .book-page-title {
        font-size: 20px;
    }
    .book-final-price {
        font-size: 20px;
    }
    .book-main-cover-img {
        max-height: 260px;
    }
}
