/* Customer Interface Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* PDF Viewer Modal Styles */
.modal-fullscreen .modal-content {
    border-radius: 0;
    border: none;
}

.modal-fullscreen .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.modal-fullscreen .modal-footer {
    border-top: 1px solid #dee2e6;
    position: sticky;
    bottom: 0;
    z-index: 1050;
    background-color: var(--light-color);
}

#pdfViewer {
    background-color: #525659;
    border: none;
}

#pdfLoader {
    background-color: #f8f9fa;
    color: #6c757d;
}

#pdfLoader .spinner-border {
    width: 3rem;
    height: 3rem;
}

.pdf-error {
    background-color: #f8f9fa;
    padding: 2rem;
    margin: 2rem;
    border-radius: 10px;
    border: 1px solid #dc3545;
}

/* Navigation Styles */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar .input-group {
    min-width: 300px;
}

@media (max-width: 768px) {
    .navbar .input-group {
        min-width: 250px;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile-specific PDF viewer adjustments */
    .modal-fullscreen .modal-header h5 {
        font-size: 1rem;
    }
    
    .modal-fullscreen .modal-footer {
        padding: 0.5rem;
    }
    
    .modal-fullscreen .modal-footer .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        margin: 0.125rem;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4757ff 100%);
    color: white;
    padding: 4rem 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
}

/* Featured Books Slider */
.featured-slider {
    background-color: var(--light-color);
    padding: 3rem 0;
}

.book-slider .carousel-item {
    padding: 0 15px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.slider-controls:hover {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.slider-controls.prev {
    left: -25px;
}

.slider-controls.next {
    right: -25px;
}

/* Book Card Styles */
.book-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .card-img-top {
    transform: scale(1.05);
}

.book-card .card-body {
    padding: 1.5rem;
}

.book-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    height: 2.2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-card .card-text {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.book-card .book-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.book-card .price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.book-card .price {
    font-weight: 600;
    color: var(--success-color);
}

.book-card .price-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.book-card .btn-group-vertical .btn {
    border-radius: 0;
    font-size: 0.85rem;
}

.book-card .btn-group-vertical .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.book-card .btn-group-vertical .btn:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Category Badge */
.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Search and Filter Section */
.search-filter-section {
    background-color: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-buttons .btn {
    margin: 0.25rem;
    border-radius: 25px;
}

.filter-buttons .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Book Detail Page */
.book-detail-section {
    padding: 3rem 0;
}

.book-detail-image {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-detail-info h1 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.book-detail-info .author {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.book-detail-info .price-display {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.book-detail-info .price-display h4 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.book-detail-info .book-tags {
    margin: 1.5rem 0;
}

.book-detail-info .book-tags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Enhanced button styling for view-free-sample */
.view-free-sample {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.view-free-sample:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(25, 135, 84, 0.3);
}

.view-free-sample:active {
    transform: translateY(0);
}

/* Order Form */
.order-form {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.order-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.order-form .form-label {
    font-weight: 600;
    color: var(--dark-color);
}

.order-form .btn-primary {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 25px;
}

/* Order Confirmation */
.order-confirmation {
    background-color: var(--success-color);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin: 2rem 0;
}

.order-confirmation h2 {
    margin-bottom: 1rem;
}

.order-confirmation .order-details {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: left;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
}

.loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .book-card .card-img-top {
        height: 200px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .featured-slider {
        padding: 2rem 0;
    }
    
    .slider-controls {
        display: none;
    }
    
    .book-detail-section {
        padding: 2rem 0;
    }
    
    .order-form {
        padding: 1.5rem;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .book-card .card-body {
        padding: 1rem;
    }
    
    .book-card .price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
}

/* Utility Classes */
.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-truncate-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.border-primary-light {
    border-color: rgba(13, 110, 253, 0.25) !important;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-up.delay-1 {
    animation-delay: 0.1s;
}

.fade-in-up.delay-2 {
    animation-delay: 0.2s;
}

.fade-in-up.delay-3 {
    animation-delay: 0.3s;
}