@media (max-width: 768px) {
  .suggestion { display: none !important; }
}
.catalog-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}
.catalog-toolbar__title { font-size: 23px; font-weight: 700; margin: 0; }
.catalog-toolbar__controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.catalog-toolbar__controls select { min-width: 140px; height: 37px; padding-left: 5px; font-size: 15px; }

#catalogGridRegion.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.filter__options-container {
  position: relative;
}
.filter__form--loading .filter__options-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.72);
  cursor: wait;
}
.filter__form--loading .filter__options-container::before {
  content: "Обновление фильтра…";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0c4a6e;
  background: #fff;
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.12);
  pointer-events: none;
  white-space: nowrap;
}

.pagination-container {
  margin: 20px 0;
  text-align: center;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
  padding: 4px 0;
}
.pagination-container::-webkit-scrollbar { display: none; }
.pagination-container { -ms-overflow-style: none; scrollbar-width: none; }

.pagination {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  min-width: fit-content;
}
.pagination__link {
  display: inline-block;
  padding: 8px 10px;
  min-width: 32px;
  height: 32px;
  line-height: 16px;
  text-align: center;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
  border-radius: 6px;
}
.pagination__link:hover:not(.pagination__link--disabled) {
  background: #0ea5e9;
  color: white;
  border-color: #0ea5e9;
}
.pagination__link--active {
  background: #1da1f2;
  color: white;
  border-color: #1da1f2;
  font-weight: bold;
}
.pagination__link--disabled { color: #aaa; cursor: not-allowed; background: #f9f9f9; }
.pagination__link--more {
  pointer-events: none;
  color: #777;
  background: #f0f0f0;
  border-color: #ddd;
  font-weight: bold;
}
@media (max-width: 480px) {
  .pagination__link { padding: 6px 8px; min-width: 26px; height: 28px; font-size: 12px; }
  .pagination-container { padding: 2px 0; }
}

.filter__stock-and-reset {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.filter__stock-checkboxes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.filter__stock-notice {
  flex: 1 1 100%;
  margin: 0 0 4px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: #0c4a6e;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.filter__options-param-stock { display: flex; align-items: center; gap: 6px; margin: 0; }
.filter__options-remove { padding: 8px 14px; border-radius: 6px; cursor: pointer; transition: background-color 0.2s; }
.filter__car-apply { padding: 8px 14px; border-radius: 6px; background: #0ea5e9; color: #fff; border: none; cursor: pointer; font-weight: 600; transition: background-color 0.2s; }
.filter__car-apply:hover:not(:disabled) { background: #0284c7; }
.filter__car-apply:disabled { opacity: 0.6; cursor: not-allowed; }
.suggestions-container { text-align: center; margin: 20px 0; }
.suggestions-title { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 12px; }
@media (max-width: 768px) {
  .suggestions-container { display: none !important; }
}
.filter__options-car-container--hidden { display: none; }
.suggestions-title { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 12px; }

.suggestion,
.suggestion--narrow { max-width: 65ch !important; }

.filter__options { margin-top: 0; padding-top: 20px; }
.filter__options--tight { margin-top: 0; padding-top: 0; }
.filter__options-row { display: flex; gap: 20px; flex-wrap: wrap; }
.filter__options-param { flex: 1; min-width: 200px; }
.filter__options-param.price { flex: 1; min-width: 260px; }
#price_display { margin-top: 6px; }
.product-sticker { aspect-ratio: 350/60; }

.filter-by-car--hidden { display: none !important; }
.product-card__add-to-cart-form.add-to-cart-form--hidden { display: none !important; }

/* Livechat widget (detail pages) */
.livechat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 320px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  display: none;
  z-index: 9999;
  overflow: hidden;
  font-size: 14px;
}
.livechat-widget.open { display: block; }
.livechat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f7f7f8;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}
.livechat-close { background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 6px; }
.livechat-messages { height: 320px; overflow: auto; padding: 10px; background: #fafafa; display: flex; flex-direction: column; gap: 8px; }
.livechat-msg { display: flex; }
.livechat-msg.client { justify-content: flex-end; }
.livechat-msg.operator { justify-content: flex-start; }
.livechat-msg .bubble { max-width: 80%; padding: 8px 10px; border-radius: 12px; background: #e9f2ff; }
.livechat-msg.client .bubble { background: #d1f7c4; }
.livechat-msg .bubble.pending { opacity: .6; }
.livechat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; background: #fff; }
.livechat-input input { flex: 1; border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.livechat-input button { background: #3b87f9; color: #fff; border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
@media (max-width: 480px) {
  .livechat-widget { right: 10px; left: 10px; width: auto; bottom: 10px; }
}
.product-card__image-container { position: relative; }
.product-page__params__image-wrapper .product-page__image { z-index: 1; }
.product-page__params__image-wrapper .product-page__brand-logo {
  position: absolute;
  left: 8px !important;
  top: 8px !important;
  z-index: 3;
}
.product-page__params__image-wrapper .product-page__params__label-type-container {
  position: absolute;
  top: 10px !important;
  left: auto !important;
  right: 8px !important;
  z-index: 3;
}
.product-stickers--detail {
  position: absolute;
  left: 0;
  top: 64px !important;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  padding: 2px 8px;
  pointer-events: none;
}
.product-stickers--detail .product-sticker { height: 32px; width: auto; object-fit: contain; aspect-ratio: 350/60; }
@media (max-width: 480px) {
  .product-stickers--detail .product-sticker { height: 24px; }
}
.btn-livechat {
  padding: 10px 22px;
  border-radius: 5px;
  background: #1da1f2;
  color: #fff;
  text-decoration: none;
  border: 0;
  margin-top: -19px;
  cursor: pointer;
  font-size: 18px;
}

.product-stickers { position: absolute; left: 0; top: 32px; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; padding: 2px 6px; pointer-events: none; }
.product-stickers__side { display: flex; gap: 6px; flex-wrap: wrap; }
.product-stickers__side--right { flex-direction: row-reverse; }
.product-sticker { width: auto; height: 24px; aspect-ratio: 350/60; object-fit: contain; display: block; }
@media (max-width: 480px) { .product-sticker { height: 20px; } }

/* Выносим "Опт" в заметную правую зону карточки */
.product-card__label-promotion-container--right {
    left: auto;
    right: 0;
    z-index: 6;
}
.product-card__label-promotion.wholesale {
    background-color: #177ddc;
    font-weight: 700;
}

.product-card__name--muted { opacity: .8; font-weight: 400; }
.product-page__params--narrow { max-width: 560px; }
.product-page__details-back { margin-top: 20px; }
/* 1. ����� ����� ������� (����� �����) */
#price_slider {
    background: #e5e7eb !important; /* ������-����� ��� */
    height: 6px !important;        /* ������� ����� */
    border: none !important;
    margin: 15px 0 -8px 0 !important;
    border-radius: 3px !important;
}

/* 2. ����� ������� ����� ���������� */
#price_slider .ui-slider-range {
    background: #0ea5e9 !important; /* ���� ��� � ������ �� ����� */
}

/* 3. ����� ����� ��� ��������� (����� ��������������) */
#price_slider .ui-slider-handle {
    width: 14px !important;        /* ������ �������� */
    height: 22px !important;       /* ������ �������� */
    top: -9px !important;          /* ���������� ������������ ������� */
    background: #fff !important;   /* ����� ������ */
    border: 2px solid #0ea5e9 !important; /* ����� ����� */
    border-radius: 3px !important;
    cursor: pointer !important;
    outline: none !important;
    transition: transform 0.1s;
}

/* 4. ����� ���������������� (����� �� ��������) */

/* ����� ��������: ��� ����� ���� ������ ��������� � ������ 0% */
#price_slider .ui-slider-handle:nth-of-type(1) {
    margin-left: 0 !important;
}

/* ������ ��������: �������� ��� ����� �� ��� ��� ������ (14px).
   ������ ��� 100% ��� ������ ���� ����� ����� �� ������� ������� */
#price_slider .ui-slider-handle:nth-of-type(2) {
    margin-left: -17px !important;
}

/* ����������� ���� ���� � ����� ������������� */

/* 1. ����������� ������ � ������ ��������, ����� �������� ��� �� ������� �������� ���� */
.filter__options-param.price #price_slider {
    margin-top: 25px !important; /* ��������� �������� (22px-28px), ����� ���� �������� ����� */
}

/* 2. ������� ���������� ����� (1000 - 25000) ����, ����� ��� �� ��������� �� ��������� */
#price_display {
    margin-top: 12px !important;
    color: #333;
    font-weight: 500;
	text-align: center;
}

/* 3. �� ��������� �����������, ���� ������ ��������������� � ���� �������, 
   ����� ������� ������ ����� ���� ������, ������� ������� ��� */
@media (max-width: 768px) {
    .filter__options-param.price #price_slider {
        margin-top: 15px !important;
    }
}

