/**
 * Home categories section v2.
 */

.flm-categories-v2 {
  --flm-categories-v2-bg: #f7f7f7;
  --flm-categories-v2-text: #191a1c;
  --flm-categories-v2-muted: #81858b;
  --flm-categories-v2-line: #d8dade;
  padding-top: 30px;
  padding-bottom: 48px;
}

.flm-categories-v2__head {
  margin-bottom: 28px;
  text-align: center;
}

.flm-categories-v2__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.flm-categories-v2__line {
  flex: 1 1 auto;
  max-width: 132px;
  height: 1px;
  opacity: 0.95;
}

.flm-categories-v2__line--start {
  background: linear-gradient(to right, var(--flm-categories-v2-line) 0%, rgba(216, 218, 222, 0.42) 52%, transparent 100%);
}

.flm-categories-v2__line--end {
  background: linear-gradient(to left, var(--flm-categories-v2-line) 0%, rgba(216, 218, 222, 0.42) 52%, transparent 100%);
}

.flm-categories-v2__title {
  margin: 0;
  color: var(--flm-categories-v2-text);
  line-height: 1.45;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.flm-categories-v2__title-bold {
  font-weight: 700;
  font-size: 20px;
}

.flm-categories-v2__title-light {
  font-weight: 400;
  font-size: 17px;
}

.flm-categories-v2__subtitle {
  margin: 10px auto 0;
  max-width: 560px;
  color: var(--flm-categories-v2-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.75;
}

.flm-categories-v2__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.flm-categories-v2__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 132px;
  padding: 18px 18px 14px 14px;
  border-radius: 12px;
  background: var(--flm-categories-v2-bg);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  direction: rtl;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flm-categories-v2__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(24, 27, 31, 0.06);
}

.flm-categories-v2__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  text-align: right;
}

.flm-categories-v2__copy strong {
  display: block;
  color: var(--flm-categories-v2-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.flm-categories-v2__copy span {
  display: block;
  color: var(--flm-categories-v2-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.65;
}

.flm-categories-v2__thumb {
  width: 108px;
  height: 108px;
  flex: 0 0 auto;
  object-fit: contain;
  align-self: flex-end;
  margin-bottom: -6px;
}

@media (max-width: 900px) {
  .flm-categories-v2 {
    padding-top: 24px;
    padding-bottom: 36px;
  }

  .flm-categories-v2__head {
    margin-bottom: 22px;
  }

  .flm-categories-v2__title-row {
    gap: 12px;
  }

  .flm-categories-v2__line {
    max-width: 72px;
  }

  .flm-categories-v2__title {
    white-space: normal;
  }

  .flm-categories-v2__title-bold {
    font-size: 20px;
  }

  .flm-categories-v2__title-light {
    font-size: 17px;
  }

  .flm-categories-v2__subtitle {
    max-width: none;
    padding-inline: 8px;
    font-size: 11px;
    line-height: 1.8;
  }

  .flm-categories-v2__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .flm-categories-v2__card {
    min-height: 118px;
    padding: 16px 12px 12px 16px;
  }

  .flm-categories-v2__thumb {
    width: 96px;
    height: 96px;
    margin-bottom: -4px;
  }
}

@media (max-width: 360px) {
  .flm-categories-v2__line {
    max-width: 48px;
  }

  .flm-categories-v2__copy strong {
    font-size: 13px;
  }
}
