/* ISTORE section tiles slider v1: subsection grid -> one scrollable row of rounded tiles (image left, name right). */
body#main .catalog_section_list.type_sections_5 {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  margin: 0 0 24px !important;
  padding: 4px 2px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
body#main .catalog_section_list.type_sections_5::-webkit-scrollbar { display: none; }
body#main .catalog_section_list.type_sections_5::before,
body#main .catalog_section_list.type_sections_5::after { display: none !important; content: none !important; }

body#main .catalog_section_list.type_sections_5 > .item_block {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}
body#main .catalog_section_list.type_sections_5 .section_item {
  position: relative;
  height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 18px !important;
  border: 1px solid #ececec !important;
  background: #fff;
  box-shadow: none !important;
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
body#main .catalog_section_list.type_sections_5 .section_item:hover {
  border-color: transparent !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.08) !important;
}
body#main .catalog_section_list.type_sections_5 .section_item_inner,
body#main .catalog_section_list.type_sections_5 .section_item_inner tbody,
body#main .catalog_section_list.type_sections_5 .section_item_inner tr {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  width: auto !important;
  height: 100%;
}
body#main .catalog_section_list.type_sections_5 td.image {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto !important;
  padding: 0 10px 0 14px !important;
}
body#main .catalog_section_list.type_sections_5 td.image .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  margin: 0 !important;
}
body#main .catalog_section_list.type_sections_5 td.image img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}
body#main .catalog_section_list.type_sections_5 td.section_info {
  display: flex !important;
  align-items: center;
  width: auto !important;
  padding: 0 18px 0 0 !important;
  text-align: left;
}
body#main .catalog_section_list.type_sections_5 td.section_info ul { margin: 0 !important; padding: 0 !important; }
body#main .catalog_section_list.type_sections_5 li.name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
}
body#main .catalog_section_list.type_sections_5 li.name a {
  display: block;
  border: 0 !important;
  text-decoration: none !important;
}
/* whole tile clickable */
body#main .catalog_section_list.type_sections_5 li.name a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
body#main .catalog_section_list.type_sections_5 li.name .font_md {
  font-size: 15px !important;
  line-height: 1.2 !important;
}
body#main .catalog_section_list.type_sections_5 li.name .element-count {
  margin: 0 !important;
}
body#main .catalog_section_list.type_sections_5 .section_item_inner,
body#main .catalog_section_list.type_sections_5 .section_item_inner tr,
body#main .catalog_section_list.type_sections_5 td,
body#main .catalog_section_list.type_sections_5 td ul,
body#main .catalog_section_list.type_sections_5 li.name,
body#main .catalog_section_list.type_sections_5 li.name a { position: static !important; }

@media (max-width: 767px) {
  body#main .catalog_section_list.type_sections_5 {
    gap: 8px;
    margin: 0 -16px 20px !important;
    padding: 4px 16px 8px;
  }
  body#main .catalog_section_list.type_sections_5 .section_item { height: 60px !important; border-radius: 16px !important; }
  body#main .catalog_section_list.type_sections_5 td.image { padding: 0 8px 0 10px !important; }
  body#main .catalog_section_list.type_sections_5 td.image .thumb { width: 40px !important; height: 40px !important; }
  body#main .catalog_section_list.type_sections_5 td.section_info { padding-right: 14px !important; }
  body#main .catalog_section_list.type_sections_5 li.name .font_md { font-size: 14px !important; }
}

/* tighter gap between the tiles row and the catalog block below */
body#main .catalog_section_list.type_sections_5 { margin-bottom: 0 !important; }
body#main .section-block:has(.catalog_section_list.type_sections_5) { padding-bottom: 0 !important; margin-bottom: 0 !important; }
@media (max-width: 767px) {
  body#main .catalog_section_list.type_sections_5 { margin-bottom: 0 !important; }
  body#main .section-block:has(.catalog_section_list.type_sections_5) { padding-bottom: 0 !important; }
}
body#main .catalog_section_list.type_sections_5 { padding-bottom: 6px !important; }
/* equal visual gap above and below the tiles row (title -> tiles == tiles -> catalog block) */
@media (min-width: 768px) {
  body#main .catalog_section_list.type_sections_5 { margin-top: -25px !important; }
}
@media (max-width: 767px) {
  body#main .catalog_section_list.type_sections_5 { padding-bottom: 2px !important; }
}
/* tiles show only image + name: hide nested sub-subsection links and descriptions */
body#main .catalog_section_list.type_sections_5 td.section_info li:not(.name),
body#main .catalog_section_list.type_sections_5 .section_item .desc { display: none !important; }

