@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Open Sans", sans-serif;
}


::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}



.buy-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 45px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.search-bar .material-symbols-rounded {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-group input[type="radio"] {
    display: none;
}

.filter-group label {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group input[type="radio"]:checked + label {
    background: #00bcd4;
    border-color: #00bcd4;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.book-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-card .image-container {
    position: relative;
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.1);
}

.book-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card img.loaded {
    opacity: 1;
}

.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #00bcd4;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.book-info {
    padding: 15px;
    color: #fff;
    
    
}

.book-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.author {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.condition {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 10px;
}


.actions {
    display: flex;
    gap: 10px;
}

.buy-btn {
    flex: 1;
    padding: 10px;
    background: #00bcd4;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.buy-btn:hover {
    background: #0097a7;
}

.cart-btn {
    width: 42px;
    height: 38px;
    background: rgba(0, 188, 212, 0.2);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-btn:hover {
    background: #00bcd4;
}

/* Empty State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.no-results .material-symbols-rounded {
    font-size: 48px;
    margin-bottom: 15px;
}

.no-results h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    padding: 25px;
    color: #fff;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
}

.book-details {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
}

.modal-book-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.modal-book-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.modal-author {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.modal-condition {
    margin-bottom: 15px;
}


.modal-description {
    line-height: 1.6;
    margin-bottom: 25px;
    max-height: 150px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
}

.modal-description::-webkit-scrollbar {
    width: 8px;
    display: block;
}

.modal-description::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-description::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.purchase-details {
    text-align: center;
}

.purchase-details p {
    margin-bottom: 15px;
}

.purchase-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.confirm-btn {
    padding: 10px 25px;
    background: #00bcd4;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cancel-btn {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* Enhanced Modal Styles */
.modal-donation-type {
    font-size: 1.4rem;
    font-weight: 600;
    color: #00bcd4;
    margin-bottom: 20px;
}

.modal-return-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 10px;
}
.modal-security-amount {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.modal-actions {
    margin-top: 25px;
}

.request-btn {
    width: 100%;
    padding: 12px;
    background: #00bcd4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.request-btn:hover {
    background: #0097a7;
}

/* Remove any duplicate or unnecessary styles */
.modal-donation-info,
.donation-badge,
.return-date-info {
    display: none;
}

/* Updated Donation Info Styles */
.donation-info {
    background: rgba(0, 188, 212, 0.08);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.donation-type {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Remove these unnecessary styles */
.donation-info,
.return-date {
    display: none;
}

/* Request Form Styles */
.request-form {
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-actions button {
    flex: 1;
    padding: 12px;
}

@media (max-width: 768px) {
    .search-section {
        padding: 15px;
    }
    
    .filters {
        gap: 15px;
    }
    
    .filter-group label {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .books-grid {
        gap: 15px;
    }
    
    .book-details {
        grid-template-columns: 1fr;
    }
    
    .modal-book-image {
        height: 300px;
    }
}
