/* «Доставим от 1 дня» — плитки подразделов с товарами в наличии, как у divan.ru (кодекс 3.262, 13.10.2026).
   Компьютер: 2 ряда, высокая плитка занимает колонку, низкие — по две; число колонок задаёт контроллер (--fd-cols).
   Телефон и планшет (до 992 px): 2 колонки, все плитки одной высоты, нечётная последняя — на всю ширину. */
.fd-grid {
  display: grid;
  grid-template-columns: repeat(var(--fd-cols, 6), minmax(0, 1fr));
  grid-template-rows: repeat(2, 230px);
  grid-auto-flow: column dense;
  gap: 15px;
}
.fd-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 15px;
  color: #353535;
  text-decoration: none;
}
.fd-tile:hover { color: #353535; }
.fd-tile--tall { grid-row: span 2; }
.fd-tile__top {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 16px 0;
}
.fd-tile__name {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 500;
}
.fd-tile__badge {
  flex: none;
  padding: 6px 8px 6px 12px;
  background: #FFCFCC;
  border-radius: 4px;
  color: #353535;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%);
}
/* картинка занимает место под названием и плашкой — длинное название её уменьшает, а не перекрывает */
.fd-tile__img {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 4px;
}
.fd-tile__img img {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: scale(1.15);
  transform-origin: center bottom;
  transition: transform .35s ease;
}
.fd-tile--tall .fd-tile__img img { transform: scale(1.35); }
@media (hover: hover) {
  .fd-tile:hover .fd-tile__img img { transform: scale(1.21); }
  .fd-tile--tall:hover .fd-tile__img img { transform: scale(1.41); }
}
@media (max-width: 1200px) {
  .fd-tile__top { padding: 12px 12px 0; gap: 6px; }
  .fd-tile__name { font-size: 15px; }
  .fd-tile__badge { padding: 5px 7px 5px 11px; font-size: 12px; }
}
@media (max-width: 992px) {
  .fd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 190px;
    grid-auto-flow: row;
    gap: 10px;
  }
  .fd-tile--tall { grid-row: auto; }
  .fd-tile:last-child:nth-child(odd) { grid-column: span 2; }
  .fd-tile--tall .fd-tile__img img { transform: scale(1.15); }
  .for-day .fd-grid + .flex_992 { margin-top: 15px; }
}
