﻿.category-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.category-container h1 {
    margin: 20px 0;
    font-size: 3rem;
    text-align: center;
}

.category-container .filter {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-bottom: 20px;
    align-items: center;
}

.filter button {
    outline: none;
    padding: 5px 10px;
    background-color: var(--main-bg-color);
    color: var(--main-txt-color);
    border: 1px solid var(--main-highlight-color);
    cursor: pointer;
    font-size: 10px;
}

button.active {
    background-color: var(--main-highlight-color);
    color: var(--main-bg-color);
}

.filter button:hover {
    background-color: var(--main-highlight-color);
    color: var(--main-bg-color);
}

.product-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.card {
    display: flex;
    flex-direction: column; /* Stack image and info vertically */
    justify-content: space-evenly; /* Distribute space between image and info */
    align-items: center;
    width: 20%; /* Take the full width of the parent */
    height: 100%; /* Take the full height of the parent */
    margin: 2.5%;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f8f8; /* Add a subtle background color */
    text-align: center; /* Center text for `card-info` */
    box-sizing: border-box; /* Ensure padding doesn’t overflow */
    cursor: pointer;
    background-color: var(--main-highlight-color);
}

.card:hover {
    opacity: 0.75;
}

.card img {
    width: 100%; /* Ensures the image fills the card width */
    height: 80%; /* Ensures the image fills the card height */
    object-fit: cover; /* Scales the image by ratio, cropping if necessary */
    border-radius: 10px 10px 0 0; /* Matches the card's top corners for a polished look */
}

.card-info {
    font-size: 14px; /* Slightly larger font for readability */
    line-height: 1.4; /* Add proper spacing between lines */
    color: #333;
    padding: 10px;
    background-color: var(--main-highlight-color);
    border-radius: 0 0 10px 10px;
    flex-grow: 1; /* Allow the info section to grow if needed */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: "SF Mono", Menlo, Consolas, Monaco;
    width: 100%;
}

.card-info label {
    font-weight: bold;
    text-align: left;
}

.card-info span {
    font-size: 10px;
    margin-top: 10px;
    text-align: left;
    letter-spacing: .1rem;
    font-weight: bold;
}

@media screen and (max-width: 1024px) {
    .card {
        width: 100%;
    }

    .category-container h1 {
        font-size: 2rem;
    }

    .category-container .filter {
        justify-content: center;
    }
}
