/* Book Detail Page Styles */
:root {
    --border-radius-pill: 50px;
    --animation-duration-normal: 0.3s;
    --animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    --hover-shadow: 0 15px 30px rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.1);
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    margin-bottom: 0;
    background-color: transparent;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: var(--primary-500);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "•";
    color: var(--text-tertiary);
}

/* Book Detail Sections */
.book-detail-page section {
    padding: 3rem 0;
}

.book-header {
    padding-bottom: 0;
}

/* Book Cover */
.book-cover-wrapper {
    position: relative;
    z-index: 1;
}

.book-cover-main {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    background: white;
    transition: var(--transition-smooth);
    margin-bottom: 1.5rem;
    height: 240px;
}

.book-cover-main img {
    height: 240px!important;
}

.book-cover-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    z-index: 2;
    pointer-events: none;
}

.book-cover-main img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.book-cover-main:hover {
    box-shadow: var(--hover-shadow);
}

.book-cover-main:hover img {
    transform: scale(1.03);
}

.book-thumbnails {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.book-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.book-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.book-thumbnail:hover img {
    transform: scale(1.1);
}

.book-thumbnail.active {
    border: 2px solid var(--primary-500);
}

/* Book Info */
.book-info {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.book-badges .badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-pill);
    font-weight: 500;
    font-size: 0.75rem;
}

.badge.category-badge {
    background-color: var(--primary-50);
    color: var(--primary-700);
}

.badge.discount-badge {
    background: linear-gradient(135deg, var(--error-500), var(--error-700));
    color: white;
}

.book-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.book-meta > div {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.book-meta i {
    color: var(--primary-500);
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.book-rating .stars {
    color: #ffc107;
    font-size: 1.25rem;
}

.rating-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.book-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.book-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(var(--primary-rgb), 0.03);
    border-radius: 12px;
}

.book-details .detail-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #1a1d2b;
    border-radius: var(--border-radius-pill);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.book-details .detail-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.book-details .detail-item i {
    color: var(--primary-500);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.book-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-tertiary);
    font-size: 1.25rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-700);
}

.book-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.book-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--border-radius-pill);
    transition: var(--transition-smooth);
}

.book-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border: none;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.book-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.book-actions .btn-outline-primary {
    border: 2px solid var(--primary-500);
    color: var(--primary-500);
}

.book-actions .btn-outline-primary:hover {
    background-color: var(--primary-500);
    color: white;
    transform: translateY(-3px);
}

/* Tabs Section */
.book-tabs-section {
    background-color: rgba(var(--primary-rgb), 0.02);
}

.nav-tabs {
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 1rem 1.5rem;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-tabs .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-500);
}

.nav-tabs .nav-link.active {
    color: var(--primary-700);
    background: transparent;
}

.nav-tabs .nav-link.active:after {
    transform: scaleX(1);
}

.tab-content {
    padding: 2rem;
    background: #1a1d2b;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-secondary);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px dashed rgba(var(--border-rgb), 0.2);
    transition: var(--transition-smooth);
}

.toc-item:hover {
    background-color: rgba(var(--primary-rgb), 0.03);
    transform: translateX(5px);
}

.toc-title {
    font-weight: 500;
    color: #fff!important;
}

.toc-page {
    color: #fff!important;
    font-size: 0.875rem;
}

/* Related Books */
.related-books-section {
    background-color: white;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: var(--border-radius-pill);
}

.related-book-card {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    background: white;
}

.related-book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.book-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-book-card:hover .book-image img {
    transform: scale(1.1);
}

.related-book-card .book-info {
    padding: 1.5rem;
}

.related-book-card .book-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.related-book-card .book-author {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.related-book-card .book-price {
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 1rem;
}

.related-book-card .btn {
    width: 100%;
}

/* Media Queries */
@media (max-width: 991.98px) {
    .book-title {
        font-size: 2rem;
    }
    
    .book-cover-wrapper {
        margin-bottom: 2rem;
    }
    
    .book-info {
        height: auto;
    }
}

@media (max-width: 767.98px) {
    .book-actions {
        flex-direction: column;
    }
    
    .book-actions .btn {
        width: 100%;
    }
    
    .book-detail-page section {
        padding: 2rem 0;
    }
}

/* Animation for Book Cover */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Global book detail link styles */
.book-detail-page a:hover {
  text-decoration: none !important;
}

/* Ensure icons are centered */
.book-detail-page i,
.book-meta i,
.book-details .detail-item i,
.book-actions .btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
} 