/* HYPEDROP: каркас — шапка, подвал, контейнеры */

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.page { flex: 1; width: 100%; max-width: var(--container); margin: 0 auto; padding: 28px var(--gutter) 56px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 32px; letter-spacing: -0.01em; line-height: 1.15; }
.back-link { display: inline-block; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.panel { border: 1.5px solid var(--line); border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.panel > h2, .panel > .panel__title { margin: 0; font-size: 20px; font-weight: 700; }
.panel-soft { background: var(--panel-2); }
.sep { height: 1px; background: var(--line); border: 0; margin: 0; }
.sep-strong { background: var(--ink); }
.row { display: flex; justify-content: space-between; gap: 12px; }
.row__src { display: flex; flex-direction: column; }
.row__src small { font-size: 14px; color: var(--muted); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.total-row__label { font-size: 20px; font-weight: 700; }
.total-row__value { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Шапка ---------- */
.hd { background: var(--ink); color: var(--white); position: relative; z-index: 20; }
.hd a { color: var(--white); }
.hd a:hover { color: var(--lime); }
.hd :focus-visible { outline-color: var(--lime); }
.hd__in {
  max-width: var(--container); margin: 0 auto; height: var(--header-h); padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 14px;
}
.logo { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: 0.01em; text-decoration: none; flex-shrink: 0; margin-right: 6px; }
.logo span { color: var(--lime); }
.hd-cats { display: flex; gap: 14px; align-items: center; flex-shrink: 1; min-width: 0; }
.hd-cat {
  color: #D6D6D2 !important; text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.hd-cat:hover { color: var(--white) !important; }
.hd-cat[aria-current="true"] { color: var(--white) !important; border-bottom-color: var(--lime); }
.hd__gap { flex: 1 1 0; min-width: 8px; }
.hd-search {
  position: relative; display: flex; align-items: center; flex: 0 1 210px; min-width: 120px; height: 40px;
  background: #262624; border: 1.5px solid #5A5A56; border-radius: var(--r); padding: 0 4px 0 12px;
}
.hd-search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; color: var(--white); font: 400 14px var(--font-ui); outline: none; }
.hd-search input::placeholder { color: #A8A8A3; }
.hd-search:focus-within { outline: 3px solid var(--lime); outline-offset: 2px; }
.hd-search button {
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--lime); color: var(--ink);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hd-search__hint {
  position: absolute; top: calc(100% + 8px); left: 0; width: 260px; z-index: 30;
  background: var(--panel); color: #2A2A27; border: 1.5px solid #CFCFCA; border-radius: var(--r);
  padding: 10px 12px; font-size: 15px; display: flex; gap: 8px; align-items: center;
}
.hd-link { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hd-link-admin { color: var(--lime) !important; }
.hd-cart { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--r); flex-shrink: 0; }
.hd-cart__count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--lime); color: var(--ink); font: 700 12px/20px var(--font-ui); text-align: center; font-variant-numeric: tabular-nums;
}
.hd-guest { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.hd-guest .hd-link { padding: 10px 6px; }
.hd-reg {
  height: 40px; padding: 0 14px; border-radius: var(--r); background: var(--white); color: var(--ink) !important;
  font-weight: 600; font-size: 14px; text-decoration: none; display: flex; align-items: center;
}
.hd-reg:hover { background: var(--lime); }

.user-menu { position: relative; flex-shrink: 0; }
.user-menu summary {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer;
  height: 44px; padding: 0 4px; border-radius: var(--r);
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu__avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #3A3A37; color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.user-menu__name { font-size: 14px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__list {
  position: absolute; top: calc(100% + 4px); right: 0; width: 240px; background: var(--white); color: var(--ink);
  border: 1px solid #D9D9D4; border-radius: var(--r-lg); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px 0; z-index: 40;
}
.user-menu__email { padding: 10px 16px 8px; font-size: 14px; color: var(--muted); border-bottom: 1px solid #ECECE8; overflow-wrap: anywhere; }
.user-menu__list a, .user-menu__list button {
  display: block; width: 100%; text-align: left; padding: 10px 16px; border: 0; background: none;
  color: var(--ink) !important; text-decoration: none; font-size: 15px;
}
.user-menu__list a:hover, .user-menu__list button:hover { background: #F2F2EF; color: var(--ink) !important; }
.user-menu__list :focus-visible { outline-color: var(--focus); outline-offset: -3px; }
.user-menu__list .is-top { border-top: 1px solid #ECECE8; }

@media (max-width: 1180px) {
  .hd__in { padding: 0 16px; gap: 8px; }
  .logo { font-size: 17px; margin-right: 0; }
  .hd-cats { gap: 10px; }
  .hd-search { flex-basis: 200px; }
}
@media (max-width: 1100px) {
  .user-menu__name { display: none; }
}

/* ---------- Подвал ---------- */
.ft { background: var(--panel); border-top: 1px solid #DEDED9; margin-top: auto; }
.ft__in {
  max-width: var(--container); margin: 0 auto; padding: 32px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
}
.ft__brand { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.ft__logo { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.ft__brand span:last-child { font-size: 15px; color: var(--muted); }
.ft__nav { display: flex; gap: 24px; font-size: 15px; font-weight: 600; }
.ft__meta { display: flex; align-items: center; gap: 12px; }
.ft__tag { height: 28px; padding: 0 10px; border-radius: var(--r-sm); background: var(--ink); color: var(--white); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; }
.ft__ver { font: 14px var(--font-mono); color: var(--muted-2); }

/* ---------- Полоса админки и вкладки ---------- */
.admin-band { background: var(--lime); color: var(--ink); border-bottom: 2px solid var(--ink); }
.admin-band__in { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); height: 44px; display: flex; align-items: center; gap: 24px; }
.admin-band__label { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.tabs { display: flex; gap: 8px; }
.tab {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r);
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); border: 1.5px solid transparent;
}
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab[aria-current="page"] { background: var(--ink); color: var(--lime); }
.tools-tabs { display: flex; gap: 8px; border-bottom: 1.5px solid var(--ink); margin-bottom: 20px; padding-bottom: 12px; }
.tools-tabs .tab[aria-current="page"] { color: var(--white); }

/* ---------- Формы входа и регистрации ---------- */
.auth { flex: 1; display: flex; justify-content: center; padding: 64px 16px 80px; background: var(--panel); }
.auth__col { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.auth__card { background: var(--white); border: 1.5px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.auth__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.01em; }
.auth__alt { text-align: center; font-size: 15px; }
.auth__note { margin: 0; text-align: center; font-size: 15px; color: var(--muted); }
