.mf-products-ui,
.mf-products-ui * {
  box-sizing: border-box !important;
}

/* ---------- Верхній блок категорій ---------- */

.mf2-categories {
  width: 100% !important;
  /*--max-width: 1000px !important;--*/
  margin: 0 auto 30px !important;
  padding: 0 !important;
  clear: both !important;
}

.mf2-title {
  display: block !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: #1b3550 !important;
  text-align: left !important;
  text-transform: uppercase !important;
}

.mf2-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 11px !important;
  align-items: stretch !important;
}

.mf2-card {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 96px !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  position: relative !important;
  padding: 10px 24px 10px 10px !important;
  background: #ffffff !important;
  border: 1px solid #dfe6ee !important;
  border-radius: 14px !important;
  text-decoration: none !important;
  color: #17324a !important;
  box-shadow: 0 4px 12px rgba(17, 39, 64, 0.055) !important;
  overflow: hidden !important;
  transition: all 0.2s ease !important;
}

.mf2-card:hover {
  text-decoration: none !important;
  color: #17324a !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(17, 39, 64, 0.09) !important;
  border-color: #cfd8e3 !important;
}

.mf2-imgbox {
  flex: 0 0 62px !important;
  width: 62px !important;
  height: 68px !important;
  min-width: 62px !important;
  border-radius: 10px !important;
  background: #f7f9fb !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.mf2-imgbox img {
  width: 74px !important;
  height: 74px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border: 0 !important;
}

.mf2-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding: 0 2px 0 0 !important;
}

.mf2-card-title {
  display: block !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  color: #17324a !important;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
}

.mf2-card-text {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 10.8px !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
  color: #5f7388 !important;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
}

.mf2-arrow {
  position: absolute !important;
  right: 9px !important;
  bottom: 8px !important;
  font-size: 19px !important;
  line-height: 1 !important;
  color: #1d3b57 !important;
  opacity: 0.85 !important;
}

/* ---------- Нижній блок швидкого вибору ---------- */

.mf-choice-section {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 22px auto 28px !important;
  padding: 0 !important;
  clear: both !important;
}

.mf-choice-title {
  margin: 0 0 3px !important;
  padding: 0 !important;
  font-size: 25px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: #1b3550 !important;
  text-align: left !important;
}

.mf-choice-subtitle {
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  color: #5f7388 !important;
  text-align: left !important;
}

.mf-choice-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 11px !important;
}

.mf-choice-card {
  min-height: 62px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 18px !important;
  background: #ffffff !important;
  border: 1px solid #dfe6ee !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  color: #17324a !important;
  box-shadow: 0 3px 10px rgba(17, 39, 64, 0.035) !important;
  transition: all 0.2s ease !important;
}

.mf-choice-card:hover {
  text-decoration: none !important;
  color: #17324a !important;
  border-color: #cfd8e3 !important;
  box-shadow: 0 7px 18px rgba(17, 39, 64, 0.08) !important;
  transform: translateY(-1px) !important;
}

.mf-choice-icon {
  flex: 0 0 25px !important;
  width: 25px !important;
  height: 25px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #1d3b57 !important;
}

.mf-choice-icon svg {
  width: 23px !important;
  height: 23px !important;
  display: block !important;
  stroke: currentColor !important;
}

