/* 图书专栏页面样式 */

/* 主要内容区域 */
.books-main {
    background: #f8f9fa;
    margin-top: 20px;
    padding-top: 20px;
}

/* 轮播图区域 */
.books-banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: #333;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
}

.slide-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.slide-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #D42A3C;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 42, 60, 0.3);
}

.slide-btn:hover {
    background: #B8222E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 42, 60, 0.4);
}

/* 轮播导航点 */
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: #fff;
    transform: scale(1.2);
}

/* 轮播箭头 */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-arrow:hover {
    background: rgba(212, 42, 60, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

/* 图书分类导航 */
.books-categories {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.categories-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.categories-container h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 25px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.category-tab:hover,
.category-tab.active {
    background: #D42A3C;
    color: #fff;
    border-color: #D42A3C;
    transform: translateY(-2px);
}

/* 图书展示区域 */
.books-section {
    padding: 50px 0;
}

.books-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 精选图书 */
.featured-books {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.book-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.featured-large {
    display: flex;
    align-items: stretch;
}

.book-image {
    flex: 0 0 200px;
    position: relative;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF5722;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.book-info {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.book-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.book-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.feature-tag {
    background: #E3F2FD;
    color: #1976D2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.book-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 24px;
    color: #D42A3C;
    font-weight: 700;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.book-actions {
    display: flex;
    gap: 10px;
}

.book-actions .btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

/* 更多图书 */
.more-books {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.more-books h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.book-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.book-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #D42A3C;
}

.book-cover {
    height: 180px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-item:hover .book-cover img {
    transform: scale(1.05);
}

.book-details {
    padding: 15px;
}

.book-details h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-author {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.stars {
    color: #FFB400;
    font-size: 14px;
}

.rating-text {
    font-size: 12px;
    color: #666;
}

.book-price-small {
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-price-small .price {
    font-size: 18px;
    color: #D42A3C;
    font-weight: 700;
}

.book-price-small .original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* 图书操作按钮 */
.book-details .book-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.book-details .btn-small {
    flex: 1;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.book-details .btn-primary {
    background: #D42A3C;
    color: #fff;
}

.book-details .btn-primary:hover {
    background: #B8222E;
    transform: translateY(-1px);
}

.book-details .btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.book-details .btn-secondary:hover {
    background: #e9ecef;
    color: #333;
    border-color: #adb5bd;
}

/* 购买保障 */
.purchase-guarantee {
    background: #fff;
    padding: 50px 0;
    margin-top: 30px;
}

.guarantee-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.guarantee-container h3 {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 600;
}

.guarantee-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.guarantee-item {
    text-align: center;
    padding: 20px;
}

.guarantee-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.guarantee-item h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.guarantee-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 分类筛选效果 */
.book-item.hide {
    display: none;
}

.book-item.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}