:root {
    --primary-color: #4CAF50; /* Green */
    --accent-color: #FF5722; /* Coral */
    --background-color: #F9F9F9; /* Light background */
    --card-background: #FFFFFF; /* White for cards */
    --text-color: #333333; /* Dark text */
    --border-radius: 8px;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-image: url('https://i.ibb.co/FLFSTL9t/Unknown-2.png');
    background-size: cover; /* Ensures the image covers the entire header */
    background-position: center; /* Center the image */
    color: white; /* Change text color for better visibility */
    padding: 20px; /* Add padding for spacing */
    text-align: center; /* Center the text */
    box-shadow: var(--shadow);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    flex-direction: column; /* Stack filters and export button */
    align-items: center; /* Center items horizontally */
    margin-top: 1rem; /* Space above the filters */
}

.search-container {
    text-align: center; /* Center the search bar */
    margin-bottom: 1rem; /* Space below the search bar */
    width: 100%; /* Ensure the container takes full width */
    max-width: 600px; /* Match the maximum width of the filters */
    margin: 0 auto; /* Center the container */
}

#search {
    width: 100%; /* Set width to 100% to match the container */
    max-width: 600px; /* Set a maximum width for better control */
    padding: 0.5rem; /* Keep the padding for better appearance */
    border: 1px solid #ccc; /* Add a border */
    border-radius: var(--border-radius); /* Use your existing border radius variable */
    font-size: 1rem; /* Adjust font size */
}

.filter-dropdowns {
    display: flex; /* Keep filters in one line */
    gap: 1rem; /* Space between filters */
    margin-bottom: 1rem; /* Space below the filters */
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: white;
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.dropdown-content {
    display: none; /* Hide by default */
    position: absolute; /* Position it below the button */
    background-color: white; /* Background color */
    min-width: 160px; /* Minimum width */
    z-index: 1; /* Ensure it appears above other elements */
}

.dropdown-content.show {
    display: block; /* Show when active */
}

/* Add this to prevent dropdown from closing when hovering checkboxes */
.dropdown-content:hover {
    display: block;
}

.dropdown-content label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: black; /* Change text color to black */
}

.dropdown-content label:hover {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
}

.dropdown-content input[type="checkbox"] {
    margin-right: 0.5rem;
}

main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.flower-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.flower-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}

.flower-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.flower-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.flower-info {
    width: 100%; /* Ensure flower info takes full width */
}

.flower-details {
    width: 100%; /* Full width for the table */
    border-collapse: collapse; /* Collapse borders */
    margin: 0 auto; /* Center the table */
}

.flower-details td {
    padding: 8px; /* Padding for table cells */
    border: none; /* No border for table cells */
    text-align: left; /* Align text to the left */
    white-space: nowrap; /* Prevent line breaks within cells */
}

.flower-details td:first-child {
    font-weight: bold; /* Bold for labels */
}

.flower-details td:last-child {
    text-align: right; /* Align the value to the right */
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
}

@media (max-width: 1024px) {
    .flower-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .filter-dropdowns {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dropdown {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    .flower-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .filters {
        padding: 0;
    }

    .search-container {
        padding: 0 1rem;
    }

    #search {
        font-size: 0.9rem;
    }

    .dropbtn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .flower-info {
        padding: 1rem;
    }

    .flower-info h2 {
        font-size: 1.2rem;
    }

    .flower-details {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .flower-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .filter-dropdowns {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .dropdown {
        width: 100%;
    }

    .dropbtn {
        width: 100%;
    }

    .dropdown-content {
        width: 100%;
        left: 0;
    }

    .flower-card img {
        height: 200px;
    }

    #export-pdf {
        width: 100%;
        margin: 1rem 0;
        padding: 0.7rem;
    }

    .search-container {
        margin-bottom: 1rem;
    }
}

.logo {
    max-width: 150px; /* Adjust size as needed */
    display: block;
    margin: 0 auto 1rem; /* Center the logo */
}

.export-container {
    text-align: center; /* Center the export button */
}

#export-pdf, .language-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--shadow);
    margin: 0.5rem;
}

#export-pdf:hover, .language-btn:hover {
    background-color: var(--accent-color);
}

.favorite-container {
    text-align: right; /* Align the button to the right */
    padding: 0.5rem;
}

.favorite-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background-color: var(--primary-color);
    color: white;
}