/* Adaptive layout. Desktop header stays as-is above 1024px. */

.m-header,
.m-nav,
.m-nav-backdrop {
  display: none;
}

@media (max-width: 1023.98px) {
  .header,
  .header-spacer {
    display: none !important;
  }

  .m-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1100;
    background: #fff;
    border-bottom: 1px solid #e1eff7;
  }

  .m-header__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 6px 12px;
  }

  .m-header__burger {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  .m-header__burger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #2f3540;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body.is-m-menu-open .m-header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.is-m-menu-open .m-header__burger-line:nth-child(2) {
    opacity: 0;
  }

  body.is-m-menu-open .m-header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .m-header__logo {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
  }

  .m-header__logo img {
    display: block;
    width: 132px;
    max-width: 100%;
    height: auto;
  }

  .m-header__city {
    flex-shrink: 0;
    display: none;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    font-size: 13px;
    color: #2f3540;
    white-space: nowrap;
  }

  .m-header__actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
  }

  .m-header__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }

  .m-header__icon img {
    display: block;
    width: 20px;
    height: 20px;
  }

  .m-header__contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    padding: 0 12px 10px;
  }

  .m-header__phone {
    color: #1f55a1;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
  }

  .m-header__callback,
  .m-header__about {
    color: #1f55a1;
    font-size: 13px;
    line-height: 1.3;
  }

  .m-header__callback {
    text-decoration: underline dashed;
    text-underline-offset: 4px;
    text-decoration-color: #bbcce3;
  }

  .m-header__about {
    text-decoration: underline;
  }

  .m-header__search {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 0 12px 10px;
  }

  .m-header__search-field {
    position: relative;
    flex: 1;
    min-width: 0;
  }

  .m-header__search-input {
    display: block;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dfe2e6;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
  }

  .m-header__search-input:focus {
    border-color: #adb5bd;
  }

  .m-header__search-btn {
    flex-shrink: 0;
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 0 6px 6px 0;
    background: #cfd4da;
    color: #2f3540;
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
  }


  .m-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  body.is-m-menu-open .m-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .m-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1300;
    width: min(86vw, 360px);
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow: auto;
  }

  body.is-m-menu-open .m-nav {
    transform: translateX(0);
  }

  body.is-m-menu-open {
    overflow: hidden;
  }

  .m-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 8px 0 16px;
    border-bottom: 1px solid #e1eff7;
    font-size: 16px;
    font-weight: bold;
    color: #2f3540;
  }

  .m-nav__close {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 32px;
    line-height: 1;
  }

  .m-nav__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
  }

  .m-nav__list > li > a,
  .m-nav__group-btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    color: #1e2022;
    font-size: 15px;
    text-align: left;
    text-decoration: none;
  }

  .m-nav__list > li > a:hover,
  .m-nav__group-btn:hover {
    background: #f5f7fa;
    color: #1f55a1;
  }

  .m-nav__group-btn {
    justify-content: space-between;
  }

  .m-nav__group-btn::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #434343;
    transition: transform 0.2s ease;
  }

  .m-nav__group.is-open .m-nav__group-btn::after {
    transform: rotate(180deg);
  }

  .m-nav__sub {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
    background: #f7f8fa;
  }

  .m-nav__group.is-open .m-nav__sub {
    display: block;
  }

  .m-nav__sub a {
    display: block;
    padding: 10px 16px 10px 28px;
    color: #1e2022;
    font-size: 14px;
    text-decoration: none;
  }

  .m-nav__sub a:hover {
    color: #1f55a1;
  }

  .m-nav__extra {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid #e1eff7;
  }

  .m-nav__phone {
    color: #1f55a1;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
  }

  .m-nav__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .m-nav__links a {
    color: #1f55a1;
    font-size: 14px;
  }

  .top-notice {
    padding: 8px 12px;
    font-size: 13px;
    gap: 10px;
    text-align: left;
  }

  .top-notice .main {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (min-width: 375px) and (max-width: 1023.98px) {
  .m-header__logo img {
    width: 188px;
  }
  .m-header__city {
    display: inline-flex;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .m-header__bar {
    min-height: 60px;
    padding: 8px 16px;
    gap: 12px;
  }

  .m-header__city {
    display: inline-flex;
  }

  .m-header__logo img {
    width: 188px;
  }

  .m-header__contacts,
  .m-header__search {
    padding-left: 16px;
    padding-right: 16px;
  }

  .m-nav {
    width: 380px;
  }

  .tab_el span,
  .tab_el_shin span,
  .ui-filter-tab-title {
    font-size: 14px;
    white-space: nowrap;
  }
}




/* 768px - 1023px */

@media (min-width: 768px) and (max-width: 1023.98px) {

    .cities-items {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}


/* 375px - 767px */

@media (min-width: 375px) and (max-width: 767.98px) {

    .cities-group {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .cities-letter {
        width: 50px;
        font-size: 26px;
    }

    .cities-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px 5px;
    }

    .city-item {
        padding-right: 5px;
    }

}


/* меньше 375px */

@media (max-width: 374.98px) {

    .cities-group {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .cities-letter {
        width: 40px;
        font-size: 24px;
    }

    .cities-items {
        grid-template-columns: 1fr;
    }

    .city-item {
        padding-right: 5px;
    }

}

/* Content: keep desktop tables, fold outer layout only. */

@media (max-width: 1279.98px) {
  .header-top .main-menu {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
  }

  .header-top .menu-item {
    flex-shrink: 0;
  }

  .header-top .menu-item + .menu-item {
    margin-left: 0;
  }

  .header-top .menu-link {
    padding: 0 5px;
    letter-spacing: 0;
  }

  .ui-seo-block,
  .ui-pay-block {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ui-footer {
    padding-left: 0;
    padding-right: 0;
  }

  .ui-brands-carousel {
    max-width: 100%;
  }

  .ui-podeli-widget {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 1099.98px) {
  .header-top .menu-icon {
    display: none;
  }
}

/* 5 fixed 220px cards + margins overflow below ~1250px */
@media (max-width: 1279.98px) {
  .catalog.ui-catalog-intro {
    padding: 0;
  }

  .ui-products-table {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    align-items: start;
  }

  .ui-products-table > tbody,
  .ui-products-table > tbody > tr {
    display: contents;
  }

  .ui-products-table > tbody > tr > td {
    display: block;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 6px;
  }

  .ui-products-table > tbody > tr > td:empty {
    display: none;
  }

  .ui-products-table .product-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  .ui-products-table .product-card img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 1023.98px) {
  .main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ui-spacer-40 {
    height: 16px;
  }

  h1 {
    font-size: 22px;
    line-height: 1.25;
  }

  h2 {
    font-size: 20px;
  }

  .ui-seo-title {
    font-size: 22px;
  }

  .main img {
    max-width: 100%;
    height: auto;
  }

  /* Filter tabs: no skew, no overlapping wheel */
  .ui-filter-wrap {
    left: 0;
    padding-left: 0;
  }

  .ui-filter-panel {
    padding-left: 0;
    margin-top: 0;
    width: 100%;
  }

  .tab_down_el_left,
  .tab_down_el_right {
    display: none;
  }

  .ui-filter-wrap > .tabel:first-child {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 3px;
    padding: 0;
    overflow: hidden;
  }

  .tab_el_shin_img,
  .tab_el_shin_el,
  .ui-filter-error {
    display: none;
  }

  .tab_el,
  .tab_el_shin {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    min-height: 30px;
    padding: 8px 4px;
    transform: none;
    border-radius: 8px 8px 0 0;
  }

  .tab_el span,
  .tab_el_shin span,
  .ui-filter-tab-title {
    transform: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  .tab_down_el {
    width: auto;
    max-width: 100%;
    flex: 1;
    min-width: 0;
    padding: 16px 18px 14px;
    box-sizing: border-box;
    border-radius: 0 0 8px 8px;
  }

  .tab_down_el > table,
  .tab_down_el > table > tbody {
    display: block;
    width: 100%;
  }

  .tab_down_el > table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
  }

  .tab_down_el > table > tbody > tr > td {
    width: auto !important;
  }

  .tab_down_el table table,
  .tab_down_el table table tbody,
  .tab_down_el table table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    gap: 8px;
  }

  .tab_down_el table table td {
    width: auto !important;
  }

  .tab_down_el .container {
    display: none;
  }

  .mode {
    padding-top: 0;
    gap: 6px;
    display: none;
  }

  .ui-pt-11 {
    padding-top: 0;
  }

  .ui-season-row {
    gap: 6px;
    min-height: 24px;
  }

  .tab_search {
    transform: none;
    width: 88px;
    height: 36px;
    border-radius: 6px;
  }

  .tab_search span {
    transform: none;
    font-size:16px;
  }

  .ui-filter-extra {
    padding: 10px 0 0;
    display: none;
  }

  .tooltip-box {
    max-width: min(92vw, 700px);
    overflow: auto;
  }

  .tooltip-box img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  /* Index catalog tiles */
  .ui-cat-table,
  .ui-cat-table > tbody,
  .ui-cat-table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .ui-cat-table td {
    display: block;
    flex: 1 1 calc(50% - 12px);
    max-width: calc(50% - 12px);
    padding-right: 0;
    box-sizing: border-box;
    margin: 0 6px 12px;
  }

  .ui-cat-card {
    padding: 16px 12px;
  }

  /* Brands: flatten table rows so cells wrap as one grid (no holes) */
  .ui-brands-table {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }

  .ui-brands-table > tbody,
  .ui-brands-table tr {
    display: contents;
  }

  .ui-brands-table td {
    display: block;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 8px;
  }

  .ui-brands-table td:empty {
    display: none;
  }

  .ui-brand-box {
    height: 88px;
    padding: 8px;
  }

  .size-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .ui-radius-btn {
    display: inline-block;
    margin: 0 6px 8px 0;
  }

  .ui-pay-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .ui-pay-block .ui-align-right {
    width: 100%;
    text-align: left;
  }

  .ui-pay-block .ui-align-right img {
    max-width: 220px;
    height: auto;
  }

  .footer .container {
    display: block;
  }

  .footer .menu-footer {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px 0;
  }

  .footer .menu-footer .menu-footer-list {
    flex: 1 1 45%;
    margin: 0 16px 18px 0;
    min-width: 140px;
  }

  .footer .copy {
    display: block !important;
    text-align: left;
  }

  .ui-products-table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ui-brands-carousel .ui-brand-slide {
    flex-basis: 25%;
  }

  /* Product page */
  .ui-product-title,
  .ui-product-title > tbody,
  .ui-product-title > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  .ui-product-title td {
    display: block;
    width: auto;
    padding-left: 0;
  }

  .ui-product-layout,
  .ui-product-layout > tbody,
  .ui-product-layout > tbody > tr {
    display: block;
    width: 100%;
  }

  .ui-product-layout > tbody > tr {
    display: flex;
    flex-direction: column;
  }

  .ui-product-layout > tbody > tr > td {
    display: block;
    width: 100% !important;
    padding: 0 0 20px;
  }

  /* 1-й остаётся первым */
  .ui-product-layout > tbody > tr > td:nth-child(1) {
    order: 1;
  }

  /* 3-й становится вторым */
  .ui-product-layout > tbody > tr > td:nth-child(3) {
    order: 2;
  }

  /* 2-й становится третьим */
  .ui-product-layout > tbody > tr > td:nth-child(2) {
    order: 3;
  }

  .ui-product-specs {
    padding-left: 0;
    padding-right: 0;
  }

  .product-gallery {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .main-image-wrapper {
    max-width: 100%;
  }

  .main-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .product-gallery .nav.prev {
    left: 8px;
  }

  .product-gallery .nav.next {
    right: 8px;
  }

  .product-gallery .nav {
    z-index: 1;
  }

  .thumbnails {

    max-width: 100%;
    padding-top:13px;
  }

  .cart_area {
    max-width: 100%;
  }

  .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tab {
    flex-shrink: 0;
  }
}

@media (max-width: 767.98px) {

  /* Внешняя таблица фильтра */
.tab_down_el > table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 10px;
}

.tab_down_el > table > tbody > tr > td {
    display: block;
    width: auto !important;
    padding: 4px 0;
    box-sizing: border-box;
}

/* Два блока сезонов всегда рядом */
.tab_down_el > table > tbody > tr > td.ui-pt-11 {
    flex: 0 0 calc(50% - 5px);
    width: calc(50% - 5px) !important;
    max-width: calc(50% - 5px);
    vertical-align: top;
    box-sizing: border-box;
}

.ui-season-row {
    white-space: nowrap;
}

/* Кнопку на новую строку */
.tab_down_el > table > tbody > tr > td:last-child {
    flex: 0 0 100%;
    width: 100% !important;
}

.tab_search {
    width: 100%;
    max-width: 100%;
}

  .tab_down_el table table,
  .tab_down_el table table tbody,
  .tab_down_el table table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 6px;
  }

  .tab_down_el table table td {
    width: auto !important;
  }

  .ui-select {
    min-width: 88px;
  }

  .tab_search {
    width: 100%;
    max-width: 100%;
    height: 40px;
    transform: none;
  }

  .tab_search span {
    transform: none;
  }

  .ui-filter-error {
    display: none;
  }

  .hidd {
    display: none;
  }

  .ui-cat-table td {
    flex-basis: calc(50% - 12px);
    max-width: calc(50% - 12px);
  }

  .ui-brands-table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .size-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-products-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-products-table .ui-product-buy > table:last-child,
  .ui-products-table .ui-product-buy > table:last-child tbody,
  .ui-products-table .ui-product-buy > table:last-child tr {
    display: block;
    width: 100%;
  }

  .ui-products-table .ui-product-buy > table:last-child td {
    display: block;
    width: 100% !important;
  }

  .ui-products-table .cart_btn2 {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .ui-price {
    font-size: 22px;
  }

  .favorite-container {
    padding-right: 0;
    justify-content: flex-start;
  }

  .cart_area > table,
  .cart_area > table > tbody,
  .cart_area > table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
  }

  .cart_area > table td {
    width: auto !important;
  }

  .cart_area > table td:nth-child(2) {
    margin-left: auto;
  }

  .cart_area .ui-product-rating-cell {
    order: -1;
    flex: 1 0 100%;
    margin-bottom: 6px;
  }

  .cart_area .good-rating {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .cart_area .ui-product-price {
    white-space: nowrap;
    font-size: 22px;
    padding-right: 8px;
  }

  .cart_area .qty_control {
    margin: 0;
  }

  .cart_area .ui-qty-minus,
  .cart_area .ui-qty-plus {
    left: 0;
  }

  .cart_area .ui-product-total {
    margin: 8px 0 0;
    padding-top: 6px;
  }

  .cart_area .cart_btn {
    margin-top: 8px;
  }

  .ui-brand-slide {
    flex-basis: 33.33%;
  }

  .title-with-lines {
    font-size: 1.2rem;
    margin: 24px 0 18px;
  }

  .title-with-lines::before,
  .title-with-lines::after {
    margin: 10px;
  }

  .footer .menu-footer .menu-footer-list {
    flex-basis: 45%;
    margin-right: 0;
  }
}

@media (max-width: 374.98px) {
  .main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .ui-cat-table td {
    flex-basis: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .ui-brands-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-products-table {
    grid-template-columns: 1fr;
  }

  .size-columns {
    grid-template-columns: 1fr;
  }

  .ui-brand-slide {
    flex-basis: 50%;
  }

  .tab_el span,
  .tab_el_shin span,
  .ui-filter-tab-title {
    font-size: 12px;
    white-space: normal;
  }

  .ui-product-total-value {
    font-size: 24px;
  }

  .footer .menu-footer .menu-footer-list {
    flex-basis: 100%;
  }

}

@media (max-width: 500px) {
    .order-map {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .order-map__map {
        order: 2;
        width: 100%;
        height: 500px;
        flex: none;
    }

    .ui-order-map-list {
        order: 1;
        width: 100%;
    }

    #sidebar {
        height:250px;
    }
}




@media (min-width: 500px) and (max-width: 800.98px) {

  .ui-order-map-img{
      width:100px;
  }

  .ui-order-map-list{
      width:200px;
  }
}



@media (max-width: 500px) {

  table .ui-hidden {
        display: none !important;
    }

  .tooltip-container {
    display: none;
  }

  .ui-order-map-img{
      width:100px;
  }

  .ui-order-city{
    width: 300px;
  }

  .ui-order-comm{
    width: 300px;
  }

  .payment_el svg { width: 55px;}
  .payment_el { font-size: 12px; padding-top:0;padding-bottom:0;}
  .payment_el > div { font-size: 12px !important; }

    table.order-mobile {
        width: 100% !important;
    }

    table.order-mobile > tbody > tr.order-mobile-row {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    table.order-mobile > tbody > tr.order-mobile-row > td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    table.order-mobile > tbody > tr.order-mobile-row > td:nth-child(2) {
        order: 1;
        margin-bottom: 12px;
    }

    table.order-mobile > tbody > tr.order-mobile-row > td:nth-child(1) {
        order: 2;
    }

    .order-table > tbody > tr {
        display: flex;
        flex-direction: column;
    }

    .order-table > tbody > tr > td {
        width: 100% !important;
        display: block;
    }

    .ui-order-td3{padding-left:0;padding-right:0;padding-top:10px;}
    .ui-order-td2{padding-left:0;padding-right:0;padding-top:15px;}


    .tab_down_el2 {
          padding: 10px !important;
      }

      .tab_down_el2 table {
          width: 100%;
      }

      .tab_down_el2 tr {
          display: flex;
          align-items: center;
          justify-content: center;
          flex-wrap: wrap;
          gap: 4px;
      }

      .tab_down_el2 td {
          width: auto !important;
          padding: 0 !important;
      }

      .tab_down_el2 select {
          max-width: 100%;
          box-sizing: border-box;
      }

      .tab_down_el2 td:nth-child(1) select {
          width: 92px;
      }

      .tab_down_el2 td:nth-child(3) select {
          width: 100px;
      }

      .tab_down_el2 td:nth-child(5) select {
          width: 100px;
      }

      .tab_down_el2 td:nth-child(6) {
          width: 100% !important;
          margin-top: 8px;
          text-align: center;
      }

      .tab_down_el2 #searchBtn {
          display: inline-block;
          box-sizing: border-box;
          font-size:16px;
          width: 92%;
      }


}


.mobile-stack-unique-p{padding-left:15px;}

@media (max-width: 500px) {


  .rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
}

.star-rating {
    margin: 0 auto;
}

.rating_txt {
    width: 100%;
    text-align: center;
    white-space: normal;
}

  table.mobile-stack-unique > tbody > tr > td {
      display: block;
      width: 100%;
      box-sizing: border-box;
    }

    .mobile-stack-unique-p{padding-left:0px;}

    .my-responsive-table tr,
    .my-responsive-table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .availability-box {

  }

    .butt_adap{
        padding-left:40px;
        padding-right:40px;
    }

    .podeli_order{
        padding-top:20px;
        display: none !important;
    }

    .footer {
        padding-left: 0 !important;
    }

    .footer .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .footer .menu-footer {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 130px;
        gap: 10px;
        align-items: start;
    }

    .footer .menu-footer-list {
        margin: 0 !important;
        padding: 0 !important;
    }

    .footer .menu-footer > .menu-footer-list {
        grid-column: 1;
    }

    .footer .menu-footer-list li {
        display: none !important;
    }

    .footer .menu-footer-list li:has(b) {
        display: block !important;

        margin: 0 0 3px 0 !important;

        padding: 0 !important;

        line-height: 1.2 !important;
    }

    .footer .menu-footer-list li:has(b) a {
        display: block;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    .footer .menu-footer-list li:has(b) a b {
        display: block;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        font-size: 14px;
    }

    .footer .menu-footer > .d-flex {
        grid-column: 2;
        grid-row: 1 / span 10;

        display: block !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .footer .menu-footer > .d-flex .menu-footer-list {
        display: none !important;
    }

    .footer .menu-footer > .d-flex > div {
        margin: 0 !important;
        padding: 0 !important;
        text-align: center;
    }

    .footer .menu-footer img[src*="approved-by-IT"] {
        width: 100px !important;
        height: auto;
        margin: 0 !important;
    }

    .footer .menu-footer img[src*="yandex_rating"] {
        width: 75px !important;
        height: auto;

        position: static !important;

        margin: 5px 0 0 0 !important;
    }

    .footer .footer-offer {
        margin-top: 15px !important;
        margin-bottom: 0 !important;
        font-size: 11px;
        line-height: 1.3;
    }

    .footer .copy {
        display: none !important;
    }


    #brands-container {
        margin: 0 5px !important;
    }

    #brands-track .brand-item {
        flex: 0 0 50% !important;
        max-width: 50%;
        padding: 0 5px !important;
    }

    #brands-track .brand-logo {
        width: 150px !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
        margin: 0 auto 8px !important;
    }

    #brands-track .brand-logo[src$=".svg"] {
        width: 170px !important;
    }

    #brands-track .brand-item span {
        font-size: 14px !important;
        line-height: 1.2;
    }

    .nav_brand {
        padding: 0 !important;
    }

    .nav_brand svg {
        width: 32px;
        height: 32px;
    }

    .filter-ship {
      left:0px;
    }

    .phone-buttons-wrap {
       flex-direction: column;
       align-items: center;
       gap: 3px;
   }
   .phone-buttons-wrap .cart_btn3,
   .phone-buttons-wrap .cart_btn4 {
       width: 100%;
       max-width: 280px;   /* ограничим ширину, чтобы не растягивались на весь экран */
       white-space: normal; /* разрешаем перенос длинного текста внутри кнопки */
   }
}







.phone-buttons-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Кнопки - чтобы не растягивались и текст не переносился криво */
.phone-buttons-wrap .cart_btn3,
.phone-buttons-wrap .cart_btn4 {
    display: inline-block;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
}
