@font-face {
  font-family: "MursGothic";
  src: url("./Fonts/MursGothic-WideDark.woff") format("woff"),
           url("./Fonts/MursGothic-WideDark.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Гарантирует высоту на весь экран */
  margin: 0;
  font-family: "MursGothic", Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #0a0a0a;
  scrollbar-gutter: stable;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

/* .login-overlay[hidden] — см. «Плавное закрытие окон» в конце файла */

.login-modal {
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 10px;
  padding: 18px 18px 16px;
}

.login-header {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.login-method {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: "MursGothic", Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #0b0b0b;
  appearance: none;
  outline: none;
  padding: 6px 38px 6px 0;
  cursor: pointer;
  text-align: center;
  position: relative;
  /* маленькая стрелка вниз справа */
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M2 2l4 4 4-4' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.login-inputArea {
  height: 68px;
  background: #e9e9e9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
}

.login-prefix-wrap {
  color: #8a8a8a;
  font-size: 16px;
  font-weight: 700;
  flex: 0 0 auto;
}

.login-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-family: "MursGothic", Arial, Helvetica, sans-serif;
}

.login-error {
  margin-top: 10px;
  font-size: 12px;
  color: #d00000;
  text-align: center;
}

.login-submit {
  margin-top: 14px;
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: #0b0b0b;
  color: #ffffff;
  cursor: pointer;
  font-family: "MursGothic", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.login-fine {
  margin-top: 10px;
  font-size: 12px;
  color: #4b4b4b;
  line-height: 1.2;
  text-align: center;
}

.login-close {
  display: none; /* как на макете: видна только кнопка "Войти" */
}

.size-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

/* .size-overlay[hidden] — см. «Плашка выбора размера» в конце файла */

.size-modal {
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 10px;
  padding: 18px 18px 16px;
}

.size-header {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.size-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0b0b0b;
  margin: 0;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  justify-content: center;
}

.size-box {
  width: 51px;
  min-height: 32px;
  border: 1px solid #a9a9a9;
  border-radius: 9px;
  background: #f3f3f3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0 3px;
  line-height: 1;
  cursor: pointer;
  transition: all 200ms ease;
}

.size-box:hover {
  background: #e0e0e0;
  border-color: #888888;
}

.size-box.selected {
  background: #111111;
  border-color: #111111;
}

.size-box.selected .size-top {
  color: #ffffff;
}

.size-box.selected .size-bottom {
  color: #cccccc;
}

.size-box--wide {
  width: 55px;
}

.size-top {
  font-size: 12px;
  font-weight: 700;
  color: #111111;
  text-transform: uppercase;
}

.size-bottom {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #878787;
}

.size-error {
  margin-bottom: 10px;
  font-size: 12px;
  color: #d00000;
  text-align: center;
}

.size-submit {
  margin-bottom: 14px;
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: #0b0b0b;
  color: #ffffff;
  cursor: pointer;
  font-family: "MursGothic", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.size-close {
  display: none;
}

.topbar {
  background: #0b0b0b;
}

.topbar__inner {
  max-width: 1500px;
  margin: 0 auto;
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

    .logo {
      color: #ffffff;
      text-decoration: none;
      text-transform: uppercase;
      font-size: 32px;
      font-weight: 600;
      line-height: 1;
      letter-spacing: 0.5px;
    }

.topbar__icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-img {
  width: 26px;
  height: 26px;
  display: block;
}

.page {
  flex: 1;
  width: 100%;
}

.products {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 28px 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 195px);
  gap: 26px 28px;
  justify-content: center;
}

.card {
  width: 100%;
}

.card__img {
  width: 195px;
  height: 261px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.card__price-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.card__price-icon {
  width: 14px;
  height: 14px;
  display: block;
  align-self: center;
  margin-top: -5px; /* подгонка визуального центра */
}

.card__price {
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}

.card__subtitle {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #505050;
  line-height: 1.15;
  min-height: 28px; /* чтобы карточки визуально выравнивались */
  width: 195px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__subtitle.card__link {
  color: #505050;
}

.card__link {
    color: inherit;
    text-decoration: none;
  }

  .card__link:hover {
    text-decoration: none;
  }

.buy-btn {
  margin-top: 10px;
  width: 100%;
  height: 34px;
  border: none;
  border-radius: 7px;
  background: #0b0b0b;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease;
  font-family: "MursGothic", Arial, Helvetica, sans-serif;
}

.buy-btn img {
  width: 16px;
  height: 16px;
  display: block;
}

.buy-btn:hover {
  transform: translateY(-1px);
  background: #111111;
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, 195px);
  }
}

@media (max-width: 820px) {
  .grid {
    grid-template-columns: repeat(2, 195px);
  }
}

@media (max-width: 430px) {
  .topbar__inner {
    padding: 0 14px;
  }

  .products {
    padding: 18px 14px 28px;
  }

  .grid {
    grid-template-columns: repeat(1, 195px);
  }
}
    @media (max-width: 480px) {
      .topbar__inner {
        padding: 0 14px;
      }

      .logo {
        font-size: 24px;
      }
    }
  @media (max-width: 768px) {
    /* Стили для планшетов и телефонов */
    .container {
        width: 95%;
        padding: 10px;
    }
    .sidebar {
        display: none; /* Скрыть боковую панель на телефоне */
    }
}
img, video {
    max-width: 100%;
    height: auto;
}
.search {
  flex: 1;
  display: flex;
  justify-content: flex-start; /* смещаем влево */
  margin-left: 250px; /* регулируй положение */
}

.search-icon {
  height: 40px; /* как на макете */
  object-fit: contain;
}
.footer {
  background: #0b0b0b;
  height: 64px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: auto;
}

.footer-content {
  color: #ffffff;
  text-transform: uppercase;
  font-size: 32px;
  font-weight: 600;
}
@media (max-width: 768px) {
  .topbar__inner {
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }

  .logo {
    font-size: 22px;
  }

  .topbar__icons {
    position: absolute;
    right: 12px;
    top: 12px;
  }

  .search {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .search-icon {
    width: 100%;
    max-width: 350px; /* чтобы не вылезал */
    height: auto;
  }
}
/* Адаптив для футера */

@media (max-width: 768px) {
  .footer { height: 60px; }
  .footer-content { font-size: 20px; }
}
/* ---------- Окно ввода кода из почты ---------- */
.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #0b0b0b;
  text-align: center;
}

.login-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: #4b4b4b;
  line-height: 1.3;
  text-align: center;
  word-break: break-word;
}

.login-input--code {
  text-align: center;
  font-size: 26px;
  letter-spacing: 10px;
}

.login-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: "MursGothic", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #4b4b4b;
  text-align: center;
  cursor: pointer;
}

.login-link:disabled {
  color: #9a9a9a;
  cursor: default;
}

/* ===================== ДИНАМИКА ===================== */


/* Кнопки профиля и кнопки в окнах — плавно приподнимаются при наведении, как «купить» на главной */
.profile-sideBtn,
.profile-save,
.profile-logout,
.login-submit {
  transition: transform 120ms ease, background 120ms ease;
}
.profile-sideBtn:hover,
.profile-save:hover,
.login-submit:hover {
  transform: translateY(-1px);
  background: #111111;
}
.profile-logout:hover {
  transform: translateY(-1px);
}
.login-submit--danger:hover {
  background: #a93226;
}

/* Если в системе включено «уменьшить движение» — без анимаций */
@media (prefers-reduced-motion: reduce) {
  .profile-sideBtn:hover,
  .profile-save:hover,
  .profile-logout:hover,
  .login-submit:hover {
    transform: none;
  }
}

/* Плавное появление и закрытие окон (вход, код из почты, QR-код, менеджеры, удаление товара).
   Скрытое окно невидимо и не ловит клики/фокус (visibility: hidden + pointer-events: none). */
.login-overlay {
  transition: opacity 220ms ease-out, visibility 0s linear 0s;
}
.login-overlay .login-modal {
  transition: opacity 280ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.login-overlay[hidden] {
  display: grid !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}
.login-overlay[hidden] .login-modal {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 200ms ease, transform 200ms ease;
}
/* Окна, которые скрипт создаёт прямо перед показом, тоже появляются плавно */
@starting-style {
  .login-overlay:not([hidden]) { opacity: 0; }
  .login-overlay:not([hidden]) .login-modal { opacity: 0; transform: translateY(14px) scale(0.97); }
}
@media (prefers-reduced-motion: reduce) {
  .login-overlay,
  .login-overlay .login-modal,
  .login-overlay[hidden],
  .login-overlay[hidden] .login-modal { transition: none; }
}

/* ===================== ДИНАМИКА: плашка выбора размера (главная) ===================== */
/* Плашка плавно появляется и закрывается — так же, как окно входа */
.size-overlay {
  transition: opacity 220ms ease-out, visibility 0s linear 0s;
}
.size-overlay .size-modal {
  transition: opacity 280ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.size-overlay[hidden] {
  display: grid !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}
.size-overlay[hidden] .size-modal {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 200ms ease, transform 200ms ease;
}

/* Размеры и кнопка «Добавить в корзину» плавно приподнимаются при наведении */
.size-box {
  transition: transform 120ms ease, background 200ms ease, border-color 200ms ease;
}
.size-box:hover {
  transform: translateY(-1px);
}
.size-submit {
  transition: transform 120ms ease, background 120ms ease;
}
.size-submit:hover {
  transform: translateY(-1px);
  background: #111111;
}

@media (prefers-reduced-motion: reduce) {
  .size-overlay,
  .size-overlay .size-modal,
  .size-overlay[hidden],
  .size-overlay[hidden] .size-modal { transition: none; }
  .size-box:hover,
  .size-submit:hover { transform: none; }
}

/* ---------- Окно «Подтвердите номер в Telegram» ---------- */
.tg-steps {
  margin: 4px 0 6px;
  padding-left: 22px;
  font-size: 15px;
  font-weight: 700;
  color: #0b0b0b;
  line-height: 1.6;
  text-align: left;
}
.tg-open {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}
.tg-status {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #4b4b4b;
  text-align: center;
  line-height: 1.35;
}
.tg-status--error { color: #c0392b; }
.tg-note { margin-top: 6px; }
