/* BookPreviewModal.css - Pixel-perfect replication of reference design */
/* BEM Naming: .book-modal__element--modifier */

:root {
    --amazon-red: #FF3300;
    --border-grey: #e7e7e7;
    --text-black: #111;
}

/* Block: Overlay (遮罩层) */
.book-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
}

/* Block: Modal Container (模态框主体) */
.book-modal__container {
    background-color: white;
    width: 920px;
    height: 540px;
    border-radius: 10px;
    position: relative;
    display: flex;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    box-sizing: border-box;
}

/* Element: Close Button (关闭按钮) */
.book-modal__close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 26px;
    height: 26px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #333;
    font-size: 16px;
    background: white;
    transition: opacity 0.2s;
}

.book-modal__close-btn:hover {
    opacity: 0.7;
}

/* Element: Left Panel (左侧封面展示区) */
.book-modal__left-panel {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 20px;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

/* Element: Main Image (主图) */
.book-modal__main-img {
    max-width: 100%;
    max-height: 440px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.15));
    transition: opacity 0.3s;
}

/* Element: Zoom Layer (放大细节层) */
.book-modal__zoom-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    display: none;
    z-index: 10;
    background-color: #fff;
    background-size: 250%;
}

/* Element: Right Panel (右侧信息区) */
.book-modal__right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-left: 35px;
    border-left: 1px solid #e7e7e7;
}

/* Element: Title (标题) */
.book-modal__title {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-black);
    margin: 0 0 15px 0;
    font-weight: 400;
}

/* Element: Thumbnail Grid (缩略图网格) */
.book-modal__thumbnail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    max-width: 380px;
}

/* Element: Thumbnail Box (缩略图容器) */
.book-modal__thumb-box {
    width: 48px;
    height: 48px;
    border: 1px solid #ddd;
    padding: 2px;
    cursor: pointer;
    box-sizing: border-box;
    background: white;
}

/* Modifier: Active State (激活状态) */
.book-modal__thumb-box--active {
    border-color: #e77600;
    box-shadow: 0 0 3px #e77600;
}

.book-modal__thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Element: Button Group (按钮组) */
.book-modal__button-group {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 10px;
}

/* Element: Buy Button (购买按钮) */
.book-modal__buy-btn {
    background-color: var(--amazon-red);
    color: white;
    text-align: center;
    padding: 14px 0;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: opacity 0.2s;
    display: block;
}

.book-modal__buy-btn:hover {
    opacity: 0.9;
}
