/* ══════════════════════════════════════════
   Books Page (books.html)
   ══════════════════════════════════════════ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    min-height: 100vh;
    padding: 0;
}

.main-content {
    padding: 40px 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.content {
    color: white;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
}

.description {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #e2e8f0;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .books {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }
}

/* ── Book Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: #f5f5f5;
    border-radius: 12px;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.modal-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Book card overrides inside modal */
.modal-book-card { display: none; }
.modal-container .book-card { margin: 0; }
.modal-container .book-card:hover { transform: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.modal-container .visit-store-btn {
    display: block;
    text-align: center;
    padding: 12px 24px;
    margin: 15px 2rem 2rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

.modal-container .visit-store-btn:hover {
    background: #2980b9;
}

/* ── Coming Soon / unavailable state ── */
.purchase-section.coming-soon .price-display {
    color: #7f8c8d;
}

.purchase-section.coming-soon .quantity-control {
    opacity: 0.5;
    pointer-events: none;
}

.purchase-section.coming-soon .total-amount {
    color: #7f8c8d;
    font-size: 1.2rem;
}

.purchase-section.coming-soon .add-to-cart-btn {
    background-color: #95a5a6;
    cursor: not-allowed;
}