/* ---------- v2: no snapping/floating, raised row, scroll arrows, subsection dropdown ---------- */
body#main .catalog_section_list.type_sections_5 .section_item,
body#main .catalog_section_list.type_sections_5 .section_item * { transform: none !important; animation: none !important; }
@media (max-width: 767px) {
  body#main .catalog_section_list.type_sections_5 { margin-top: -4px !important; }
}

/* wrapper + arrows (wrapper is added by JS) */
.istore-sec-wrap { position: relative; }
.istore-sec-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 40px;
  height: 40px;
  margin-top: -21px;
  padding: 0;
  border: 1px solid #ececec;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .2s ease, background-color .2s ease;
}
.istore-sec-arrow:hover { background: #f5f5f7; }
.istore-sec-arrow svg { width: 18px; height: 18px; display: block; }
.istore-sec-arrow--prev { left: -12px; }
.istore-sec-arrow--next { right: -12px; }
.istore-sec-arrow[hidden] { display: none !important; }
/* soft edge fade where more tiles are hidden */
.istore-sec-wrap::before,
.istore-sec-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 6px;
  width: 48px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.istore-sec-wrap::before { left: 0; background: linear-gradient(90deg, #fff 20%, rgba(255,255,255,0)); }
.istore-sec-wrap::after { right: 0; background: linear-gradient(270deg, #fff 20%, rgba(255,255,255,0)); }
.istore-sec-wrap.has-prev::before,
.istore-sec-wrap.has-next::after { opacity: 1; }
@media (max-width: 767px) {
  .istore-sec-arrow { width: 32px; height: 32px; margin-top: -17px; }
  .istore-sec-arrow svg { width: 15px; height: 15px; }
  .istore-sec-arrow--prev { left: -6px; }
  .istore-sec-arrow--next { right: -6px; }
  .istore-sec-wrap::before { left: -16px; }
  .istore-sec-wrap::after { right: -16px; }
}

/* subsection dropdown toggle inside a tile */
body#main .catalog_section_list.type_sections_5 .istore-sec-toggle {
  position: relative !important;
  z-index: 3;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0 0 0 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f2f4;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease;
}
body#main .catalog_section_list.type_sections_5 .istore-sec-toggle:hover,
body#main .catalog_section_list.type_sections_5 .istore-sec-toggle[aria-expanded="true"] { background: #e6e6ea; }
body#main .catalog_section_list.type_sections_5 .istore-sec-toggle svg { width: 14px; height: 14px; transition: transform .2s ease !important; }
body#main .catalog_section_list.type_sections_5 .istore-sec-toggle[aria-expanded="true"] svg { transform: rotate(180deg) !important; }
body#main .catalog_section_list.type_sections_5 .section_item.has-subs td.section_info { padding-right: 14px !important; }

/* dropdown panel (appended to body so the scroll row does not clip it) */
.istore-sec-pop {
  position: absolute;
  z-index: 1000;
  min-width: 220px;
  max-width: 320px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.istore-sec-pop a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #111 !important;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none !important;
  border: 0 !important;
}
.istore-sec-pop a:hover { background: #f5f5f7; }
.istore-sec-pop a.istore-sec-pop__all { font-weight: 600; }
.istore-sec-pop hr { margin: 4px 6px; border: 0; border-top: 1px solid #f0f0f0; }

/* v3: no product counters in tiles; taller tiles on mobile */
body#main .catalog_section_list.type_sections_5 li.name .element-count { display: none !important; }
@media (max-width: 767px) {
  body#main .catalog_section_list.type_sections_5 .section_item { height: 70px !important; border-radius: 18px !important; }
  body#main .catalog_section_list.type_sections_5 td.image { padding: 0 10px 0 12px !important; }
  body#main .catalog_section_list.type_sections_5 td.image .thumb { width: 48px !important; height: 48px !important; }
  body#main .catalog_section_list.type_sections_5 li.name .font_md { font-size: 15px !important; }
}

/* tiles row centred between the page title and the landing chips below (same gap above and below) */
body#main .section-block:has(.catalog_section_list.type_sections_5) ~ .landings-list { margin-top: 14px !important; }
@media (max-width: 767px) {
  body#main .section-block:has(.catalog_section_list.type_sections_5) ~ .landings-list { margin-top: 7px !important; }
}
