.hpm-group {
  margin: 10px 0px;
}
.hpm-clearfix {
  clear: both;
}
.hpm-title {
  font-weight: bold;
  width: 100%;
}


.hpm-type-images {
  margin: 0 -3px;
  width: 100%;
}

.category_temp .hpm-type-images {
  margin: 0 -3px;
  width: 100%;
  display: flex;
  flex-direction: row;
}

.hpm-type-images .hpm-item {
  margin: 3px;
  cursor: pointer;
  border-radius: 0;
  border: 2px solid #d3d3d3;
  float: left;
  text-align: center;
  color: #111;
  border-radius: 6px;
  border: 1px solid #dfdfdf;
  padding: 2px 4px;
/*  max-width: 84px;*/
}


@media (max-width: 992px) {
  .hpm-type-images {
      display: flex;
      flex-wrap: wrap;
  }

  .hpm-type-images .hpm-item {
/*    width: 17%;*/
    flex-grow: 1;
    box-sizing: border-box;
    max-width: 120px;
  }
  .category_temp .hpm-type-images {
    flex-wrap: nowrap;
  }

}



.hpm-item.stock-off, .stock-off {
  filter: url(theme/default/image/grayscale_filter.svg#grayscale);
  filter: gray;
  -webkit-filter: grayscale(1);
  border: 1px solid #cbcbcb;
  color: #afafaf;
  opacity: 0.5;
}

.spoiler-control {
  margin-top: 15px;
  margin-bottom: 10px;
}
.spoiler-control a {
  padding: 5px;
  text-decoration: none;
  cursor: pointer;
}

.hpm-type-images .hcol-image img {
  width: 100%;
}
.hpm-type-images .hpm-item > div:not(.hcol-image) {
  padding: 3px 5px;
  min-width: 30px;
  /*background: #f5f5f5;
  border-radius: 5px;
  overflow: hidden;*/
}


.hcol-image + .hcol-attribute {
    background: #f5f5f5;
    border-radius: 5px;
    overflow: hidden;
}


.hpm-type-images .hpm-item.active {
  box-shadow: 0 0 5px rgb(14 165 60);
  border: 1px solid #0ea53c;
  background-color: #f9f9f9;
}
.hpm-type-images .hpm-item:hover {
  box-shadow: 0 0 5px rgba(33, 153, 198, 0.5);
}
.hpm-type-images .hpm-item.disabled, .hpm-type-html-select .hpm-item.disabled {
  opacity: .3;
}
.hpmodel-type-select .hpm-item.disabled {
  color: #ccc;
}
.hpm-type-html-select .hpm-select-item img  {
    border-radius: 0;
    padding: 0;
    margin: 2px;
}
.hpm-select {
  cursor: pointer;
  position: relative;
  width: 100%;
}
.hpm-select .selected {
  background: url(select.png) right center no-repeat;
  display: block;
  border: 1px solid #cecece;
  background-color: #F6F6F6;
  padding: 3px 25px 3px 3px;
  color: #444;
  overflow: auto;
}
.hpm-select.open .selected {
}
.hpm-select .hpm-select-item {
  overflow: auto; padding: 3px;
}
.hpm-select .hcol-image {
  float: left; margin-right: 10px; padding: 2px; background: #fff; border: 1px solid #ddd;
}
.hpm-select .drop-down {
  margin: -1px 0 0 0;
  padding: 0;
  width: 100%;
  border: 1px solid #cecece;
  position: absolute;
  background: #fff;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.hpm-select .drop-down > div {
  padding: 2px 5px;
  border-bottom: 1px solid #cecece;
}
.hpm-select .drop-down > div:last-child {
  border-bottom: none;
}
.hpm-select .drop-down > div.active {
  background: #F6F6F6;
}
.hpm-select .drop-down > div:hover {
  background-color: #e8e8e8;
  color: #222;
}


.hpm-cat-box {
  margin-bottom: 5px;
}
@media (max-width: 992px) {
  .hpm-cat-box {
    display: flex;
    overflow-x: auto;
  }
} 


.hpm-cat-box .hpm-title {
    font-weight: normal;
    width: 100%;
    font-size: 13px;
}
.hpm-cat-box .hpm-type-images .hpm-cat-item {
  display: inline-block;
  text-align: center;
  vertical-align: top;
  cursor: pointer;
  margin: 4px;
  padding: 0px 2px;
  box-shadow: 0 0 5px rgba(33, 153, 198, 0.0);
  border: 1px solid #d3d3d3;
  font-size: 12px;

  flex-shrink: 0;
  white-space: nowrap;
}
.hpm-cat-box .hpm-type-images .hpm-cat-item.qty_no {
  box-shadow: 0 0 5px rgba(33, 153, 198, 0.0);
  border: 1px solid #e7e7e7;
  color: #ccc;
}
.hpm-cat-box .hpm-type-images .hpm-item > div:not(.hcol-image) {
    padding: 2px 3px;
    min-width: 26px;
}
@media (max-width: 992px) {
  .hpm-cat-box .hpm-type-images .hpm-item > div:not(.hcol-image) {
      padding: 2px 3px;
      min-width: 20px;
  }
  .hpm-cat-box .hpm-type-images .hpm-cat-item {
      margin: 3px;
  }
  .hpm-group {
      margin: 5px 0px 1px;
  }
} 

.hpm-cat-box .hpm-type-images .hpm-cat-item .hpm-col-image img {
  width: 100%;
}
.hpm-cat-box .hpm-type-images .hpm-cat-item.active {
box-shadow: 0 0 5px rgb(14 165 60 / 48%);
    border: 1px solid rgb(31 154 69 / 61%);
    background-color: #f9f9f9;
}
.hpm-cat-box select {
  width: 100%;
}
.hpm-cat-box .hprice, #hpmodel .hprice {
  font-weight: bold;
}
.hpm-cat-box .hprice-new, #hpmodel .hprice-new {
  font-weight: bold;
}
.hpm-cat-box .hprice-old, #hpmodel .hprice-old {
  color: #E12C31;
  text-decoration: line-through;
}
.hpm-cat-content.hpm-type-html-select .hpm-select .selected {
    padding: 0;
}
.hpm-cat-content.hpm-type-html-select .hpm-select .selected .hpm-col-none {
    padding: 2px 5px;
}
.hpm-type-html-select .hpm-select .hpm-select-item img  {
    border-radius: 0;
    padding: 0;
    margin: 2px;
}
.hpm-cat-content.hpm-type-html-select .hpm-cat-item{
    border-radius: 0;
    padding: 2px 5px !important;
}


@media (max-width: 992px) {
  /* правило для iD 16 hpm */
  .type-16 {
    max-width: none !important;
  }
}


.product_grid .hpm-group {
  width: 100%; /* Оставляем ширину, но не трогаем overflow */
}

.product_grid .hpm-type-images {
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow-x: auto; /* Включаем горизонтальную прокрутку */
  scrollbar-width: none; /* Убираем полоску в Firefox */
  -ms-overflow-style: none; /* Убираем в старом Edge */
}

.product_grid .hpm-type-images::-webkit-scrollbar {
  display: none; /* Убираем полоску в Chrome, Safari, Edge */
}

.product_grid .hpm-item {
  flex: 0 0 auto; /* Чтобы элементы не сжимались и шли в ряд */
}