/* "Video & Audio Intercoms" (category 30) page header: catalog/_partials/category-intercoms-info.tpl.
   Multi-brand, so InFront's own colours as in the Intercoms menu: ink #111827, greys, dark green #3f6212, lime #8cd400
   for the best-seller tag only. Phones (up to 767px): full-width white bands split by 8px of grey, 16px text padding,
   card / brand / install rows scroll sideways inside their band. */

.ift-icl {
  --icl-ink: #111827;
  --icl-text: #475569;
  --icl-line: #e5e7eb;
  --icl-wash: #f6f7f8;
  --icl-green: #3f6212;
  color: var(--icl-ink);
  margin: 0 0 1.25rem;
}

.ift-icl ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ift-icl p {
  margin: 0;
}

.ift-icl a {
  text-decoration: none;
}

/* Hero */
.ift-icl__hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 280px;
  background: var(--icl-ink);
  border-radius: 12px;
  overflow: hidden;
}

.ift-icl__hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 32px;
  color: #fff;
}

.ift-icl__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.ift-icl .ift-icl__title {
  margin: 8px 0 10px;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}

.ift-icl__lead {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.ift-icl__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 20px;
}

.ift-icl__call {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.ift-icl__call:hover {
  border-bottom-color: #fff;
}

.ift-icl__hero-media {
  position: relative;
  min-height: 100%;
}

.ift-icl__hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 18% 50%;
}

/* Buttons */
.ift-icl__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--icl-ink);
  color: #fff !important;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.ift-icl__btn:hover {
  background: #1f2937;
}

.ift-icl__btn--light {
  background: #fff;
  color: var(--icl-ink) !important;
}

.ift-icl__btn--light:hover {
  background: #e5e7eb;
}

/* Blocks */
.ift-icl__block {
  margin-top: 28px;
}

.ift-icl__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 12px;
}

.ift-icl .ift-icl__h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--icl-ink);
}

.ift-icl__sub {
  font-size: 0.875rem;
  color: var(--icl-text);
}

/* Cards */
.ift-icl__block--types,
.ift-icl__block--install {
  container-type: inline-size;
}

.ift-icl__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@container (min-width: 860px) {
  .ift-icl__cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ift-icl__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--icl-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s;
}

.ift-icl__card:hover {
  border-color: #cbd5e1;
}

.ift-icl__card-media {
  display: block;
  aspect-ratio: 5 / 2;
  background: var(--icl-wash);
}

.ift-icl__card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ift-icl__card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.ift-icl__tags {
  display: flex;
  gap: 6px;
}

.ift-icl__tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ift-icl__tag--best {
  background: #8cd400;
  color: var(--icl-ink);
}

.ift-icl .ift-icl__card-title {
  margin: 8px 0 4px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.ift-icl__card-title a {
  color: var(--icl-ink) !important;
}

.ift-icl__for {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--icl-text);
}

.ift-icl__facts {
  display: grid;
  gap: 4px;
  margin: 10px 0 12px !important;
}

.ift-icl__facts li {
  position: relative;
  padding-left: 20px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #334155;
}

.ift-icl__facts li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.22em;
  width: 6px;
  height: 10px;
  border: solid var(--icl-green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ift-icl__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto !important;
}

.ift-icl__chips a {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--icl-line);
  border-radius: 6px;
  color: #334155 !important;
  font-size: 0.75rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}

.ift-icl__chips a:hover {
  border-color: var(--icl-ink);
  color: var(--icl-ink) !important;
}

.ift-icl__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--icl-line);
}

.ift-icl__price {
  display: flex;
  flex-direction: column;
  font-size: 0.6875rem;
  line-height: 1.2;
  color: var(--icl-text);
}

.ift-icl__price strong {
  font-size: 1.0625rem;
  color: var(--icl-ink);
  white-space: nowrap;
}

/* Brands */
.ift-icl__brands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.ift-icl__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 84px;
  padding: 10px;
  border: 1px solid var(--icl-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s;
}

.ift-icl__brand:hover {
  border-color: var(--icl-ink);
}

.ift-icl__brand img {
  display: block;
  max-width: 100px;
  max-height: 26px;
  width: auto;
  height: auto;
}

.ift-icl__count {
  font-size: 0.75rem;
  color: #64748b;
}

.ift-icl__more {
  margin-top: 10px !important;
  font-size: 0.8125rem;
  color: var(--icl-text);
}

.ift-icl__more a {
  color: var(--icl-green) !important;
  font-weight: 600;
}

.ift-icl__more a:hover {
  text-decoration: underline;
}

/* Complete the install */
.ift-icl__install {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.ift-icl__inst {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--icl-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s;
}

.ift-icl__inst:hover {
  border-color: var(--icl-ink);
}

.ift-icl__inst img {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.ift-icl__inst-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ift-icl__inst-name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--icl-ink);
}

@container (min-width: 860px) {
  .ift-icl__install {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Tablet */
@media (max-width: 991.98px) {
  .ift-icl__hero {
    grid-template-columns: 1fr 1fr;
    min-height: 240px;
  }

  .ift-icl__hero-text {
    padding: 22px;
  }

  .ift-icl .ift-icl__title {
    font-size: 1.4rem;
  }
}

/* Phones: edge to edge */
@media (max-width: 767.98px) {
  .ift-icl {
    width: 100vw;
    max-width: 100vw;
    margin: 0 0 8px calc(50% - 50vw);
    background: #eef1f4;
  }

  .ift-icl__hero {
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
    border-radius: 0;
  }

  .ift-icl__hero-media {
    aspect-ratio: 16 / 8;
  }

  .ift-icl__hero-text {
    padding: 18px 16px 20px;
  }

  .ift-icl .ift-icl__title {
    margin: 6px 0 6px;
    font-size: 1.3rem;
  }

  .ift-icl__lead {
    font-size: 0.875rem;
  }

  .ift-icl__actions {
    margin-top: 14px;
  }

  .ift-icl__block {
    margin-top: 8px;
    padding: 16px 0;
    background: #fff;
  }

  .ift-icl__head {
    padding: 0 16px;
  }

  .ift-icl .ift-icl__h2 {
    font-size: 1.0625rem;
  }

  .ift-icl__cards,
  .ift-icl__brands,
  .ift-icl__install {
    display: flex;
    gap: 10px;
    padding: 0 16px 4px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ift-icl__cards::-webkit-scrollbar,
  .ift-icl__brands::-webkit-scrollbar,
  .ift-icl__install::-webkit-scrollbar {
    display: none;
  }

  .ift-icl__cards > li {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .ift-icl__brands > li {
    flex: 0 0 120px;
    scroll-snap-align: start;
  }

  .ift-icl__install > li {
    flex: 0 0 200px;
    scroll-snap-align: start;
  }

  .ift-icl__brand {
    height: 76px;
  }

  .ift-icl__more {
    padding: 0 16px;
  }
}
