.filter-section {
    margin: 20px 0;
    background-color: #ececec;
    padding: 20px;
    border-radius: 10px;
}

.filter-section label {
    margin-right: 10px;
}

#filters-container {
    background-color: #f9f9f9; /* Light gray background */
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for a professional look */
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

#filters-container.collapse {
    display: none;
}


.filter-controls{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.filter-toggle {
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
}

.filter-toggle i {
    transition: font-size 0.3s ease;
}

.filter-toggle.collapsed i {
    transform: rotate(90deg);
}


.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.selected-filters span {
    display: inline-block;
    background-color: #837e7e70;
    color: black;
    padding: 5px 10px;
    border-radius: 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 2px solid #3d3b3b;
    cursor: pointer;
}

.filter-tag {
    display: inline-block;
    background-color: #f4f4f4;
    color: black;
    padding: 5px 10px;
    border-radius: 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 2px solid #3d3b3b;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.filter-tag.selected {
    background-color: #3d3b3b;
    color: white;
}

#selected-filters span {
    display: inline-block;
    background-color: #3d3b3b;
    color: white;
    padding: 3px 7px;
    border-radius: 8px;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 2px solid #3d3b3b;
    font-size: 0.9em;
}


.product-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    width: calc(25% - 20px); /* Changed from 33.333% to 25% */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Added to contain the image */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensure the name stays at the bottom */
}

.product-card img {
    scale: 0.95;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.product-card h3 {
    margin: 0;
    padding: 10px;
    text-align: center;
    background: #f4f4f4;
    font: 1.2em 'Oswald', sans-serif;
}

.product-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.product-card:hover img {
    transform: scale(1.1);
}

.image-container {
    width: 100%;
    height: 300px; /* Set a fixed height for the image container */
    background-color: white; /* Fill the remaining space with white */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.centered-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
}

.section-title {
    font: 'LatoTR-Bold' sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.external-link-icon {
    font-size: 12px;
    color: black;
    vertical-align: top;
}

.product-section-title {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    font-size: 1.8em;
    font-weight: bold;
}

#products-portfolio-placeholder {
    margin: 10px 0;
    background: url(/assets/images/topography.png);
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .product-card {
        width: calc(50% - 20px); /* 2 cards per row on small screens */
    }
}

@media (min-width: 768px) {
    .product-card {
        width: calc(33.333% - 20px); /* 3 cards per row on medium screens */
    }
}

@media (min-width: 992px) {
    .product-card {
        width: calc(25% - 20px); /* 4 cards per row on large screens */
    }
}