/* ── Toolbar wrapper (shop page) ── */
.shop-toolbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 10px 0 12px;
    border-bottom: 1px solid #f0f0f1;
    margin-bottom: 16px;
}

/* ── Toolbar (فیلتر / مرتب‌سازی / فقط موجود) ── */
.shop-toolbar-bar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 6px;
}

.shop-toolbar-bar::-webkit-scrollbar {
    display: none;
}

.shop-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #e0e0e6;
    background: #fff;
    color: #3f4064;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    text-decoration: none;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.shop-control:hover {
    border-color: #c5c7d4;
    color: #2b2d42;
    text-decoration: none;
}

.shop-control--action {
    min-width: 88px;
}

.shop-control--sort {
    flex: 1 1 180px;
    min-width: 150px;
    max-width: 260px;
    justify-content: space-between;
    padding-left: 12px;
    padding-right: 10px;
    cursor: default;
    margin: 0;
}

.shop-control__prefix {
    color: #81858b;
    font-size: 12px;
    font-weight: 600;
    flex: 0 0 auto;
}

.shop-control__select {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #3f4064;
    font-size: 13px;
    font-weight: 700;
    padding: 0 0 0 8px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2381858b' d='M1.4.7 6 5.3 10.6.7 12 2.1 6 8.1 0 2.1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 18px;
}

.shop-control--toggle.is-active {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.shop-control__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    flex: 0 0 auto;
}

.shop-control--toggle.is-active .shop-control__dot {
    background: #22c55e;
}

.main-content .toolbox.sticky-toolbox {
    padding: 10px 0 12px;
    border-bottom: 1px solid #f0f0f1;
    margin-bottom: 16px;
}

.main-content .toolbox.sticky-toolbox form {
    width: 100%;
    margin: 0;
}

.main-content .toolbox-left.shop-toolbar-actions {
    width: 100%;
}

.shop-toolbar-bar {
    width: 100%;
}

@media (max-width: 767px) {
    .shop-control {
        min-height: 42px;
        font-size: 12px;
        padding: 0 12px;
    }

    .shop-control--sort {
        min-width: 132px;
    }
}

/* ── Sidebar filters (Digikala-inspired) ── */
.dk-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.dk-filter-head__title {
    font-size: 15px;
    font-weight: 800;
    color: #3f4064;
}

.dk-filter-head__clear {
    font-size: 12px;
    font-weight: 700;
    color: #19bfd3;
    text-decoration: none;
}

.dk-filter-head__clear:hover {
    color: #0e9ab0;
    text-decoration: none;
}

.dk-filter-toggles {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f1;
}

.dk-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 8px 0;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f7;
}

.dk-switch-row:last-child {
    border-bottom: 0;
}

.dk-switch-row__label {
    font-size: 13px;
    font-weight: 700;
    color: #3f4064;
}

.dk-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
}

.dk-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dk-switch__slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #e0e0e6;
    transition: background 0.2s ease;
}

.dk-switch__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.dk-switch input:checked + .dk-switch__slider {
    background: #22c55e;
}

.dk-switch input:checked + .dk-switch__slider::before {
    transform: translateX(-20px);
}

.dk-filter-accordion {
    border-bottom: 1px solid #f0f0f1;
}

.dk-filter-accordion__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: #3f4064;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.dk-filter-accordion__head i {
    font-size: 12px;
    color: #a1a3a8;
    transition: transform 0.2s ease;
}

.dk-filter-accordion.is-open .dk-filter-accordion__head i {
    transform: rotate(180deg);
}

.dk-filter-accordion__body {
    display: none;
    padding-bottom: 14px;
}

.dk-filter-accordion.is-open .dk-filter-accordion__body {
    display: block;
}

.dk-price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dk-price-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.dk-price-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.dk-price-field__label {
    font-size: 12px;
    font-weight: 700;
    color: #81858b;
    margin: 0;
}

.dk-price-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #e0e0e6;
    background: #f9f9fb;
    color: #1a1c23;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-align: right;
    direction: ltr;
    appearance: textfield;
    -moz-appearance: textfield;
}

.dk-price-input::-webkit-outer-spin-button,
.dk-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dk-price-input:focus {
    outline: none;
    border-color: #c5c7d4;
    background: #fff;
}

.dk-price-range__sep {
    color: #a1a3a8;
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 auto;
}

.dk-filter-search {
    margin-bottom: 10px;
}

.dk-filter-search__input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e0e0e6;
    background: #f9f9fb;
    color: #3f4064;
    font-size: 12px;
    font-weight: 600;
}

.dk-filter-search__input:focus {
    outline: none;
    border-color: #c5c7d4;
    background: #fff;
}

.dk-filter-scroll-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.dk-filter-item {
    border-bottom: 1px solid #f5f5f7;
}

.dk-filter-item:last-child {
    border-bottom: 0;
}

.dk-filter-item.is-hidden {
    display: none;
}

.dk-filter-item__label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 0;
    margin: 0;
    cursor: pointer;
}

.dk-filter-item__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #3f4064;
    line-height: 1.5;
}

.dk-filter-item__meta {
    flex: 0 0 auto;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 500;
    color: #a1a3a8;
    direction: ltr;
    text-align: left;
}

.dk-filter-item__check {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #ef394e;
    cursor: pointer;
}

.dk-filter-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    background: #ef394e;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease;
}

.dk-filter-submit--top {
    margin-top: 0;
    margin-bottom: 12px;
}

.dk-filter-submit--bottom {
    margin-top: 16px;
    display: none;
}

.dk-filter-submit:hover {
    background: #e1213a;
}

/* Brand page toolbar */
.brand-detail-products__toolbar .shop-toolbar-bar {
    justify-content: flex-start;
}
