/* Футер как на https://viochoco.ru/main_new (Tilda Zero Block rec2695530101) */

.footer {
  --footer-bg: #990000;
  --footer-text: #ffffff;
  --footer-btn-bg: #ffffff;
  --footer-btn-text: #990000;
  --footer-btn-hover: #f6f7ff;
  --footer-max: 1360px;
  --footer-side: 40px;
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 28px;
  padding: 0;
  border-radius: 40px 40px 0 0;
}

.footer .container {
  width: min(100% - 40px, calc(var(--footer-max) + var(--footer-side) * 2));
  max-width: calc(var(--footer-max) + var(--footer-side) * 2);
  margin-inline: auto;
  padding: 36px var(--footer-side) 32px;
  box-sizing: border-box;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.footer__logo {
  margin: 0;
  display: block;
  flex: 0 0 auto;
  width: calc(84px * 1477 / 553);
  height: 84px;
  overflow: hidden;
  font-size: 0 !important;
  line-height: 0 !important;
  letter-spacing: 0 !important;
  color: transparent;
  white-space: nowrap;
  background-color: var(--footer-text, #fff);
  -webkit-mask-image: url("../assets/viopak-logo.png");
  mask-image: url("../assets/viopak-logo.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: left center;
  mask-position: left center;
}

.footer__logo span {
  display: none;
}

@media (min-width: 640px) {
  .footer__top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin-bottom: 22px !important;
  }

  .footer__logo {
    flex: 0 0 auto !important;
    width: calc(102px * 1477 / 553) !important;
    height: 102px !important;
    max-width: none !important;
    display: block !important;
    white-space: nowrap !important;
  }

  .footer__logo span {
    display: none !important;
  }

  .footer__contacts {
    display: flex !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
  }

  .footer__btns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    margin-bottom: 24px !important;
  }

  .footer__bottom {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr) !important;
    align-items: start !important;
    gap: 20px 40px !important;
  }

  .footer__legal {
    justify-self: end !important;
    align-items: flex-end !important;
    text-align: right !important;
    max-width: none !important;
  }
}

.footer__contacts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.footer__icon {
  display: inline-flex;
  text-decoration: none;
  color: inherit;
}

.footer__icon .icon-round {
  width: 48px;
  height: 48px;
  background: #fff;
  color: var(--footer-btn-text);
  transition: background-color 0.2s ease;
}

.footer__icon:hover .icon-round {
  background: var(--footer-btn-hover);
}

.footer__icon .icon-svg,
.footer__meta-row .icon-svg {
  width: 20px;
  height: 20px;
}

.footer__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.footer__btns .btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: var(--footer-btn-bg);
  color: var(--footer-btn-text);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}

.footer__btns .btn:hover,
.footer__btns .btn:focus-visible {
  background: var(--footer-btn-hover);
  color: var(--footer-btn-text);
  border-color: #fff;
}

.footer__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
  gap: 20px 40px;
  align-items: start;
}

.footer__meta {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.footer__meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.05rem, 1.15vw, 1.2rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--footer-text);
  min-width: 0;
}

.footer__meta-row > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

a.footer__meta-row {
  color: inherit;
  text-decoration: none;
}

a.footer__meta-row:hover {
  color: var(--footer-btn-hover);
}

.footer__meta-row .icon-round {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: #fff;
  color: var(--footer-btn-text);
}

.footer__legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  justify-self: end;
  text-align: right;
  max-width: none;
}

.footer__legal a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: clamp(1.05rem, 1.15vw, 1.2rem);
  font-weight: 500;
  line-height: 1.35;
  opacity: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer__legal a:hover {
  color: var(--footer-btn-hover);
  text-decoration: none;
}

@media (max-width: 1199px) {
  .footer {
    border-radius: 32px 32px 0 0;
  }

  .footer .container {
    padding-top: 48px;
  }

  .footer__logo {
    width: calc(84px * 1477 / 553);
    height: 84px;
  }

  .footer__icon .icon-round {
    width: 56px;
    height: 56px;
  }

  .footer__meta-row,
  .footer__legal a {
    font-size: 1.05rem;
  }
}

@media (max-width: 639px) {
  .footer {
    border-radius: 24px 24px 0 0;
  }

  .footer .container {
    padding: 40px 20px 36px;
  }

  .footer__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
  }

  .footer__contacts {
    justify-content: flex-start;
  }

  .footer__logo {
    width: calc(72px * 1477 / 553);
    height: 72px;
    flex: none;
    display: block !important;
    white-space: nowrap !important;
  }

  .footer__logo span {
    display: none;
  }

  .footer__icon .icon-round {
    width: 48px;
    height: 48px;
  }

  .footer__btns {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 32px;
  }

  .footer__btns .btn {
    font-size: 16px;
    min-height: 56px;
  }

  .footer__bottom {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__legal {
    justify-self: start;
    max-width: none;
  }

  .footer__meta-row,
  .footer__legal a {
    font-size: 1rem;
  }
}

/* B2C-вариант: тёмный подвал ВИОШОКО без лого — только название. */
.footer--b2c {
  --footer-bg: #171b2e;
  --footer-btn-text: #171b2e;
}

.footer--b2c .footer__logo {
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  overflow: visible !important;
  background: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.08em !important;
  color: #fff !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
