/* ЭМИНЕССА — плитки разделов каталога.
   Плитка построена как торец складской позиции: слева квадратная «щёка» с фото,
   справа название. Кромка окалины появляется при наведении — тот же мотив,
   что у верхней полки в знаке и у шапок таблиц. Фон секции не трогаем. */

.front-categories {
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  grid-gap: 14px;
  padding: 46px 0 52px;
}

.front-categories li { background: transparent; }

.front-categories li a {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr 30px;
  align-items: center;
  min-height: 86px;
  background: #fff;
  border: 1px solid #E4E8ED;
  border-radius: 10px;
  box-shadow: none;
  overflow: hidden;
  color: #1E232A;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

/* «щёка» с фотографией: одинаковая для всех разделов, поэтому пёстрые снимки
   перестают спорить друг с другом */
.front-categories li img {
  width: 86px;
  height: 84px;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
  background: #F4F6F8;
  border-right: 1px solid #E9EDF1;
}

.front-categories span {
  margin: 0 0 0 16px;
  font-size: 14.5px;
  line-height: 19px;
  font-weight: 600;
  letter-spacing: -.005em;
}

/* стрелка проявляется при наведении — подсказывает, что плитка ведёт дальше */
.front-categories li a:after {
  content: "";
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity .16s ease, transform .16s ease;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B8321C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* кромка окалины по верху «щеки» */
.front-categories li a:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 86px;
  height: 3px;
  background: #B8321C;
  opacity: 0;
  transition: opacity .16s ease;
}

.front-categories li a:hover {
  border-color: #B8321C;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px 0 rgba(16, 20, 30, .10);
}
.front-categories li a:hover:before { opacity: 1; }
.front-categories li a:hover:after { opacity: 1; transform: none; }
.front-categories li a:hover span { color: #B8321C; }

.front-categories li a:focus-visible {
  outline: 2px solid #B8321C;
  outline-offset: 2px;
}

/* калькуляторы — единственная плитка не про товар, поэтому «щека» цвета окалины */
.front-categories icon {
  height: 84px;
  min-width: 86px;
  width: 86px;
  background-color: #F4F6F8;
  border-right: 1px solid #E9EDF1;
}
.front-categories li.link-calculator icon {
  background-color: #B8321C;
  border-right-color: #B8321C;
  background-size: 30px auto;
}

@media only screen and (max-width: 767px) {
  .front-categories {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
    padding: 22px 15px 34px;
  }
  .front-categories li a { grid-template-columns: 64px 1fr; min-height: 66px; border-radius: 9px; }
  .front-categories li img { width: 64px; height: 64px; padding: 6px; }
  .front-categories icon { width: 64px; min-width: 64px; height: 64px; }
  .front-categories li a:after { display: none; }
  .front-categories li a:before { width: 64px; }
  .front-categories span { margin-left: 12px; margin-right: 8px; font-size: 13px; line-height: 17px; }
  .front-categories li a:hover { transform: none; }
}

@media only screen and (max-width: 400px) {
  .front-categories { grid-template-columns: 1fr; }
  .front-categories li a { min-height: 62px; }
  .front-categories span { font-size: 14px; }
}
