body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.spinner {
    display: none; /* Hidden by default */
    width: 40px;
    height: 40px;
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid #3498db; /* Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 50px auto; /* Center the spinner horizontally */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.sidebar {
    width: 250px;
    background-color: #ecf0f1;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar button {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: none;
    background-color: #bdc3c7;
    color: #2c3e50;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
}

.sidebar button i {
    margin-right: 0.5rem;
}

.sidebar button:hover {
    background-color: #3498db;
    color: white;
}

.sidebar button.sale {
    background-color: #e74c3c;
    color: white;
}

.sidebar button.sale:hover {
    background-color: #c0392b;
}

.category-dropdown {
    display: none;
    width: 100%;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #ecf0f1;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-dropdown select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background-color: #bdc3c7;
    color: #2c3e50;
    padding: 10px;
}

.main-content {
    flex: 1;
    padding: 1rem;
}

.documents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.document {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-left: 20px;
    margin-top:10px;
}

.document:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.document img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.document-info {
    margin-top: 1rem;
    text-align: left;
}

.document-info h2 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.document-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.document-details p {
    margin: 0;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    font-size: 12px;
}

.document-details p i {
    margin-right: 0.5rem;
    color: #2c3e50;
}

.download-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.download-button:hover {
    background-color: #2980b9;
}

.show-more-button {
    display: block;
    padding: 0.75rem;
    margin: 1rem auto; /* Center the button horizontally */
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 200px; /* Set a specific width for better alignment */
}

.show-more-button:hover {
    background-color: #2980b9;
}

.cart a {
    text-decoration: none;
    color: white;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.cart a i {
    margin-right: 0.5rem;
}

.cart a:hover {
    color: #3498db;
}

@media (max-width: 768px) {
    .show-more-button {
        margin-left: 50%;
    }

    .container {
        flex-direction: column;
        padding: 0 1rem;
    }

    .sidebar {
        display: none;
    }

    .category-dropdown {
        display: block;
    }

    main {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
        order: -1;
    }

    input[type="checkbox"] {
        display: none;
    }

    input[type="checkbox"]:checked + nav {
        display: flex;
    }

    .download-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
