/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 20px 0;
}

/* Tablet: 3-column grid (3+3 split) */
@media (max-width: 1199px) {
    .category-filters {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .filter-tag {
        text-align: center;
        justify-content: center;
        min-width: auto;
    }
}

/* Mobile: 2-column grid */
@media (max-width: 767px) {
    .category-filters {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .filter-tag {
        padding: 10px 12px;
    }
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #06473C;
    border-radius: 25px;
    font-size: 14px;
    color: #06473C;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    min-width: fit-content;
    white-space: nowrap;
}

.filter-tag:hover {
    background-color: #f8f9fa;
    border-color: #06473C;
}

.filter-tag.active {
    background-color: #06473C;
    border-color: #06473C;
    color: white;
    font-weight: 600;
    position: relative;
    padding-right: 32px;
}

.filter-tag.active::after {
    content: "×";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    display: block;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
}

.filter-tag.active::after {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* Progress bar animations and alignment */
.progress-bar {
    width: 0%;
    transition: width 1.5s ease-out;
}

.progress-bar.animate {
    width: attr(data-width);
}

/* Align progress bars to the top */
.progress {
    margin-bottom: 0;
    vertical-align: top;
}

.progress .progress-bar {
    vertical-align: top;
    height: 100%;
}

/* Ensure progress container is top-aligned */
.rating .col-5.my-auto {
    align-self: flex-start;
    margin-top: 0;
}

/* New review enter animation: expand height then fade in */
@keyframes reviewExpand {
    from { max-height: 0; overflow: hidden; }
    to   { max-height: 1500px; overflow: hidden; }
}

@keyframes reviewFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.review-enter {
    opacity: 0;
    animation:
        reviewExpand 0.4s ease-out forwards,
        reviewFadeIn 0.35s ease-out 0.25s forwards;
}

/* Rating overview link styling */
.rating-overview a {
    color: #191919!important;
    text-decoration: underline!important;
}

.rating-overview a:hover {
    color: #191919!important;
    text-decoration: underline!important;
}