/* Product: Biome Section — bio-tags swipers, ruler, stacked catalyst cards */

/* --- Bio Tags Row --- */

.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-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 */

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

.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 --- */

.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;
    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%);
}

/* --- Stacked Cards (vertical creative Swiper) --- */

.stacked-cards {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.stacked-cards > .swiper {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.stacked-cards .swiper:not(.swiper-initialized) .swiper-slide + .swiper-slide {
    display: none;
}

.stacked-cards:has(.swiper-initialized) {
    padding-top: 30px;
}

.stacked-cards .swiper-slide {
    overflow: hidden;
    will-change: transform, opacity;
}
