/* GameUAE — минималистичная версия сайта (basic).
   Намеренно без анимаций, transition и теней: только чёткая вёрстка. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fff;
}

a { color: #14619e; text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 22px; margin: 0 0 4px; }

.b-wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }

/* --- Шапка --- */
.b-head { border-bottom: 1px solid #e2e2e2; }

.b-head__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.b-logo {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}
.b-logo b { color: #14619e; font-weight: 700; }
.b-logo:hover { text-decoration: none; }

.b-nav { display: flex; gap: 14px; white-space: nowrap; flex-wrap: wrap; }
.b-nav a { color: #333; }

/* --- Поиск + автоподбор --- */
.b-search {
  display: flex;
  flex: 1 1 260px;
  min-width: 200px;
  position: relative;
}
.b-search input {
  flex: 1;
  padding: 7px 10px;
  font-size: 15px;
  border: 1px solid #bbb;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  min-width: 0;
}
.b-search button {
  padding: 7px 14px;
  font-size: 15px;
  border: 1px solid #14619e;
  background: #14619e;
  color: #fff;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
}

.b-suggest {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 3px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
}
.b-suggest a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
}
.b-suggest a:last-child { border-bottom: 0; }
.b-suggest a:hover { background: #f3f6fa; text-decoration: none; }
.b-suggest img,
.b-suggest__noimg {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: cover;
  border: 1px solid #e2e2e2;
  border-radius: 3px;
  background: #f4f4f4;
}
.b-suggest__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b-suggest__price { white-space: nowrap; color: #14619e; font-weight: 600; font-size: 14px; }

/* --- Двухколоночная раскладка: категории слева + контент --- */
.b-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 20px 16px 40px;
}

.b-side { flex: 0 0 200px; }
.b-side a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  color: #333;
  border-radius: 3px;
}
.b-side a:hover { background: #f3f6fa; text-decoration: none; }
.b-side a.is-active { background: #14619e; color: #fff; }
.b-side a small { color: #999; }
.b-side a.is-active small { color: #cfe0ef; }

.b-content { flex: 1 1 auto; min-width: 0; }

.b-count { color: #888; font-size: 14px; margin: 0 0 16px; }

/* --- Таблица товаров / накладных --- */
.b-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.b-list th, .b-list td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e8e8e8;
  vertical-align: middle;
}
.b-list th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #888;
  border-bottom: 2px solid #ddd;
}
.b-list tfoot td { border-bottom: 0; border-top: 2px solid #ddd; }
.b-list tr:hover td { background: #f7f9fb; }
.b-num { text-align: right; white-space: nowrap; }
.b-art { color: #777; white-space: nowrap; }

/* Миниатюра товара */
.b-thumbcol { width: 48px; }
.b-thumbcell { width: 48px; }
.b-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid #e2e2e2;
  border-radius: 3px;
  display: block;
}
.b-thumb--empty { background: #f1f1f1; }

/* Форма «в корзину» в строке */
.b-add { display: flex; gap: 4px; }
.b-add input {
  width: 52px;
  padding: 5px 6px;
  border: 1px solid #bbb;
  border-radius: 3px;
  font-size: 14px;
  text-align: center;
}
.b-add button {
  padding: 5px 12px;
  font-size: 16px;
  line-height: 1;
  border: 1px solid #1a7f37;
  background: #1a7f37;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
}
.b-add button:hover { background: #156b2e; }

/* Кнопка */
.b-btn {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid #14619e;
  border-radius: 4px;
  background: #14619e;
  color: #fff;
}
.b-btn:hover { text-decoration: none; background: #114f81; }
.b-btn--alt { background: #fff; color: #14619e; }
.b-btn--alt:hover { background: #f3f6fa; color: #14619e; }
.b-allrow { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Корзина --- */
.b-tablewrap { overflow-x: auto; }

.b-qtycol { text-align: center; white-space: nowrap; }
.b-rmcol { width: 36px; }

/* Контрол количества: [−][поле][＋] одной группой */
.b-qty {
  display: inline-flex;
  align-items: stretch;
  margin: 0;
}
/* Скрытая первая submit-кнопка: ловит Enter в поле — уходит только qty,
   без delta (видимые −/＋ кнопки в DOM после неё). */
.b-qty__enter {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; border: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
}
.b-qty__btn {
  width: 30px;
  border: 1px solid #bbb;
  background: #f4f4f4;
  color: #333;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.b-qty__btn:hover { background: #e9e9e9; }
.b-qty__btn--dec { border-radius: 3px 0 0 3px; }
.b-qty__btn--inc { border-radius: 0 3px 3px 0; }
.b-qty__num {
  width: 50px;
  padding: 5px 4px;
  border: 1px solid #bbb;
  border-left: 0;
  border-right: 0;
  font-size: 14px;
  text-align: center;
  -moz-appearance: textfield;
}
.b-qty__num::-webkit-outer-spin-button,
.b-qty__num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Удалить позицию */
.b-rm {
  border: 0;
  background: none;
  color: #b03030;
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}
.b-rm:hover { color: #7d1f1f; }

/* Нижняя панель действий */
.b-cartbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.b-cartbar form { margin: 0; }
.b-cartbar__main { display: flex; gap: 10px; flex-wrap: wrap; }

/* Кнопка-«b-btn» на <button>: убираем дефолтный шрифт браузера */
button.b-btn { font: inherit; cursor: pointer; }

/* --- Оформление заказа --- */
.b-checkout { max-width: 540px; margin-top: 20px; }

.b-ship {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 12px 10px;
  margin: 0 0 16px;
}
.b-ship legend { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #888; padding: 0 4px; }
.b-ship label {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.b-ship label:last-child { border-bottom: 0; }
.b-ship input { margin: 3px 0 0; flex: 0 0 auto; }
.b-ship span { display: flex; flex-direction: column; gap: 2px; }
.b-ship small { color: #888; font-size: 13px; }

.b-field { display: block; margin-bottom: 16px; }
.b-field > span {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}
.b-field textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #bbb;
  border-radius: 3px;
  resize: vertical;
}
.b-checkout-total { font-size: 16px; margin: 14px 0; }

/* --- Вход --- */
.b-tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0 18px;
  border-bottom: 1px solid #ddd;
}
.b-tabs a {
  padding: 8px 14px;
  color: #555;
  border: 1px solid transparent;
  border-bottom: 0;
}
.b-tabs a:hover { text-decoration: none; background: #f3f6fa; }
.b-tabs a.is-active {
  color: #1a1a1a;
  font-weight: 600;
  border-color: #ddd;
  border-radius: 4px 4px 0 0;
  background: #fff;
  margin-bottom: -1px;
}

.b-form { max-width: 360px; }
.b-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: #666;
}
.b-form input {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 8px 10px;
  font-size: 15px;
  border: 1px solid #bbb;
  border-radius: 3px;
}
.b-form button {
  padding: 9px 22px;
  font-size: 15px;
  border: 1px solid #14619e;
  background: #14619e;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.b-hint { color: #888; font-size: 13px; margin-top: 14px; }

/* --- Кабинет / накладная --- */
.b-back { margin: 0 0 6px; font-size: 14px; }
.b-meta { color: #555; font-size: 14px; margin: 4px 0 18px; }
.b-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* --- Сообщения / пусто --- */
.b-flash {
  padding: 9px 12px;
  margin-bottom: 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f4f4f4;
  font-size: 14px;
}
.b-flash--success { border-color: #b6dcb6; background: #eef7ee; }
.b-flash--error   { border-color: #e2b6b6; background: #fbeeee; }
.b-empty { color: #888; padding: 16px 0; }

/* --- Подвал --- */
.b-foot {
  border-top: 1px solid #e2e2e2;
  padding: 16px;
  color: #888;
  font-size: 13px;
}

/* --- Мобильная раскладка --- */
@media (max-width: 760px) {
  .b-layout { flex-direction: column; gap: 14px; }
  .b-side {
    flex: none;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }
  .b-side a {
    padding: 4px 9px;
    border: 1px solid #ddd;
    font-size: 13px;
  }
  .b-side a small { display: none; }
  .b-art { display: none; }  /* колонка «Артикул» в списке товаров */
}
