/* Новый футер Русметалла. Изолированные стили, не затрагивают шапку и FAB. */

.rm-footer,
.rm-legal {
  --rm-blue: #0039a6;
  --rm-red: #d52b1e;
  --rm-text: #222222;
  --rm-muted: #515151;
  --rm-dim: #6f6f6f;
  --rm-line: #dde3ea;
  --rm-bg: #f4f6f9;
  --rm-legal-bg: #ffffff;
  /* Same cap as .d-block-width: 91.42em of body 14px. */
  --rm-max: 91.42em;
}

.rm-footer {
  position: relative;
  z-index: 2;
  overflow: visible;
  background: var(--rm-bg);
  border-top: 1px solid var(--rm-line);
  width: 100%;
  box-shadow: none;
}

.rm-footer a {
  text-decoration: none;
  text-transform: none;
}

.rm-footer__inner {
  width: 100%;
  max-width: var(--rm-max);
  margin: 0 auto;
  padding: 24px 0.9375em 18px;
  overflow: visible;
}

.rm-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.35fr);
  column-gap: 24px;
  row-gap: 20px;
  align-items: start;
  overflow: visible;
}

.rm-footer__col {
  overflow: visible;
  min-width: 0;
}

.rm-footer__col-title {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rm-line);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rm-blue);
}

.rm-footer__col-title--price {
  margin-top: 16px;
}

.rm-footer ul {
  margin: 0;
  list-style: none;
}

.rm-footer li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
}

.rm-footer__list > li + li {
  margin-top: 6px;
}

.rm-footer__link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--rm-text);
  text-transform: none;
  cursor: pointer;
}

.rm-footer__link:hover {
  color: var(--rm-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rm-footer__catalog-item {
  margin-top: 6px;
}

.rm-footer__catalog-toggle {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
  font-family: inherit;
  color: var(--rm-text);
  text-transform: none;
  text-align: left;
  cursor: pointer;
}

.rm-footer__catalog-toggle:hover {
  color: var(--rm-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rm-footer__chevron {
  width: 10px;
  height: 7px;
  flex: 0 0 auto;
  color: var(--rm-muted);
  transition: transform 0.2s ease;
}

.rm-footer__catalog-toggle.is-open .rm-footer__chevron {
  transform: rotate(180deg);
}

.rm-footer__catalog {
  display: none;
  margin: 8px 0 0;
  padding: 6px 0 2px 12px;
  list-style: none;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 4px;
}

.rm-footer__catalog li {
  margin: 0;
  padding: 0;
}

.rm-footer__catalog.is-open {
  display: grid;
}

.rm-footer__catalog a {
  display: inline-block;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
  color: #5c6570;
  text-transform: none;
}

.rm-footer__catalog a:hover {
  color: var(--rm-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 1200px) {
  .rm-footer__inner,
  .rm-footer__grid,
  .rm-footer__col,
  .rm-footer__list {
    overflow: visible;
  }

  .rm-footer__inner {
    padding-bottom: 32px;
  }

  .rm-footer__catalog-item {
    position: relative;
  }

  .rm-footer__catalog {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 30;
    width: max-content;
    margin: 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #d5dbe3;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    grid-template-columns: repeat(4, max-content);
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;
    column-gap: 16px;
    row-gap: 4px;
  }
}

.rm-footer__contacts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  row-gap: 8px;
}

.rm-footer__contacts li {
  margin: 0;
  padding: 0;
}

.rm-footer__contact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--rm-muted);
  text-transform: none;
}

.rm-footer__contact-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-footer__contact-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.rm-footer__contact-icon--mail {
  color: #434343;
}

.rm-footer__contact-icon--wa {
  color: #25d366;
}

.rm-footer__contact-icon--tg {
  color: #229ed9;
}

.rm-footer__contact:hover {
  color: var(--rm-blue);
}

.rm-footer-price {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rm-footer-price__qr {
  display: block;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
}

.rm-footer-price__qr img {
  display: block;
  width: 84px;
  height: 84px;
}

.rm-footer-price__meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 84px;
  gap: 4px;
  min-width: 0;
}

.rm-footer-price__name {
  font-size: 14px;
  line-height: 1.3;
  color: var(--rm-text);
}

.rm-footer-price__date {
  font-size: 12px;
  line-height: 1.3;
  color: var(--rm-dim);
}

.rm-footer-price__open {
  font-size: 14px;
  line-height: 1.3;
  color: var(--rm-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rm-footer-price__open:hover {
  color: #002f86;
}

.rm-legal {
  position: relative;
  z-index: 1;
  background: var(--rm-legal-bg);
  border-top: 1px solid var(--rm-line);
  width: 100%;
}

.rm-legal a {
  text-transform: none;
}

.rm-legal__inner {
  width: 100%;
  max-width: var(--rm-max);
  margin: 0 auto;
  padding: 12px 0.9375em 14px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
}

.rm-legal__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 16px;
  min-width: 0;
  flex: 0 0 auto;
  max-width: 100%;
}

.rm-legal__copy,
.rm-legal__dev {
  font-size: 13px;
  line-height: 22px;
  color: var(--rm-dim);
}

.rm-legal__dev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.rm-legal__dev img {
  display: block;
  height: 22px;
  width: auto;
}

.rm-legal__dev p {
  margin: 0;
}

.rm-legal__dev:hover {
  color: var(--rm-blue);
}

.rm-legal__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 16px;
  min-width: 0;
  flex: 0 0 auto;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.35;
  color: var(--rm-dim);
}

.rm-legal__links a {
  color: var(--rm-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.rm-legal__links a:hover {
  color: var(--rm-blue);
}

@media (max-width: 1100px) {
  .rm-footer__grid {
    grid-template-columns: 1fr 1.2fr;
    column-gap: 28px;
  }

  .rm-legal__links {
    max-width: 100%;
  }

  .rm-legal__links a {
    white-space: normal;
  }
}

@media (max-width: 800px) {
  .rm-footer__inner,
  .rm-legal__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .rm-footer__grid {
    column-gap: 20px;
  }

  .rm-footer__catalog {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .rm-footer__grid {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }

  .rm-footer__col--contacts {
    order: -1;
  }

  .rm-footer-price__qr,
  .rm-footer-price__qr img {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .rm-footer-price__meta {
    min-height: 72px;
  }

  .rm-footer__catalog {
    grid-template-columns: 1fr;
    padding-left: 14px;
  }

  .rm-legal__inner {
    padding-top: 12px;
    padding-bottom: 16px;
    align-items: flex-start;
  }

  .rm-legal__left {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .rm-legal__links {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
