
.filters {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: nowrap; /* prevent wrapping */
}

/* Prevent shrinking (important for scroll layout) */
.filters section {
    flex: 0 0 auto;
}

/* Keep buttons in single row */
.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Container */
.filters-container {
    background: #e9ecef;
    border-radius: 10px;
    padding: 16px 20px;
    position: relative;
}

/* Title */
.title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 12px;
    color: #1f2d3d;
}

/* Scroller wrapper */
.scroller {
    position: relative;
    display: flex;
    align-items: center;
}

/* Scroll area */
.mask {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mask::-webkit-scrollbar {
    display: none;
}

/* Hide arrows when not needed */
.scroller.hide-left .backward {
    opacity: 0;
    pointer-events: none;
}

.scroller.hide-right .forward {
    opacity: 0;
    pointer-events: none;
}

/* Smooth fade */
.backward,
.forward {
    transition: opacity 0.2s ease;
}

/* Inner content */
.scroller-inner {
    display: flex;
    gap: 24px;
    width: max-content; /* فقط داخل خودش اسکرول می‌خورد */
}

/* Sections */
.filters section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-title {
    font-size: 12px;
    font-weight: 600;
    color: #6c7a89;
    text-transform: uppercase;
}

/* Buttons group */
.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Price chips */
.price button {
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.price button:nth-child(1) {
    background: #7ccba2;
}

.price button:nth-child(2) {
    background: #8fd3c7;
}

.price button:nth-child(3) {
    background: #f4c363;
}

/* Type cards */
.type .buttons {
    gap: 12px;
}

.type button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #dce1e7;
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 110px;
    cursor: pointer;
    transition: 0.2s ease;
}

.type button:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.type img {
    width: 28px;
    height: 28px;
}

/* More button */
.type .more {
    font-weight: 500;
}

/* Rating chips */
.rating button {
    border: none;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.rating span {
    background: #2ecc71;
    color: #fff;
    border-radius: 6px;
    padding: 2px 6px;
    margin-left: 6px;
    font-size: 12px;
}

/* Different rating colors */
.rating button:nth-child(2) span {
    background: #27ae60;
}
.rating button:nth-child(3) span {
    background: #f39c12;
}

/* Arrows */
.backward,
.forward {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.backward {
    left: -10px;
}

.forward {
    right: -10px;
}

.arrow {
  position: relative;
  height: var(--bts-scroller-arrow-arrow-size, 2rem);
  width: var(--bts-scroller-arrow-arrow-size, 2rem);
  border-radius: 100%;
  background-image: var(--cosmos-scroller-arrow);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: var(--bts-scroller-arrow-arrow-background-size, auto 1rem);
  box-shadow: var(--bts-scroller-arrow-arrow-box-shadow-mobile, 0 .0625rem .375rem rgba(0, 34, 61, .2));
  background-color: var(--bts-scroller-arrow-arrow-background-color, var(--color-white));
}

/* Arrow icons */
.arrow::before {
    content: '›';
    font-size: 18px;
}

.backward .arrow::before {
    content: '‹';
}

/* Responsive */
@media (max-width: 768px) {
    .filters-container {
        padding: 12px;
    }

    .title {
        font-size: 16px;
    }

    .scroller-inner {
        gap: 16px;
    }

    .type button {
        min-width: 90px;
        padding: 8px;
        font-size: 12px;
    }

    .price button,
    .rating button {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .filter-title {
        font-size: 11px;
    }

    .type img {
        width: 22px;
        height: 22px;
    }

    .arrow {
        width: 30px;
        height: 30px;
    }
}

.rating-filter.active {
  background: #007bff;
  color: #fff;
}

.type .buttons button.active,
.rating .buttons button.active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}