/* BIO TAGS */

.bio-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.bio-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 200px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.bio-tag.outline {
    border: 1px solid var(--color-dark-sand);
    color: var(--color-dark-sand);
}

.bio-tag.solid {
    background-color: #675f53;
    color: var(--color-sand);
    padding-left: 15px;
}

.bio-tag-icon {
    display: flex;
    align-items: center;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    color: var(--color-orange);
}

.bio-tag-icon svg {
    width: 100%;
    height: 100%;
}

.bio-tags.white .bio-tag.outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-sand);
}

.bio-tags.white .bio-tag.solid {
    background-color: var(--color-sand);
    color: var(--color-dark-sand);
}



/* Bio Tags Overflow */

.bio-tags-more {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.bio-tags-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--color-sand);
    cursor: pointer;
    font-family: "Founders Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    z-index: 3;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.bio-tags-toggle:hover,
.bio-tags-more.is-open .bio-tags-toggle {
    background-color: var(--color-sand);
    color: var(--color-dark-sand);
}

.bio-tags-toggle-count {
    position: absolute;
    bottom: -4px;
    right: -6px;
    background-color: var(--color-orange);
    color: var(--color-sand);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 5px;
    pointer-events: none;
}

.bio-tags.white .bio-tag.outline.small {
    font-size: 12px;
    padding: 9px 14px;
    gap: 6px;
    border: 0px;
    background: rgba(255, 255, 255, 0.1);
}

.bio-tags-popover-inner .bio-tag.outline.small {
    font-size: 11px;
    padding: 8px 12px;
    gap: 6px;
    border: 0px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-sand);
    text-transform: uppercase;
}

.bio-tag.small .bio-tag-icon {
    width: 13px;
    height: 13px;
}

.bio-tag.small.solid {
    padding-left: 10px;
}

/* Popover: mãe anima max-height, filha tem o estilo visual */

.bio-tags-popover {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom center;
    padding-top: 10px;
    width: clamp(300px, 28cqi, 450px);
    max-width: calc(100cqi - 24px);
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items:stretch;
    justify-content: flex-end;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 2;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.bio-tags-more:hover .bio-tags-popover {
    max-height: 250px;
    pointer-events: auto;
    opacity: 1;
}

.bio-tags-popover-inner {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    align-items:center;
    overflow-y: auto;
    padding: 14px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.42);
    border-radius: var(--border-radius-sm, 10px);
}

.bio-tags-popover-inner .bio-tag.solid {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-sand);
}

.bio-tags-popover-inner .bio-tag-icon {
    color: var(--color-orange);
}

/* Single-line mode (product biomes) */

.product-biomes .bio-tags-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    min-width: 0;
}

/* --- Categories Swiper --- */

.product-biomes .bio-tags-cats-wrap,
.product-biomes .bio-tags-line-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.product-biomes .bio-tags-cats-wrap::before,
.product-biomes .bio-tags-cats-wrap::after,
.product-biomes .bio-tags-line-wrap::before,
.product-biomes .bio-tags-line-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.product-biomes .bio-tags-cats-wrap::before,
.product-biomes .bio-tags-line-wrap::before {
    left: 0;
    background: linear-gradient(to right, var(--color-dark-sand), transparent);
}

.product-biomes .bio-tags-cats-wrap::after,
.product-biomes .bio-tags-line-wrap::after {
    right: 0;
    background: linear-gradient(to left, var(--color-dark-sand), transparent);
}

.product-biomes .bio-tags-cats-wrap.has-left::before,
.product-biomes .bio-tags-line-wrap.has-left::before,
.product-biomes .bio-tags-cats-wrap.has-right::after,
.product-biomes .bio-tags-line-wrap.has-right::after {
    opacity: 1;
}

.product-biomes .bio-tags-cats-swiper .swiper-slide,
.product-biomes .bio-tags-line-swiper .swiper-slide {
    width: auto;
}

/* Category pill */

.product-biomes .bio-tags-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.product-biomes .bio-tags-category .side-text-large {
    color: var(--color-sand);
    opacity: 0.6;
    line-height: 1;
    transition: opacity 0.15s ease-out;
}

.product-biomes .bio-tags-category:hover .side-text-large,
.product-biomes .bio-tags-category.is-active .side-text-large {
    opacity: 1;
}

.product-biomes .bio-tags-category-count {
    background-color: var(--color-sand);
    color: var(--color-dark-sand);
    font-family: "Founders Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 500;
    margin-top: 3px;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.product-biomes .bio-tags-category.is-active .bio-tags-category-count {
    background-color: var(--color-orange);
    color: var(--color-sand);
    opacity: 1.0;
}

.product-biomes .bio-tags-category:hover .bio-tags-category-count { opacity: 1.0; }

/* Tags line swiper — inactive groups dimmed; .is-active-group toggled in JS */

.product-biomes .bio-tags-line-swiper .swiper-slide {
    flex-shrink: 0;
    opacity: 0.3;
    transition: opacity 0.25s ease-out;
}

.product-biomes .bio-tags-line-swiper .swiper-slide.is-active-group {
    opacity: 1;
}

/* White context for tags (replaces .bio-tags.white that was removed) */

.product-biomes .bio-tags-line-swiper .bio-tag.outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-sand);
}

.product-biomes .bio-tags-line-swiper .bio-tag.solid {
    background-color: var(--color-sand);
    color: var(--color-dark-sand);
}

.product-biomes .bio-tags-line-swiper .bio-tag-icon {
    color: var(--color-orange);
}

/* Ruler scrubber — gap 0 with tags above */

.product-biomes .bio-tags-ruler {
    --bio-ruler-p: 0;
    width: 100%;
    min-width: 0;
    height: 28px;
    margin-top: -10px;
    position: relative;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.product-biomes .bio-tags-ruler:active,
.product-biomes .bio-tags-ruler.is-dragging {
    cursor: grabbing;
}

.product-biomes .bio-tags-ruler-frame {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.product-biomes .bio-tags-ruler-track {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.product-biomes .bio-tags-ruler-ticks {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 300%;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.12) 0 1px,
            transparent 1px 8px
        ) 0 100% / auto 46% repeat-x,
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.32) 0 1px,
            transparent 1px 48px
        ) 0 100% / auto 46% repeat-x;
    transform: translateX(calc(var(--bio-ruler-p) * -66.667%));
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.product-biomes .bio-tags-ruler.is-dragging .bio-tags-ruler-ticks {
    transition: none;
}

.product-biomes .bio-tags-ruler-center {
    display: none;
}

.product-biomes .bio-tags-ruler-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 56px;
    pointer-events: none;
    z-index: 3;
}

.product-biomes .bio-tags-ruler-fade--left {
    left: 0;
    background: linear-gradient(to right, var(--color-dark-sand) 0%, transparent 100%);
}

.product-biomes .bio-tags-ruler-fade--right {
    right: 0;
    background: linear-gradient(to left, var(--color-dark-sand) 0%, transparent 100%);
}