.mf-choice-text {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  color: #17324a !important;
  text-align: left !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* ---------- Адаптивність верхнього блоку ---------- */

/* менше 1200 px: 3 + 2 */
@media screen and (max-width: 1199px) {
  .mf2-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .mf2-card {
    min-height: 98px !important;
    padding: 10px 24px 10px 10px !important;
    gap: 10px !important;
  }

  .mf2-imgbox {
    flex: 0 0 68px !important;
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
  }

  .mf2-imgbox img {
    width: 78px !important;
    height: 78px !important;
  }

  .mf2-card-title {
    font-size: 15px !important;
  }

  .mf2-card-text {
    font-size: 12px !important;
  }
}

/* менше 700 px: 2 + 2 + 1 */
@media screen and (max-width: 699px) {
  .mf2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mf2-card {
    min-height: 92px !important;
  }

  .mf2-card-title {
    font-size: 14px !important;
  }

  .mf2-card-text {
    font-size: 11.5px !important;
  }
}

/* менше 500 px: по одній */
@media screen and (max-width: 499px) {
  .mf2-title {
    font-size: 21px !important;
  }

  .mf2-grid {
    grid-template-columns: 1fr !important;
  }

  .mf2-card {
    min-height: 88px !important;
    padding: 10px 28px 10px 10px !important;
  }

  .mf2-imgbox {
    flex: 0 0 72px !important;
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
  }

  .mf2-imgbox img {
    width: 82px !important;
    height: 82px !important;
  }

  .mf2-card-title {
    font-size: 16px !important;
  }

  .mf2-card-text {
    font-size: 13px !important;
  }
}

/* ---------- Адаптивність нижнього блоку ---------- */

/* до 1199 px: 2 колонки */
@media screen and (max-width: 1199px) {
  .mf-choice-section {
    max-width: 1000px !important;
  }

  .mf-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* до 699 px: 1 колонка */
@media screen and (max-width: 699px) {
  .mf-choice-title {
    font-size: 23px !important;
  }

  .mf-choice-subtitle {
    font-size: 13.5px !important;
  }

  .mf-choice-grid {
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  .mf-choice-card {
    min-height: 58px !important;
    padding: 13px 16px !important;
    gap: 12px !important;
  }

  .mf-choice-text {
    font-size: 13.5px !important;
  }
}

.mf-hardness-block {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 28px auto 34px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    clear: both !important;
}

.mf-hardness-block,
.mf-hardness-block * {
    box-sizing: border-box !important;
}

.mf-hardness-title {
    margin: 0 0 4px !important;
    padding: 0 !important;
    font-size: 25px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    color: #1b3550 !important;
    text-align: left !important;
}

.mf-hardness-subtitle {
    margin: 0 0 22px !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    color: #5f7388 !important;
    text-align: left !important;
}

.mf-hardness-card {
    background: #ffffff !important;
    border: 1px solid #dfe6ee !important;
    border-radius: 16px !important;
    padding: 28px 30px 24px !important;
    box-shadow: 0 4px 14px rgba(17, 39, 64, 0.045) !important;
}

.mf-hardness-graph {
    position: relative !important;
    width: 100% !important;
    min-height: 270px !important;
    padding: 24px 0 10px !important;
}

/* шкали */
.mf-hardness-scale {
    position: absolute !important;
    height: 90px !important;
}

.mf-scale-a {
    left: 0 !important;
    top: 34px !important;
    width: 67% !important;
}

.mf-scale-d {
    left: 42% !important;
    top: 182px !important;
    width: 60% !important;
}

.mf-scale-label {
    position: absolute !important;
    left: 0 !important;
    top: -18px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #17324a !important;
    white-space: nowrap !important;
}

.mf-scale-note {
    position: absolute !important;
    right: 0 !important;
    top: -18px !important;
    font-size: 12px !important;
    color: #7a8b9b !important;
    white-space: nowrap !important;
}

.mf-scale-line {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 28px !important;
    height: 12px !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #dce3ea 0%, #9fb0c0 45%, #4a5d6f 100%) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.12) !important;
}

.mf-tick {
    position: absolute !important;
    top: -24px !important;
    transform: translateX(-50%) !important;
    font-size: 12px !important;
    line-height: 1 !important;
    color: #17324a !important;
    font-weight: 600 !important;
}

    .mf-tick:after {
        content: "" !important;
        position: absolute !important;
        left: 50% !important;
        top: 15px !important;
        width: 1px !important;
        height: 14px !important;
        background: rgba(23, 50, 74, 0.35) !important;
    }

.mf-scale-caption {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 48px !important;
    display: flex !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    color: #7a8b9b !important;
}

/* маркери */
.mf-marker {
    position: absolute !important;
    top: 6px !important;
    transform: translate(-50%, -50%) !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #ed1c24 !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(237, 28, 36, 0.35) !important;
    z-index: 4 !important;
}

.mf-marker-blue {
    background: #1f62d5 !important;
    box-shadow: 0 4px 12px rgba(31, 98, 213, 0.35) !important;
}

.mf-marker-green {
    background: #00a85a !important;
    box-shadow: 0 4px 12px rgba(0, 168, 90, 0.35) !important;
}

.mf-marker-orange {
    background: #ff7a22 !important;
    box-shadow: 0 4px 12px rgba(255, 122, 34, 0.35) !important;
}

/* подписи над точкой */
.mf-marker-label {
    position: absolute !important;
    left: 50% !important;
    bottom: 42px !important;
    transform: translateX(-50%) !important;
    padding: 5px 9px !important;
    border-radius: 7px !important;
    background: #17324a !important;
    color: #ffffff !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 12px rgba(17, 39, 64, 0.18) !important;
    z-index: 6 !important;
}

    /* линия от верхней подписи к точке */
    .mf-marker-label:after {
        content: "" !important;
        position: absolute !important;
        left: 50% !important;
        top: 100% !important;
        width: 1px !important;
        height: 32px !important;
        background: rgba(23, 50, 74, 0.35) !important;
        transform: translateX(-50%) !important;
        border: 0 !important;
    }

    /* подписи под точкой */
    .mf-marker-label.bottom {
        top: 42px !important;
        bottom: auto !important;
    }

        /* линия от нижней подписи к точке */
        .mf-marker-label.bottom:after {
            content: "" !important;
            position: absolute !important;
            left: 50% !important;
            bottom: 100% !important;
            top: auto !important;
            width: 1px !important;
            height: 32px !important;
            background: rgba(23, 50, 74, 0.35) !important;
            transform: translateX(-50%) !important;
            border: 0 !important;
        }

/* зона переходу між шкалами */
.mf-hardness-bridge {
    position: absolute !important;
    left: 42% !important;
    top: 112px !important;
    width: 25% !important;
    height: 56px !important;
    border-left: 1px dashed #b9c4cf !important;
    border-right: 1px dashed #b9c4cf !important;
    opacity: 0.8 !important;
}

    .mf-hardness-bridge span {
        position: absolute !important;
        left: 50% !important;
        top: 18px !important;
        transform: translateX(-50%) !important;
        background: #ffffff !important;
        padding: 0 8px !important;
        font-size: 12px !important;
        color: #7a8b9b !important;
        white-space: nowrap !important;
    }

/* пояснення */
.mf-hardness-legend {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 8px !important;
}

.mf-hardness-info {
    padding: 13px 15px !important;
    background: #f7f9fb !important;
    border: 1px solid #e3e9ef !important;
    border-radius: 12px !important;
}

    .mf-hardness-info strong {
        display: block !important;
        margin-bottom: 4px !important;
        font-size: 13px !important;
        color: #17324a !important;
    }

    .mf-hardness-info span {
        display: block !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
        color: #5f7388 !important;
    }

/* responsive */
@media screen and (max-width: 899px) {
    .mf-hardness-card {
        padding: 24px 18px !important;
    }

    .mf-hardness-graph {
        min-height: 310px !important;
    }

    .mf-scale-a {
        width: 72% !important;
    }

    .mf-scale-d {
        left: 42% !important;
        width: 58% !important;
    }

    .mf-hardness-bridge {
        left: 42% !important;
        width: 30% !important;
    }

    .mf-hardness-legend {
        grid-template-columns: 1fr !important;
    }

    .mf-marker-label {
        font-size: 10px !important;
        padding: 4px 7px !important;
    }
}

@media screen and (max-width: 599px) {
    .mf-hardness-title {
        font-size: 22px !important;
    }

    .mf-hardness-subtitle {
        font-size: 13.5px !important;
    }

    .mf-hardness-graph {
        min-height: 390px !important;
    }

    .mf-scale-a {
        left: 0 !important;
        top: 44px !important;
        width: 100% !important;
    }

    .mf-scale-d {
        left: 0 !important;
        top: 210px !important;
        width: 100% !important;
    }

    .mf-hardness-bridge {
        display: none !important;
    }

    .mf-scale-note {
        display: none !important;
    }

    .mf-marker-label {
        white-space: normal !important;
        width: 74px !important;
        text-align: center !important;
        font-size: 10px !important;
    }

    .mf-marker-label {
        bottom: 40px !important;
    }

        .mf-marker-label.bottom {
            top: 40px !important;
        }

            .mf-marker-label:after,
            .mf-marker-label.bottom:after {
                height: 30px !important;
            }
}