/* ��������� ������ ����� "�������������" �� �� */
@media (min-width: 992px) {
    /* ������� ����, � ������� ����� ���������� ������ ������������� */
    .filter__options-param:has(#manufacturer) {
        flex: 0 0 32% !important; /* ��������� ������������� � ������ ������������� ������ 250px */
    }
}

/* ����������� ������ ��� ��������� ��������� (�� 768px) */
@media (max-width: 768px) {
    
    /* --- ������ 1: ������, ������, ������� � ��� --- */
    .filter__options-param-container.active {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important; /* ��������� ������ ����� ��������� */
    }

    /* ����� ������ ��� li � ������ �� � ��� */
    .filter__options-param:nth-child(1),
    .filter__options-param:nth-child(2),
    .filter__options-param:nth-child(3) {
        flex: 1 !important; /* ����� ����� ������� */
        min-width: 0 !important; /* ��������� ����������� */
        margin-bottom: 0 !important;
    }

    /* ������ ������ ���� ������, ����� �� ������ */
    .filter__options-param label {
        font-size: 15px !important;
		margin-top: 10px;
    }
    .filter__options-param select {
        font-size: 14px !important;
        padding: 6px 2px !important;
    }

    /* ������������� � ���� �������� �� ����� ������� (�� ��� ������) */
    .filter__options-param:nth-child(n+4) {
        flex: 1 1 100% !important;
    }

    /* --- ������ 2: ��������� � ���������� � ��� --- */
    .catalog-toolbar {
        display: flex !important;
        flex-direction: row !important; /* ������������� � ��� */
        justify-content: space-between !important; /* �������� � ������ ������� */
        align-items: center !important;
        flex-wrap: nowrap !important;
        margin-top: 15px !important;
        gap: 10px;
    }

    .catalog-toolbar__title {
        font-size: 17px !important; /* ��������� ������, ����� ������ */
        margin: 0 !important;
        white-space: nowrap; /* ����� ����� �� ����������� */
    }

    .catalog-toolbar__controls {
        display: flex !important;
        align-items: center !important;
    }

    /* �������� ����� ���������� ������� �� ��������, ����� ���������� ����� ��� ���������� */
    .catalog-toolbar__controls label:last-child {
        display: none !important;
    }

    /* ��������� ��� ������ ����������, ����� �� �������� ��������� */
    #sortSelect {
        font-size: 14px !important;
        height: 30px !important;
        padding: 0 5px !important;
        min-width: 110px !important;
		border: 1px solid #707070;
    }
}

/* ������ � ������� */
/* ������������ ��������� � ���������� � ���� ������ �� �������� ������ (��) */
@media (min-width: 992px) {
    /* 1. ���������� ������ �� ���������� �������� � �������� ��� ������ */
    .catalog-toolbar {
        display: flex !important;
        flex-flow: row nowrap !important; /* ������ � ���� ��� ��� ��������� */
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 20px !important;
    }

    /* 2. ������� ������ ������� � ��������� */
    .catalog-toolbar__title {
        margin: 0 !important;
        white-space: nowrap !important; /* ��������� �� ������ ����������� */
        flex-shrink: 0 !important; /* ��������� �� ����� ��������� */
    }

    /* 3. ������ ���� ���������� ����� ���������� */
    .catalog-toolbar__controls {
        display: flex !important;
        gap: 15px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-grow: 1 !important;
    }

    /* ���������� ��� �������� � ��������, ����� ������ ����� � ������ ��������� */
    .catalog-toolbar__controls label {
        font-size: 14px !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
    }
}

@media (max-width: 768px) {
    .filter__options-param-select {
        border: 1px solid #3c3c3c !important;
    }
}