/* ============================================================
   ФИНАЛЬНЫЙ СТИЛЬ — НЕБО (оптимизированный, без дублей)
   ============================================================ */

:root {
  --primary: #f15a24;
  --primary-dark: #d14a1a;
  --primary-light: #ff8c00;
  --secondary: #4a90d9;
  --success: #2e7d32;
  --gold: #ffb800;
  --text-dark: #1a2a3a;
  --text-muted: #4a5a6a;
  --text-light: #8a9aaa;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: blur(20px) saturate(180%);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 32px rgba(74, 144, 217, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --radius-xs: 40px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Высота закреплённой шапки: под неё же отступает body */
  --header-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  /* Утреннее небо: синева наверху, светлеющая к горизонту. Тёплый
     рассвет поверх неё зажигает .sky__dawn по мере прокрутки. */
  background: linear-gradient(180deg,
      #8dc2e6 0%,
      #a8d2ec 26%,
      #c9e3f3 54%,
      #e8f1f6 78%,
      #f6eee4 100%);
  background-attachment: fixed;
  background-size: 100% 100%;
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  padding-top: var(--header-height);
  padding-bottom: 0;
}

/* ===== НЕБО И РАССВЕТ ===== */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Тёплый слой поверх синевы. Прозрачность ведёт sky.js: 0 наверху
   страницы, 1 внизу — так прокрутка и «зажигает» рассвет. */
.sky__dawn {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(48, 96, 150, 0.5) 0%,
      rgba(126, 154, 194, 0.16) 28%,
      rgba(255, 214, 174, 0.4) 58%,
      rgba(252, 174, 114, 0.58) 82%,
      rgba(243, 138, 74, 0.68) 100%);
  opacity: var(--dawn, 0);
  will-change: opacity;
}

/* Солнце: лежит ниже нижней кромки экрана и всплывает вместе с рассветом */
.sky__sun {
  position: absolute;
  left: 50%;
  bottom: -34vmax;
  width: 76vmax;
  height: 76vmax;
  border-radius: 50%;
  transform: translate(-50%, calc(var(--dawn, 0) * -22vmax));
  background: radial-gradient(circle,
      rgba(255, 245, 215, 1) 0%,
      rgba(255, 210, 138, 0.72) 24%,
      rgba(255, 172, 96, 0.32) 48%,
      rgba(255, 150, 70, 0) 70%);
  opacity: calc(0.12 + var(--dawn, 0) * 0.88);
  will-change: transform, opacity;
}

/* Облака — мягкие светлые пятна, медленно плывущие поперёк неба */
.sky__cloud {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.75) 0%,
      rgba(255, 255, 255, 0.28) 42%,
      rgba(255, 255, 255, 0) 70%);
  animation: skyDrift 70s ease-in-out infinite alternate;
}
.sky__cloud--1 {
  width: 60vmax;
  height: 34vmax;
  top: -8vmax;
  left: -12vmax;
  opacity: 0.55;
}
.sky__cloud--2 {
  width: 46vmax;
  height: 24vmax;
  top: 26%;
  right: -10vmax;
  left: auto;
  opacity: 0.4;
  animation-duration: 92s;
  animation-delay: -18s;
}
.sky__cloud--3 {
  width: 52vmax;
  height: 22vmax;
  bottom: 12%;
  left: 18%;
  opacity: 0.3;
  animation-duration: 110s;
  animation-delay: -40s;
}

@keyframes skyDrift {
  from { transform: translate3d(-4vmax, 0, 0); }
  to   { transform: translate3d(6vmax, -2vmax, 0); }
}

/* Движение — украшение, а не смысл: тем, кто его отключил, небо статично */
@media (prefers-reduced-motion: reduce) {
  .sky__cloud {
    animation: none;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== ШАПКА И НАВИГАЦИЯ (ДЕСКТОП) ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
/* Отлипнув от верха, шапка становится плотнее — иначе контент
   просвечивает сквозь стекло и мешает читать навигацию */
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.52);
  border-bottom-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 24px rgba(26, 42, 58, 0.08);
}
.header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-height);
}
.logo {
  flex: 0 0 auto;
}
.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-sun {
  height: 46px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}
.logo a:hover .logo-sun {
  transform: scale(1.03);
}
.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  height: 100%;
}

/* ----- Каталог: кнопка и меню разделов ----- */
.catalog-menu {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}
.catalog-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--primary-light), var(--primary));
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(241, 90, 36, 0.26);
  transition: var(--transition);
}
.catalog-menu__btn i {
  font-size: 0.95rem;
}
.catalog-menu__btn:hover,
.catalog-menu__btn.is-active,
.catalog-menu:hover .catalog-menu__btn {
  color: var(--white);
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 22px rgba(241, 90, 36, 0.38);
}

/* Панель висит под кнопкой; наведение на неё саму её не закрывает,
   поэтому мышь спокойно доходит до дальнего подраздела */
.catalog-menu__panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  width: 640px;
  max-width: calc(100vw - 48px);
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 48px rgba(26, 42, 58, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1100;
}
/* Невидимый мостик через зазор между кнопкой и панелью: без него курсор
   на пути вниз попадает в пустоту, меню теряет :hover и захлопывается */
.catalog-menu__panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}
.catalog-menu:hover .catalog-menu__panel,
.catalog-menu:focus-within .catalog-menu__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.catalog-menu__roots {
  /* Без собственного позиционирования: правую колонку раскладываем
     относительно всей панели, а не этого столбца */
  min-height: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Строка раздела тянется на всю ширину панели, а видимой остаётся только
   её левая часть — ссылка. Благодаря этому путь курсора от раздела к его
   подразделам целиком проходит внутри одной строки, и правая колонка не
   сбрасывается на первый раздел на полпути. */
.catalog-menu__item {
  position: static;
}
.catalog-menu__root {
  width: 232px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-dark);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.catalog-menu__root i {
  font-size: 0.7rem;
  color: var(--text-light);
  transition: color 0.15s ease;
}
.catalog-menu__item:hover > .catalog-menu__root,
.catalog-menu__item:focus-within > .catalog-menu__root {
  background: rgba(241, 90, 36, 0.1);
  color: var(--primary-dark);
}
.catalog-menu__item:hover > .catalog-menu__root i,
.catalog-menu__item:focus-within > .catalog-menu__root i {
  color: var(--primary);
}

/* Правая колонка занимает место рядом со списком разделов */
.catalog-menu__group {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 240px;
  right: 10px;
  display: none;
  overflow-y: auto;
  padding: 4px 4px 4px 20px;
  border-left: 1px solid rgba(26, 42, 58, 0.08);
}
/* Пока мышь не выбрала раздел, справа открыт первый — панель не
   встречает человека пустой половиной */
.catalog-menu__roots:not(:hover):not(:focus-within)
  .catalog-menu__item:first-child .catalog-menu__group,
.catalog-menu__item:hover > .catalog-menu__group,
.catalog-menu__item:focus-within > .catalog-menu__group {
  display: block;
}
.catalog-menu__group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.catalog-menu__group-title i {
  font-size: 0.68rem;
  transition: transform 0.15s ease;
}
.catalog-menu__group-title:hover {
  color: var(--primary-dark);
}
.catalog-menu__group-title:hover i {
  transform: translateX(3px);
}
.catalog-menu__list {
  columns: 2;
  column-gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.catalog-menu__list li {
  break-inside: avoid;
}
.catalog-menu__list a {
  display: block;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.catalog-menu__list a:hover {
  background: rgba(74, 144, 217, 0.12);
  color: var(--text-dark);
}

/* ----- Поиск ----- */
.search-form {
  flex: 1 1 auto;
  max-width: 440px;
  min-width: 160px;
  position: relative;
  margin: 0;
  height: 42px;
}
.search-form .form-control {
  height: 42px;
  padding-left: 18px;
  padding-right: 78px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  font-size: 0.9rem;
  transition: var(--transition);
}
.search-form .form-control:focus {
  border-color: rgba(241, 90, 36, 0.45);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.12);
  outline: none;
}
.search-form .clear-btn {
  position: absolute;
  right: 42px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.8rem;
  cursor: pointer;
  display: none;
  border-radius: 50%;
  transition: var(--transition);
  z-index: 2;
}
.search-form .clear-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-dark);
}
.search-form .search-submit-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--primary-light), var(--primary));
  color: var(--white);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(241, 90, 36, 0.3);
  z-index: 2;
}
.search-form .search-submit-btn:hover {
  box-shadow: 0 6px 18px rgba(241, 90, 36, 0.45);
}
.search-form .search-submit-btn:active {
  transform: translateY(-50%) scale(0.94);
}

/* ----- Иконки справа ----- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  /* Категории и поиск липнут к логотипу, иконки уходят к правому краю */
  margin-left: auto;
  padding-left: 12px;
}
.nav-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 60px;
  height: 50px;
  padding: 0 6px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted);
  background: transparent;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-icon-link__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
}
.nav-icon-link i {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--secondary);
  transition: color 0.2s ease;
}
.nav-icon-link__label {
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.nav-icon-link:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-dark);
}
.nav-icon-link:hover i {
  color: var(--primary);
}
.nav-icon-link.is-active {
  background: rgba(241, 90, 36, 0.1);
  color: var(--primary-dark);
}
.nav-icon-link.is-active i {
  color: var(--primary);
}


/* Счётчик держится за иконку, а не за угол кнопки */
.nav-badge {
  position: absolute;
  top: -6px;
  left: 60%;
  min-width: 17px;
  padding: 1px 5px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 2px 6px rgba(241, 90, 36, 0.35);
}
.nav-badge--alert {
  background: #d03b3b;
  box-shadow: 0 2px 6px rgba(208, 59, 59, 0.35);
}

/* Узкий десктоп: подписи уходят, остаются иконки */
@media (max-width: 1100px) {
  .nav-icon-link {
    min-width: 46px;
  }
  .nav-icon-link__label {
    display: none;
  }
  .nav-icon-link i {
    font-size: 1.2rem;
  }
  .search-form {
    max-width: 320px;
  }
}


/* ===== ГЕРОЙ ===== */
.hero {
  padding: 30px 0 20px;
}
.hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
.hero__text {
  flex: 1 1 55%;
  min-width: 280px;
  text-align: left;
}
.hero-tag {
  display: inline-block;
  background: rgba(241, 90, 36, 0.12);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-xs);
  padding: 4px 16px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}
.hero-tag i {
  margin-right: 6px;
}
.hero__text h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero__text h1 span {
  background: linear-gradient(to right, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 12px 0 20px;
  max-width: 460px;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.hero-rating {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.hero-rating i {
  color: #f5a623;
  margin-right: 2px;
}
.hero-features {
  flex: 1 1 40%;
  min-width: 260px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hero-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: var(--transition);
  min-height: 80px;
}
.hero-feature:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.hero-feature i {
  font-size: 1.8rem;
  color: var(--primary);
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.hero-feature div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.hero-feature span {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-dark);
}
.hero-feature small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== КНОПКИ ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 60px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  letter-spacing: 0.3px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--gold));
  color: var(--white);
  box-shadow: 0 8px 28px rgba(241, 90, 36, 0.4);
}
.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(241, 90, 36, 0.5);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(241, 90, 36, 0.3);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  color: var(--text-dark);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-4px);
}

/* ===== КАРТОЧКИ ТОВАРОВ ===== */
.products {
  padding: 20px 0 50px;
}
.section__header {
  text-align: center;
  margin-bottom: 20px;
}
.section__header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
}
.section__header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 4px;
}
.section__header p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 6px;
}
/* Карточка товара в духе маркетплейсов: фото во всю ширину, под ним
   цена крупно, рейтинг, «бренд / название», магазин и кнопка. */
.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}
.product__card {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px) saturate(180%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.product__card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 40px rgba(74, 144, 217, 0.14);
}

/* --- Фото и бейджи поверх него --- */
.product__media {
  position: relative;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}
.product__media-link {
  display: block;
}
.product__card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.product__card:hover img {
  transform: scale(1.04);
}
.product__discount {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(241, 90, 36, 0.35);
}
.product__flag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(26, 42, 58, 0.75);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 30px;
}

/* Сердечко «в избранное» */
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(26, 42, 58, 0.12);
  z-index: 2;
}
.fav-btn:hover {
  background: var(--white);
  color: var(--primary);
  transform: scale(1.08);
}
.fav-btn--active {
  color: var(--primary);
}
.fav-btn--active:hover {
  color: var(--primary-dark);
}
.fav-btn:active {
  transform: scale(0.9);
}
/* На странице товара сердечко стоит в ряд с кнопкой корзины,
   а не поверх фото — поэтому позиционирование сбрасывается */
.product-detail__actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.product-detail__actions .fav-btn {
  position: static;
  width: 52px;
  height: auto;
  min-height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.product-detail__actions .fav-btn:hover {
  transform: none;
  background: var(--white);
}

/* --- Текстовая часть --- */
.product__body {
  padding: 10px 12px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product__price {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.price__current {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}
.price__current.price-discount {
  color: var(--primary);
}
.price__old {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 0.85rem;
}
.product__title {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.88rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product__title:hover {
  color: var(--primary);
}
.product__brand {
  font-weight: 700;
}
.product__name {
  color: var(--text-muted);
}
.product__title:hover .product__name {
  color: var(--primary);
}
.product__rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
}
.product__rating i {
  color: var(--gold);
  font-size: 0.72rem;
}
.product__rating-value {
  font-weight: 700;
  color: var(--text-dark);
}
.product__rating-count {
  color: var(--text-light);
}
.product__rating--empty {
  color: var(--text-light);
}
.product__seller {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--secondary);
  text-decoration: none;
  margin-top: auto;
  padding-top: 2px;
}
.product__seller:hover {
  color: var(--primary);
}
.product__seller--platform {
  color: var(--text-muted);
}
/* Бейдж наличия — на карточке товара его заменяет .product__flag,
   но на странице товара статус по-прежнему выводится текстом */
.product__status {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 14px;
  border-radius: 30px;
  background: rgba(74, 144, 217, 0.12);
  color: var(--secondary);
  font-weight: 600;
}
.product__status.archived {
  background: rgba(138, 154, 170, 0.18);
  color: var(--text-light);
}
.product__footer {
  padding: 0 12px 12px;
}
.btn-add {
  width: 100%;
  padding: 9px;
  border: 1px solid rgba(74, 144, 217, 0.25);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
  border-radius: 40px;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
}
.btn-add:hover {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
  box-shadow: 0 8px 24px rgba(74, 144, 217, 0.3);
}
.btn-add:active {
  transform: scale(0.98);
}
/* Товар уже отложен: вместо кнопки счётчик «− N +». Занимает ровно то же
   место, что и кнопка, — карточка не дёргается при добавлении */
.cart-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 3px;
  border: 1px solid rgba(74, 144, 217, 0.25);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
}
.cart-stepper__btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(74, 144, 217, 0.12);
  color: var(--secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.cart-stepper__btn:hover:not(:disabled) {
  background: var(--secondary);
  color: var(--white);
}
.cart-stepper__btn:active:not(:disabled) {
  transform: scale(0.92);
}
.cart-stepper__btn:disabled {
  opacity: 0.4;
  cursor: default;
}
/* «Минус» на единице убирает товар — и выглядит как удаление */
.cart-stepper__btn:first-child:hover .fa-trash-can {
  color: var(--white);
}
.cart-stepper__value {
  flex: 1 1 auto;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1;
}
.cart-stepper__value:hover {
  color: var(--primary);
}
/* Пока ответ не пришёл, счётчик слегка гаснет — видно, что клик принят */
.cart-stepper.htmx-request {
  opacity: 0.6;
}

/* --- Пустое состояние (избранное и т.п.) --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.empty-state__icon {
  font-size: 2.4rem;
  color: var(--text-light);
  margin-bottom: 12px;
}
.empty-state__title {
  font-weight: 800;
  color: var(--text-dark);
}
.empty-state__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 320px;
  margin: 6px auto 18px;
}

/* Счётчик у вкладки профиля */
.tab-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.5;
}
.section__footer {
  text-align: center;
  margin-top: 30px;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination-custom {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
}
.pagination-custom .page-item {
  list-style: none;
}
.pagination-custom .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.pagination-custom .page-link:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.pagination-custom .page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  box-shadow: 0 6px 20px rgba(241, 90, 36, 0.25);
}
.pagination-custom .page-item.disabled .page-link {
  opacity: 0.3;
  pointer-events: none;
}
.per-page-select {
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.per-page-select:focus {
  border-color: var(--primary);
}

/* ===== ТОСТЫ ===== */
#toast-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}
#toast-container .toast-premium {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  max-width: 380px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#toast-container .toast-premium.show {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.toast-premium-content {
  text-align: center;
  color: #1a1a1a;
}
.toast-premium-content .toast-body {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.5;
}
.toast-premium-content .toast-body strong {
  color: var(--primary);
  font-weight: 700;
}
.toast-premium-content .toast-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.toast-premium-content .btn-outline-gold {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid rgba(44, 62, 80, 0.25);
  border-radius: var(--radius-xs);
  padding: 6px 24px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.toast-premium-content .btn-outline-gold:hover {
  background: rgba(44, 62, 80, 0.08);
  border-color: var(--text-dark);
}
.toast-premium-content .btn-gold {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-xs);
  padding: 8px 28px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
}
.toast-premium-content .btn-gold:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(241, 90, 36, 0.3);
}

/* ===== СТАТУС-БАР (ТРЕКИНГ) ===== */
.status-timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 0 20px;
  margin: 30px 0 20px;
}
.status-timeline::before {
  display: none;
}
.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  text-align: center;
}
.step-icon {
  /* Кружок перекрывает соединительную линию, поэтому лежит слоем выше */
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
  border: 3px solid #dee2e6;
}
.status-step.completed .step-icon {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.status-step.active .step-icon {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 6px rgba(241, 90, 36, 0.2);
}
.step-label {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
}
.status-step.completed .step-label {
  color: var(--success);
}
.status-step.active .step-label {
  color: var(--primary);
  font-weight: 700;
}
.status-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 3px;
  background: #dee2e6;
}
.status-step.completed:not(:last-child)::after {
  background: var(--success);
}
.status-step.active:not(:last-child)::after {
  background: var(--primary);
}

/* ===== ФОРМЫ И ФИЛЬТРЫ ===== */
.form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  padding: 12px 16px;
  transition: var(--transition);
  color: var(--text-dark);
}
.form-control:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.1);
  outline: none;
}
.form-control::placeholder {
  color: var(--text-light);
}
.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}
.form-text {
  color: var(--text-muted);
  font-size: 0.8rem;
}
/* ===== АДМИНКА ===== */
.admin-table {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-table th {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 700;
}
.admin-table td,
.admin-table th {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== КНОПКИ КОЛИЧЕСТВА В КОРЗИНЕ ===== */
.btn-quantity {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #dee2e6;
  background: white;
  color: var(--text-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}
.btn-quantity:hover {
  background: #f8f9fa;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-quantity:active {
  transform: scale(0.95);
}

/* ===== ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px) saturate(180%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: rgba(241, 90, 36, 0.3);
}
.order-card:active,
.cart-item:active {
  transform: scale(0.99);
}
/* ==================================================================
   МОБИЛЬНЫЕ СТИЛИ (ТОЛЬКО ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ)
   ================================================================== */

/* Нижняя навигация — только на мобильных.
   Без этого правила она раскрывается голыми ссылками внизу десктопных страниц. */
.mobile-nav {
  display: none;
}

/* Настройки для экранов ≤ 768px */
@media (max-width: 768px) {
  /* Позиционирование и структура шапки на мобильных — см. header-mobile.css.
     Здесь остаются только правила, не относящиеся к шапке/поиску. */
  .header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .logo-sun {
    height: 44px !important;
  }
  .header .nav {
    display: none !important;
  }
  .mobile-cart {
    display: none !important;
  }
  .logo {
    flex: 0 0 auto;
  }

  body {
    padding-bottom: 90px;
  }

  /* Герой */
  .hero {
    padding: 20px 0 10px;
  }
  .hero__inner {
    flex-direction: column;
    gap: 20px;
  }
  .hero__text {
    text-align: center;
    flex: 1 1 100%;
  }
  .hero__text h1 {
    font-size: 2.4rem;
  }
  .hero__text p {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    font-size: 1rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-features {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .hero-feature {
    padding: 14px 16px;
    min-height: 70px;
    border-radius: var(--radius-md);
  }
  .hero-feature i {
    font-size: 1.4rem;
    width: 32px;
  }
  .hero-feature span {
    font-size: 0.9rem;
  }
  .hero-feature small {
    font-size: 0.75rem;
  }

  /* Товары */
  .products {
    padding: 10px 0 30px;
  }
  .section__header h2 {
    font-size: 1.8rem;
  }
  .products__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  /* На телефоне небо спокойнее: облака стоят, рассвет мягче */
  .sky__cloud {
    animation: none;
    opacity: 0.35;
  }

  /* Мобильная нижняя навигация */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 400px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 60px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 6px 12px;
    justify-content: space-around;
    align-items: center;
    height: 64px;
  }
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 500;
    gap: 2px;
    padding: 4px 8px;
    transition: color 0.2s;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    border-radius: var(--radius-xs);
    background: transparent;
  }
  .mobile-nav a i {
    font-size: 1.4rem;
    color: var(--secondary);
    transition: color 0.2s;
  }
  .mobile-nav a span {
    line-height: 1.2;
  }
  .mobile-nav a:first-child i {
    color: var(--primary);
  }
  .mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-dark);
  }
  .mobile-nav a:active {
    transform: scale(0.95);
  }

  /* Строка поиска и кнопка фильтров на мобильных — см. header-mobile.css */

  /* Скрываем десктопную кнопку фильтров */
  .d-md-block.d-none {
    display: none !important;
  }
}

/* Дополнительные мобильные уточнения для ≤ 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }
  body {
    padding-bottom: 80px;
  }
  .hero__text h1 {
    font-size: 1.8rem;
  }
  .hero__text p {
    font-size: 0.9rem;
    margin: 8px 0 14px;
  }
  .hero-tag {
    font-size: 0.7rem;
    padding: 2px 12px;
    margin-bottom: 8px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  .hero-rating {
    font-size: 0.8rem;
  }
  .hero-features {
    gap: 8px;
  }
  .hero-feature {
    padding: 12px 14px;
    min-height: 60px;
    border-radius: var(--radius-sm);
  }
  .hero-feature i {
    font-size: 1.2rem;
    width: 28px;
  }
  .hero-feature span {
    font-size: 0.85rem;
  }
  .hero-feature small {
    font-size: 0.7rem;
  }
  .products {
    padding: 8px 0 20px;
  }
  .section__header h2 {
    font-size: 1.5rem;
  }
  .section__header p {
    font-size: 0.9rem;
  }
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .product__body {
    padding: 8px 8px 6px;
    gap: 3px;
  }
  .price__current {
    font-size: 1rem;
  }
  .price__old {
    font-size: 0.72rem;
  }
  .product__title {
    font-size: 0.78rem;
  }
  .product__rating,
  .product__seller {
    font-size: 0.68rem;
  }
  .fav-btn {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  .product__footer {
    padding: 0 8px 8px;
  }
  .btn-add {
    font-size: 0.72rem;
    padding: 6px;
    min-height: 34px;
    gap: 4px;
  }
  .mobile-nav {
    height: 56px;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    bottom: 12px;
    width: calc(100% - 24px);
  }
  .mobile-nav a i {
    font-size: 1.2rem;
  }
  .mobile-nav a span {
    font-size: 0.55rem;
  }
  body {
    padding-bottom: 72px;
  }
  .cart-item {
    padding: 12px !important;
  }
  .cart-item .btn-quantity {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.7rem !important;
  }
  .cart-item .quantity-control {
    gap: 4px !important;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 4px;
  }
  body {
    padding-bottom: 68px;
  }
  .hero__text h1 {
    font-size: 1.5rem;
  }
  .hero__text p {
    font-size: 0.8rem;
  }
  .hero-feature {
    padding: 6px 8px;
  }
  .hero-feature i {
    font-size: 0.9rem;
    width: 18px;
  }
  .hero-feature span {
    font-size: 0.7rem;
  }
  .hero-feature small {
    font-size: 0.6rem;
  }
  .btn {
    padding: 10px 20px;
    font-size: 0.8rem;
    min-height: 38px;
  }
  .products__grid {
    gap: 6px;
  }
  .product__body {
    padding: 6px 6px 4px;
  }
  .price__current {
    font-size: 0.9rem;
  }
  .price__old {
    font-size: 0.65rem;
  }
  .product__title {
    font-size: 0.72rem;
  }
  .product__rating,
  .product__seller {
    font-size: 0.62rem;
  }
  .product__footer {
    padding: 0 6px 6px;
  }
  .btn-add {
    font-size: 0.65rem;
    padding: 4px;
    min-height: 30px;
  }
  .mobile-nav {
    height: 48px;
    border-radius: 30px;
    padding: 4px 8px;
    bottom: 8px;
    width: calc(100% - 16px);
  }
  .mobile-nav a i {
    font-size: 1rem;
  }
  .mobile-nav a span {
    font-size: 0.5rem;
  }
  .mobile-nav a {
    min-width: 36px;
    min-height: 36px;
  }
  body {
    padding-bottom: 60px;
  }
}

/* Отзывы */
.review-item {
    padding: 12px 0;
}
.review-item .text-warning {
    color: #f5a623 !important;
}

/* Сообщения */
#message-list .bg-primary {
    background-color: #f15a24 !important;
}
#message-list .bg-light {
    background-color: rgba(255,255,255,0.6) !important;
}
/* ==================================================================
   КАБИНЕТ ПРОДАВЦА И ВИТРИНА МАГАЗИНА
   ================================================================== */

/* ----- Шапка кабинета ----- */
.seller-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.seller-head__info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.seller-head__name {
  font-weight: 800;
  margin: 0;
  font-size: 1.6rem;
}

/* ----- Статус магазина ----- */
.seller-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 30px;
  white-space: nowrap;
}
.seller-status--active {
  background: rgba(46, 125, 50, 0.12);
  color: var(--success);
}
.seller-status--pending {
  background: rgba(255, 184, 0, 0.16);
  color: #9a6b00;
}
.seller-status--blocked {
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
}

/* ----- Уведомление в кабинете ----- */
.seller-notice {
  background: rgba(255, 184, 0, 0.14);
  border: 1px solid rgba(255, 184, 0, 0.35);
  color: #7a5400;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* ----- Вкладки кабинета ----- */
.seller-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.seller-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.seller-tabs a:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-dark);
  transform: translateY(-2px);
}
.seller-tabs a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(241, 90, 36, 0.25);
}

/* ----- Плитки статистики ----- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.55);
}
.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 144, 217, 0.12);
  color: var(--secondary);
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.stat-card__value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-dark);
}
.stat-card__label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.stat-card__hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 6px;
}

/* ----- Фильтры-пилюли (заказы, продавцы) ----- */
.seller-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.seller-filter a {
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}
.seller-filter a:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-dark);
}
.seller-filter a.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}
.filter-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  text-align: center;
}

/* ----- Статус позиции заказа ----- */
.item-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 30px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.item-status--new {
  background: rgba(241, 90, 36, 0.14);
  color: var(--primary);
}
.item-status--packed,
.item-status--accepted {
  background: rgba(74, 144, 217, 0.14);
  color: var(--secondary);
}
.item-status--shipped {
  background: rgba(255, 184, 0, 0.18);
  color: #9a6b00;
}
.item-status--delivered,
.item-status--done {
  background: rgba(46, 125, 50, 0.14);
  color: var(--success);
}
.item-status--returned {
  background: rgba(208, 59, 59, 0.14);
  color: #d03b3b;
}
.item-status--cancelled {
  background: rgba(138, 154, 170, 0.18);
  color: var(--text-light);
}

/* ----- Строка заказа в списке ----- */
.order-row {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.order-row:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}
.order-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.order-row__id {
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
}
.order-row__id:hover {
  color: var(--primary);
}
.order-row__sum {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
}
.order-row__items {
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  padding-top: 8px;
}
.order-row__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.9rem;
}

/* ----- Карточка позиции в детали заказа ----- */
.order-item-card {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.order-item-card:last-child {
  border-bottom: none;
}
.order-item-card__img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
}
.order-item-card__body {
  flex: 1;
  min-width: 0;
}
.order-item-card__name {
  font-weight: 600;
}
.order-item-card__name a {
  color: var(--text-dark);
  text-decoration: none;
}
.order-item-card__name a:hover {
  color: var(--primary);
}
.order-item-card__form {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 340px;
}

/* ----- Продавец в карточке товара (каталог) ----- */
.product__seller {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  margin-bottom: 4px;
  transition: color 0.2s;
}
.product__seller:hover {
  color: var(--primary);
}
.product__seller--platform {
  color: var(--text-light);
}

/* ----- Блок продавца в карточке товара (детальная) ----- */
.seller-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin: 16px 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.seller-box__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 144, 217, 0.14);
  color: var(--secondary);
  overflow: hidden;
}
.seller-box__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.seller-box__body {
  flex: 1;
  min-width: 0;
}
.seller-box__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}
.seller-box__name {
  display: block;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
}
a.seller-box__name:hover {
  color: var(--primary);
}
.seller-box__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ----- Приглашение стать продавцом (профиль) ----- */
.seller-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.seller-cta__title {
  font-weight: 700;
  font-size: 1.05rem;
}

/* ----- Мобильная адаптация кабинета ----- */
@media (max-width: 767px) {
  .seller-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .seller-tabs a {
    white-space: nowrap;
  }
  .order-item-card__form {
    max-width: none;
  }
}

/* ==================================================================
   СВОДКА ПРОДАЖ И ГРАФИК ЗАКАЗОВ
   ==================================================================
   Цвета графика вынесены в токены: серии задаются здесь одним местом.
   Значения проверены валидатором палитры против поверхности карточки
   (#f1f2f4): акцент 3.4:1, серый 3.0:1, отделимость ΔE 22.4 при обычном
   зрении и 15.2 при симуляции CVD. Серый намеренно бесцветный — форма
   графика emphasis: текущий период акцентный, прошлый уходит в фон. */

.summary {
  --chart-accent: #f15a24;   /* текущий период */
  --chart-muted: #7c8b9b;    /* прошлый период (контекст) */
  --chart-grid: #dde3e9;     /* сетка — волосяная, рецессивная */
  --chart-axis: #c3ccd5;     /* базовая линия */
  --chart-ink: #5a6a7a;      /* подписи осей: текстовый токен, не цвет серии */
  --chart-surface: #f1f2f4;

  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.summary__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.summary__hint {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ----- Ключевые цифры ----- */
.summary__figures {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
.figure__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
/* Ведущее число сводки — ровно одно на экране */
.figure__hero {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}
.figure__value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-dark);
}
.figure__value--muted {
  color: var(--text-muted);
}

/* ----- Изменение к прошлому периоду ----- */
.delta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 6px;
}
.delta--up {
  color: #006300;
}
.delta--down {
  color: #d03b3b;
}
.delta--flat {
  color: var(--text-muted);
}
.delta--none {
  color: var(--text-light);
  font-weight: 500;
}
.delta__vs {
  color: var(--text-light);
  font-weight: 400;
}

/* ----- График ----- */
.chart {
  position: relative;
  margin-top: 16px;
}
.chart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.chart__legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.chart__key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.chart__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.chart__dot--accent {
  background: var(--chart-accent);
}
.chart__dot--muted {
  background: var(--chart-muted);
}

/* Переключатель метрики */
.chart__metrics {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  padding: 3px;
}
.chart__metrics button {
  border: none;
  background: transparent;
  border-radius: 30px;
  padding: 4px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.chart__metrics button:hover {
  color: var(--text-dark);
}
.chart__metrics button.active {
  background: var(--chart-accent);
  color: var(--white);
}

.chart__plot {
  width: 100%;
  min-height: 260px;
}
.chart__plot svg {
  display: block;
  overflow: visible;
}

/* Подсказка при наведении */
.chart__tooltip {
  display: none;
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(26, 42, 58, 0.95);
  color: #fff;
  font-size: 0.8rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.chart__tip-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.chart__tip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
}
.chart__tip-row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* Табличное представление */
.chart__details {
  margin-top: 12px;
}
.chart__details summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--secondary);
  font-weight: 600;
}
.chart__table {
  font-size: 0.85rem;
}
.chart__table td {
  font-variant-numeric: tabular-nums;
}

/* Пустое состояние */
.chart__empty {
  text-align: center;
  padding: 36px 20px 12px;
  color: var(--text-light);
}
.chart__empty i {
  font-size: 2.2rem;
  opacity: 0.35;
}
.chart__empty p {
  margin: 14px auto 0;
  max-width: 420px;
  font-size: 0.9rem;
}

@media (max-width: 767px) {
  .summary {
    padding: 18px;
  }
  .summary__figures {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .summary__figures .figure:first-child {
    grid-column: 1 / -1;
  }
  .figure__hero {
    font-size: 2.1rem;
  }
  .delta__vs {
    display: none;
  }
}

/* ==================================================================
   ПОДСКАЗКИ ПОИСКА
   ================================================================== */

.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-md);
  /* Плотнее остального стекла: сквозь список не должны просвечивать
     карточки товаров — читаемость здесь важнее прозрачности */
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 44px rgba(26, 42, 58, 0.18);
}
.search-suggest[hidden] {
  display: none;
}

.search-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}
.search-suggest__item:hover,
.search-suggest__item.active {
  background: rgba(241, 90, 36, 0.09);
  color: var(--text-dark);
}
.search-suggest__item i {
  width: 16px;
  flex-shrink: 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
}

.search-suggest__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Совпавшая часть запроса */
.search-suggest__text b {
  font-weight: 700;
  color: var(--primary);
}

.search-suggest__extra {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-light);
  padding-left: 8px;
}

@media (max-width: 767px) {
  .search-suggest {
    max-height: 60vh;
  }
  .search-suggest__extra {
    display: none;
  }
}

/* Позиционирование подсказок для мобильной строки поиска — см. header-mobile.css */

/* ==========================================================================
   СКЛАД И ПОСТАВКИ
   ========================================================================== */

/* ----- Статус заказа: общий бейдж для склада, продавца и покупателя ----- */
.order-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.order-status--new,
.order-status--paid {
  background: rgba(241, 90, 36, 0.14);
  color: var(--primary);
}
.order-status--assembling,
.order-status--processing {
  background: rgba(74, 144, 217, 0.16);
  color: var(--secondary);
}
.order-status--shipped {
  background: rgba(255, 184, 0, 0.2);
  color: #9a6b00;
}
.order-status--delivered,
.order-status--completed {
  background: rgba(46, 125, 50, 0.16);
  color: var(--success);
}
.order-status--not_delivered {
  background: rgba(208, 59, 59, 0.16);
  color: #d03b3b;
}
.order-status--cancelled {
  background: rgba(138, 154, 170, 0.2);
  color: var(--text-light);
}

/* ----- Статус поставки ----- */
.supply-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.supply-status--draft {
  background: rgba(138, 154, 170, 0.2);
  color: var(--text-light);
}
.supply-status--submitted {
  background: rgba(255, 184, 0, 0.2);
  color: #9a6b00;
}
/* Ход продавца: он должен бросаться в глаза — это призыв к действию */
.supply-status--accepted {
  background: rgba(241, 90, 36, 0.16);
  color: var(--primary);
}
.supply-status--closed {
  background: rgba(46, 125, 50, 0.16);
  color: var(--success);
}
.supply-status--rejected {
  background: rgba(208, 59, 59, 0.16);
  color: #d03b3b;
}

/* ----- Остаток на складе ----- */
.stock-badge {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(46, 125, 50, 0.12);
  color: var(--success);
}
.stock-badge--low {
  background: rgba(255, 184, 0, 0.2);
  color: #9a6b00;
}
.stock-badge--empty {
  background: rgba(208, 59, 59, 0.14);
  color: #d03b3b;
}

/* ----- Плитки очередей на витрине склада ----- */
.wh-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.wh-tile {
  display: block;
  text-decoration: none;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.35);
  transition: var(--transition);
}
.wh-tile:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}
.wh-tile__value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-dark);
}
.wh-tile__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}
/* Очередь, требующая действия прямо сейчас */
.wh-tile--urgent .wh-tile__value {
  color: var(--primary);
}
.wh-tile--muted .wh-tile__value {
  color: var(--text-light);
}

/* ----- Журнал заказа ----- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 2px solid rgba(74, 144, 217, 0.25);
}
.timeline__item {
  position: relative;
  padding-bottom: 16px;
}
.timeline__item:last-child {
  padding-bottom: 0;
}
.timeline__item::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--secondary);
  border: 2px solid #fff;
}
/* Последнее событие — текущее состояние заказа */
.timeline__item:last-child::before {
  background: var(--primary);
}
.timeline__status {
  font-weight: 700;
  color: var(--text-dark);
}
.timeline__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.timeline__comment {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ----- Приёмка поставки ----- */
.receipt-input {
  width: 90px;
}
.receipt-row--short {
  background: rgba(255, 184, 0, 0.1);
}

/* ----- Блок действия склада ----- */
.wh-action {
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}
.wh-action__title {
  font-weight: 700;
  margin-bottom: 10px;
}
.wh-action--danger {
  background: rgba(208, 59, 59, 0.06);
  border-color: rgba(208, 59, 59, 0.2);
}

@media (max-width: 576px) {
  .wh-tile__value {
    font-size: 1.5rem;
  }
}

/* ----- Нехватка товара при оформлении ----- */
.cart-item__shortage {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #d03b3b;
}
.cart-item__shortage i {
  margin-right: 4px;
}

/* Кнопка «В корзину» у закончившегося товара: место занимает то же,
   но видно, что нажимать нечего */
.btn-add--out,
.btn-add:disabled {
  background: rgba(138, 154, 170, 0.18);
  color: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-add--out:hover {
  transform: none;
}

/* Плашка на фото карточки */
.product__flag--out {
  background: rgba(90, 106, 122, 0.9);
}

/* ==========================================================================
   КАТАЛОГ И ФИЛЬТРЫ
   ========================================================================== */

.catalog-crumbs {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
  font-size: 0.85rem;
}
.catalog-crumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.catalog-crumbs a:hover {
  color: var(--primary);
}
.catalog-crumbs .breadcrumb-item.active {
  color: var(--primary);
}

.catalog-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 16px;
}

/* ----- Раскладка: колонка фильтров + выдача ----- */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.catalog-main {
  min-width: 0;   /* иначе сетка товаров распирает колонку */
}

.catalog-side__panel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}
.catalog-side__body {
  padding: 18px 16px;
}
/* Заголовок и кнопка «Показать» нужны только в шторке */
.catalog-side__panel > .offcanvas-header,
.catalog-side__apply {
  display: none;
}

@media (max-width: 991.98px) {
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .catalog-side__panel {
    position: fixed;
    top: 0;
    max-height: none;
    height: 100%;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    background: #fff;
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
  }
  .catalog-side__panel > .offcanvas-header {
    display: flex;
  }
  .catalog-side__body {
    flex: 1;
    overflow-y: auto;
  }
  /* Кнопка приклеена к низу шторки: до неё не нужно долистывать
     весь список фильтров */
  .catalog-side__apply {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
  }
}

/* ----- Группа фильтров ----- */
.filter-group {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.filter-group:last-of-type {
  border-bottom: none;
  margin-bottom: 8px;
}
.filter-group__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin-bottom: 10px;
}

.facet-count {
  margin-left: auto;
  font-size: 0.76rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

/* ----- Категории ----- */
.filter-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
}
.filter-back:hover {
  color: var(--primary);
}
.filter-cats {
  list-style: none;
  margin: 0;
  padding: 0;
}
.filter-cats__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.filter-cats__link:hover {
  background: rgba(74, 144, 217, 0.1);
  color: var(--text-dark);
}
.filter-cats__link.is-active {
  background: rgba(241, 90, 36, 0.12);
  color: var(--primary);
  font-weight: 600;
}

/* ----- Цена ----- */
.filter-price {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-price__input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  color: var(--text-dark);
}
.filter-price__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.12);
}
.filter-price__dash {
  color: var(--text-light);
}

/* Двухползунковый диапазон: две наложенные дорожки range поверх
   общей полосы. Сами input прозрачны — видно только их бегунки. */
.filter-range {
  position: relative;
  height: 28px;
  margin-top: 12px;
}
.filter-range__track {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
}
.filter-range__fill {
  position: absolute;
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
}
.filter-range__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;   /* клики ловят только бегунки */
}
.filter-range__thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.filter-range__thumb::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.filter-range__thumb::-moz-range-track {
  background: none;
}
.filter-range__hint {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* ----- Чекбоксы и радиокнопки ----- */
.filter-options {
  display: flex;
  flex-direction: column;
}
.filter-option,
.filter-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-dark);
  transition: background 0.15s;
}
.filter-option:hover,
.filter-switch:hover {
  background: rgba(74, 144, 217, 0.08);
}
.filter-option input,
.filter-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.filter-option__box,
.filter-switch__box {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(0, 0, 0, 0.22);
  border-radius: 5px;
  background: #fff;
  position: relative;
  transition: var(--transition);
}
.filter-option__box--round {
  border-radius: 50%;
}
.filter-option input:checked + .filter-option__box,
.filter-switch input:checked + .filter-switch__box {
  background: var(--primary);
  border-color: var(--primary);
}
.filter-option input:checked + .filter-option__box::after,
.filter-switch input:checked + .filter-switch__box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.filter-option input:focus-visible + .filter-option__box,
.filter-switch input:focus-visible + .filter-switch__box {
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.25);
}
.filter-option__label,
.filter-switch__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Значение, под которое ничего не попало: видно, но не кликается */
.filter-option.is-empty {
  opacity: 0.45;
  cursor: default;
}
.filter-option.is-hidden {
  display: none;
}

/* Хвост длинного списка скрыт, пока не нажали «показать все» */
.filter-group:not(.is-expanded):not(.is-searching) .filter-option.is-extra {
  display: none;
}

.filter-more {
  border: none;
  background: none;
  padding: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
}
.filter-more:hover {
  color: var(--primary);
}

.filter-search {
  width: 100%;
  padding: 6px 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.7);
}
.filter-search:focus {
  outline: none;
  border-color: var(--secondary);
}

.filter-reset {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}
.filter-reset:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ----- Фишки активных фильтров ----- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: rgba(241, 90, 36, 0.12);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.chip:hover {
  background: rgba(241, 90, 36, 0.2);
  color: var(--primary-dark);
}
.chip i {
  font-size: 0.7rem;
  opacity: 0.7;
}
.chip--reset {
  background: rgba(138, 154, 170, 0.16);
  color: var(--text-muted);
}
.chip--reset:hover {
  background: rgba(138, 154, 170, 0.28);
  color: var(--text-dark);
}

/* ----- Панель «найдено / сортировка» ----- */
.catalog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.catalog-bar__count {
  font-size: 0.92rem;
  color: var(--text-muted);
}
.catalog-bar__count strong {
  color: var(--text-dark);
}
.catalog-bar__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.catalog-bar__filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
}
.catalog-bar__badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
}

.catalog-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.catalog-sort__label {
  font-size: 0.82rem;
  color: var(--text-light);
}
.catalog-sort__select,
.per-page-select {
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
}
.catalog-sort__select:focus,
.per-page-select:focus {
  outline: none;
  border-color: var(--primary);
}

.catalog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* Пока идёт запрос, выдача притухает — видно, что она обновляется */
#catalog-results.htmx-request {
  opacity: 0.5;
  transition: opacity 0.15s;
  pointer-events: none;
}

/* ----- Пустая выдача ----- */
.catalog-empty {
  text-align: center;
  padding: 48px 20px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.catalog-empty__icon {
  font-size: 2.6rem;
  color: var(--text-light);
  opacity: 0.5;
}
.catalog-empty__title {
  margin: 16px 0 8px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Точка на кнопке фильтров в шапке — что-то уже выбрано */
.filter-toggle-mobile {
  position: relative;
}
.filter-toggle-mobile__dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 1.5px solid #fff;
}

@media (max-width: 575.98px) {
  .catalog-title {
    font-size: 1.25rem;
  }
  .catalog-bar {
    gap: 8px;
  }
  .catalog-sort__label {
    display: none;
  }
  .catalog-foot {
    justify-content: center;
  }
}

/* ==========================================================================
   ПРОФИЛЬ И ПЕРЕПИСКА
   ========================================================================== */

/* ----- Аватар-заглушка: инициалы вместо картинки ----- */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), #6fb0ea);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  user-select: none;
}
.avatar--lg {
  width: 68px;
  height: 68px;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(74, 144, 217, 0.28);
}
.avatar--sm {
  width: 40px;
  height: 40px;
  font-size: 0.85rem;
}

/* ----- Шапка профиля ----- */
.profile {
  margin-top: 24px;
  margin-bottom: 40px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.profile-card__main {
  flex: 1 1 200px;
  min-width: 0;
}
.profile-card__name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}
.profile-tag {
  padding: 3px 12px;
  border-radius: 30px;
  background: rgba(74, 144, 217, 0.16);
  color: var(--secondary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.profile-card__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.profile-card__meta i {
  color: var(--text-light);
  margin-right: 4px;
}
.profile-card__stats {
  display: flex;
  gap: 8px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.profile-stat__value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
}
.profile-stat__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.profile-card__logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(208, 59, 59, 0.3);
  background: rgba(255, 255, 255, 0.4);
  color: #d03b3b;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}
.profile-card__logout:hover {
  background: #d03b3b;
  border-color: #d03b3b;
  color: var(--white);
}

.profile .seller-cta {
  margin-top: 16px;
}

/* ----- Вкладки профиля: те же пилюли, что в кабинете продавца ----- */
.profile-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 22px 0 18px;
}
.profile-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.profile-tabs a i {
  font-size: 0.95rem;
}
.profile-tabs a:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-dark);
}
.profile-tabs a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(241, 90, 36, 0.25);
}
.profile-tabs a.active .tab-count {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
}
.tab-count--alert {
  background: #d03b3b;
}
.profile-tabs a.active .tab-count--alert {
  background: rgba(255, 255, 255, 0.9);
  color: #d03b3b;
}

/* ----- Заказы списком ----- */
.order-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.order-row:hover {
  background: rgba(255, 255, 255, 0.66);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: inherit;
}
.order-row__main {
  display: flex;
  flex-direction: column;
}
.order-row__id {
  font-weight: 700;
  color: var(--text-dark);
}
.order-row__date {
  font-size: 0.8rem;
  color: var(--text-light);
}
.order-row__side {
  display: flex;
  align-items: center;
  gap: 14px;
}
.order-row__sum {
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
}
.order-row__arrow {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* ----- Мои отзывы ----- */
.review-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-row {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
}
.review-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.review-row__product {
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
}
.review-row__product:hover {
  color: var(--primary);
}
.review-row__date {
  font-size: 0.8rem;
  color: var(--text-light);
}
.review-row__stars {
  margin: 4px 0 8px;
  color: var(--gold);
  font-size: 0.85rem;
}
.review-row__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  white-space: pre-wrap;
}

/* ----- Настройки ----- */
.settings-form {
  max-width: 520px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
}
.settings-block {
  margin-bottom: 18px;
}
.settings-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dark);
}
.settings-hint {
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--text-light);
}
.settings-form .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 14px;
}
.settings-form .form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}
.settings-toggle__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}
.settings-toggle .form-check-input {
  width: 46px;
  height: 24px;
  cursor: pointer;
}
.settings-toggle .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ==========================================================================
   МЕССЕНДЖЕР
   ========================================================================== */

.messenger {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  /* Тянемся до низа экрана, чтобы поле ввода было видно без прокрутки
     страницы, но не растекаемся на больших мониторах */
  height: calc(100vh - 420px);
  min-height: 420px;
  max-height: 620px;
}
.messenger__aside,
.messenger__pane {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.messenger__aside {
  overflow-y: auto;
  padding: 8px;
}
.messenger__pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.messenger__placeholder,
.messenger__loading {
  margin: auto;
  padding: 32px;
  text-align: center;
  color: var(--text-light);
}
.messenger__placeholder i {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
}
.messenger__placeholder p {
  margin: 0;
  font-size: 0.9rem;
}

/* ----- Список диалогов ----- */
.dialog-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dialog {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.dialog:hover {
  background: rgba(255, 255, 255, 0.6);
  color: inherit;
}
.dialog--active {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
}
.dialog__body {
  flex: 1 1 auto;
  min-width: 0;
}
.dialog__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.dialog__name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dialog__time {
  flex: 0 0 auto;
  font-size: 0.72rem;
  color: var(--text-light);
}
.dialog__preview {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dialog__out-icon {
  font-size: 0.65rem;
  color: var(--text-light);
}
.dialog__badge {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}
.dialog--unread .dialog__name,
.dialog--unread .dialog__preview {
  color: var(--text-dark);
  font-weight: 700;
}
.dialog-list__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-light);
}
.dialog-list__empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}
.dialog-list__empty p {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--text-muted);
}
.dialog-list__empty span {
  font-size: 0.8rem;
}

/* ----- Переписка ----- */
.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.35);
}
.chat__back {
  display: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px 6px;
  cursor: pointer;
}
.chat__head-text {
  flex: 1 1 auto;
  min-width: 0;
}
.chat__name {
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat__role {
  font-size: 0.76rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  background: rgba(74, 144, 217, 0.12);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.chat__link:hover {
  background: var(--secondary);
  color: var(--white);
}
.chat__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.chat__thread {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}
.chat__empty {
  margin: auto;
  text-align: center;
  color: var(--text-light);
}
.chat__empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}
.chat__empty p {
  margin: 0;
  font-size: 0.88rem;
}

.chat-day {
  align-self: center;
  margin: 12px 0 8px;
}
.chat-day span {
  padding: 3px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.chat-row {
  display: flex;
  max-width: 100%;
}
.chat-row--in {
  justify-content: flex-start;
}
.chat-row--out {
  justify-content: flex-end;
}
/* Соседние сообщения одного автора жмутся плотнее — как в мессенджерах */
.chat-row + .chat-row {
  margin-top: 2px;
}
.chat-row--in + .chat-row--out,
.chat-row--out + .chat-row--in {
  margin-top: 10px;
}
.chat-bubble {
  position: relative;
  max-width: 76%;
  padding: 8px 14px 8px 14px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.42;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow-wrap: anywhere;
}
.chat-bubble__text {
  white-space: pre-wrap;
}
.chat-bubble__time {
  float: right;
  margin: 6px 0 -2px 10px;
  font-size: 0.66rem;
  line-height: 1;
  opacity: 0.65;
  white-space: nowrap;
}
.chat-row--in .chat-bubble {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-dark);
  border-bottom-left-radius: 6px;
}
.chat-row--out .chat-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-bottom-right-radius: 6px;
}

.chat__composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.35);
}
.chat__input {
  flex: 1 1 auto;
  resize: none;
  max-height: 140px;
  padding: 10px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 0.9rem;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
}
.chat__input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}
.chat__send {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}
.chat__send:hover:not(:disabled) {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(241, 90, 36, 0.35);
}
.chat__send:disabled {
  opacity: 0.5;
  cursor: default;
}
.chat__blocked {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 184, 0, 0.12);
  color: #8a6400;
  font-size: 0.85rem;
  text-align: center;
}
.chat__error {
  position: absolute;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(208, 59, 59, 0.94);
  color: var(--white);
  font-size: 0.8rem;
  box-shadow: var(--shadow-md);
  z-index: 5;
}

/* ----- Отдельная страница чата ----- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.back-link:hover {
  color: var(--primary);
}
.chat-page {
  /* Узкая колонка: реплики в переписке короткие, и растягивать их
     на всю ширину каталога незачем */
  max-width: 760px;
  margin: 0 auto;
  height: 600px;
  max-height: calc(100vh - 220px);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

/* ----- Значок непрочитанных в мобильной панели ----- */
.mobile-nav__badge {
  position: absolute;
  top: 2px;
  right: 50%;
  margin-right: -22px;
  min-width: 17px;
  padding: 1px 5px;
  border-radius: 20px;
  background: #d03b3b;
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

/* ----- Планшет и телефон ----- */
@media (max-width: 991.98px) {
  .messenger {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .messenger__aside {
    height: auto;
    max-height: 60vh;
  }
  /* Панель переписки выезжает поверх списка: две колонки на телефоне
     не помещаются, а листать список под чатом незачем */
  .messenger__pane {
    display: none;
    height: 70vh;
  }
  .messenger--open .messenger__aside {
    display: none;
  }
  .messenger--open .messenger__pane {
    display: flex;
  }
  .chat__back {
    display: block;
  }
  .chat-page {
    height: 70vh;
    max-height: none;
  }
}

@media (max-width: 767.98px) {
  .profile-card {
    padding: 18px;
    gap: 14px;
  }
  .profile-card__stats {
    order: 3;
    width: 100%;
  }
  .profile-stat {
    flex: 1 1 0;
    min-width: 0;
  }
  .profile-card__logout {
    order: 4;
    width: 100%;
    justify-content: center;
  }
  .profile-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .profile-tabs a {
    white-space: nowrap;
  }
  .chat-bubble {
    max-width: 86%;
  }
}

/* ==========================================================================
   СТРАНИЦА ЗАКАЗА
   ========================================================================== */

.order-page {
  margin-top: 24px;
  margin-bottom: 40px;
}
.order-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.order-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.order-panel__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}
.order-panel__date {
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.order-panel__subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
}
.order-panel__count {
  min-width: 22px;
  padding: 1px 8px;
  border-radius: 20px;
  background: rgba(74, 144, 217, 0.16);
  color: var(--secondary);
  font-size: 0.75rem;
  text-align: center;
}

/* ----- Исход заказа вместо шкалы ----- */
.order-outcome {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 4px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
}
.order-outcome i {
  font-size: 1.3rem;
}
.order-outcome__title {
  font-weight: 700;
}
.order-outcome__text {
  margin-top: 2px;
  font-size: 0.85rem;
  opacity: 0.85;
}
.order-outcome--not_delivered {
  background: rgba(208, 59, 59, 0.12);
  color: #b53535;
}
.order-outcome--cancelled {
  background: rgba(138, 154, 170, 0.18);
  color: var(--text-muted);
}

/* ----- Данные заказа ----- */
.order-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}
.order-fact {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.order-fact--wide {
  grid-column: 1 / -1;
}
.order-fact__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-light);
}
.order-fact__value {
  margin-top: 2px;
  font-size: 0.92rem;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}
.order-fact__value--accent {
  font-weight: 800;
  color: var(--primary);
}

/* ----- Состав заказа ----- */
.order-goods {
  display: flex;
  flex-direction: column;
}
.order-good {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}
.order-good:first-child {
  border-top: none;
}
.order-good__image {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}
.order-good__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.order-good__name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.order-good__name:hover {
  color: var(--primary);
}
.order-good__article {
  font-size: 0.75rem;
  color: var(--text-light);
}
.order-good__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
}
.order-good__sum {
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
}
.order-good__calc {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
}

/* ----- Результат отслеживания у гостя ----- */
.track-result {
  margin-top: 28px;
}
.track-result__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}
.track-result__title i {
  color: var(--primary);
}

@media (max-width: 575.98px) {
  .order-panel {
    padding: 18px;
  }
  .order-panel__title {
    font-size: 1.2rem;
  }
  .status-timeline {
    padding: 0;
  }
  .step-icon {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
    border-width: 2px;
  }
  .status-step:not(:last-child)::after {
    top: 19px;
    left: calc(50% + 19px);
    width: calc(100% - 38px);
  }
  .step-label {
    font-size: 0.7rem;
  }
  .order-good__image {
    width: 46px;
    height: 46px;
  }
}

/* ==========================================================================
   ИЗБРАННОЕ В КОРЗИНЕ
   ========================================================================== */

.cart-favorites {
  margin-top: 36px;
}
.cart-favorites__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cart-favorites__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
}
.cart-favorites__title i {
  color: var(--primary);
}
.cart-favorites__all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.cart-favorites__all i {
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}
.cart-favorites__all:hover {
  color: var(--primary);
}
.cart-favorites__all:hover i {
  transform: translateX(3px);
}

/* Лента с прокруткой, а не сетка: подборка не должна отжимать кнопку
   оформления на второй экран */
.cart-favorites__row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin: 0 -4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.cart-favorites__item {
  flex: 0 0 200px;
  max-width: 200px;
  scroll-snap-align: start;
}
.cart-favorites__row::-webkit-scrollbar {
  height: 8px;
}
.cart-favorites__row::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba(26, 42, 58, 0.16);
}
.cart-favorites__row::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 575.98px) {
  .cart-favorites__item {
    flex-basis: 160px;
    max-width: 160px;
  }
}

/* ==========================================================================
   ВОЗВРАТЫ
   ========================================================================== */

.return-page {
  margin-top: 24px;
  margin-bottom: 40px;
  max-width: 820px;
}
.return-page__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}
.return-page__lead {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ----- Состояние заявки ----- */
.return-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.return-status--requested {
  background: rgba(255, 184, 0, 0.2);
  color: #9a6b00;
}
.return-status--approved,
.return-status--courier_called {
  background: rgba(74, 144, 217, 0.16);
  color: var(--secondary);
}
.return-status--received {
  background: rgba(241, 90, 36, 0.14);
  color: var(--primary-dark);
}
.return-status--refunded {
  background: rgba(46, 125, 50, 0.16);
  color: var(--success);
}
.return-status--rejected {
  background: rgba(208, 59, 59, 0.16);
  color: #d03b3b;
}
.return-status--cancelled {
  background: rgba(138, 154, 170, 0.2);
  color: var(--text-light);
}

/* ----- Панель заявки ----- */
.return-panel {
  padding: 24px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.return-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.return-panel__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
}
.return-panel__date {
  margin-top: 2px;
  font-size: 0.83rem;
  color: var(--text-light);
}
.return-panel__subtitle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
}
.return-panel__subtitle--first {
  margin-top: 0;
}
.return-panel__subtitle i {
  color: var(--primary);
}
.return-panel__lead {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ----- Шкала шагов возврата ----- */
.return-steps {
  display: flex;
  gap: 4px;
  margin: 22px 0 4px;
  padding: 0;
  list-style: none;
}
.return-step {
  position: relative;
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-light);
}
.return-step__dot {
  display: block;
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: rgba(26, 42, 58, 0.14);
}
.return-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 6px;
  left: calc(50% + 10px);
  width: calc(100% - 20px);
  height: 3px;
  background: rgba(26, 42, 58, 0.1);
}
.return-step.is-done .return-step__dot {
  background: var(--success);
}
.return-step.is-done:not(:last-child)::after {
  background: var(--success);
}
.return-step.is-done .return-step__label {
  color: var(--success);
}
.return-step.is-current .return-step__dot {
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(241, 90, 36, 0.18);
}
.return-step.is-current .return-step__label {
  color: var(--primary);
  font-weight: 700;
}

/* ----- Отказ или отмена вместо шкалы ----- */
.return-outcome {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 4px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
}
.return-outcome i {
  font-size: 1.3rem;
}
.return-outcome__title {
  font-weight: 700;
}
.return-outcome__text {
  margin-top: 2px;
  font-size: 0.85rem;
  opacity: 0.85;
}
.return-outcome--rejected {
  background: rgba(208, 59, 59, 0.12);
  color: #b53535;
}
.return-outcome--cancelled {
  background: rgba(138, 154, 170, 0.18);
  color: var(--text-muted);
}

/* ----- Данные заявки ----- */
.return-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2px 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}
.return-fact {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.return-fact--wide {
  grid-column: 1 / -1;
}
.return-fact__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-light);
}
.return-fact__value {
  margin-top: 2px;
  font-size: 0.92rem;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}
.return-fact__value--accent {
  font-weight: 800;
  color: var(--primary);
}

/* ----- Выбор товаров ----- */
.return-form {
  padding: 24px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.return-form__seller {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(74, 144, 217, 0.14);
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 700;
}
.return-form__block {
  margin-top: 22px;
}
.return-form__label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
}
.return-form__hint {
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--text-light);
}
.return-form__submit {
  margin-top: 22px;
}

.return-goods {
  display: flex;
  flex-direction: column;
}
.return-good {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
}
.return-good:first-child {
  border-top: none;
}
.return-good--static {
  cursor: default;
}
.return-good__pick {
  flex: 0 0 auto;
}
.return-good__pick .form-check-input {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}
.return-good__image {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}
.return-good__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.return-good__name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}
.return-good__price {
  font-size: 0.78rem;
  color: var(--text-light);
}
.return-good__qty {
  flex: 0 0 auto;
  min-width: 132px;
  text-align: right;
}
.return-good__qty-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.7rem;
  color: var(--text-light);
}
.return-good__qty-single {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.return-good__sum {
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
}

/* ----- Причины ----- */
.return-reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
}
.return-reason {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}
.return-reason:hover {
  background: rgba(255, 255, 255, 0.7);
}
.return-reason input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.return-reason__label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}
.return-reason__hint {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--text-light);
}
.return-reason:has(input:checked) {
  border-color: rgba(241, 90, 36, 0.45);
  background: rgba(241, 90, 36, 0.08);
}

/* ----- Вызов курьера ----- */
.return-panel--action {
  background: rgba(255, 255, 255, 0.55);
}
.return-courier__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.return-courier__field--wide {
  grid-column: 1 / -1;
}
.return-cancel {
  margin-top: 4px;
  text-align: center;
}

/* ----- Решение продавца ----- */
.return-decision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.return-decision__side {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
}
.return-decision__hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ----- Возвраты на странице заказа ----- */
.order-return-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid rgba(74, 144, 217, 0.2);
}
.order-return-cta__title {
  font-weight: 700;
  color: var(--text-dark);
}
.order-return-cta__text {
  margin-top: 2px;
  font-size: 0.83rem;
  color: var(--text-muted);
  max-width: 460px;
}
.order-returns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-return {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.order-return:hover {
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
}
.order-return__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.order-return__number {
  font-weight: 700;
  color: var(--text-dark);
}
.order-return__meta {
  font-size: 0.78rem;
  color: var(--text-light);
}
.return-row__order {
  margin-left: 8px;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-light);
}

@media (max-width: 575.98px) {
  .return-panel,
  .return-form {
    padding: 18px;
  }
  .return-step__label {
    font-size: 0.66rem;
  }
  .return-good {
    flex-wrap: wrap;
  }
  .return-good__qty {
    min-width: 0;
    width: 100%;
    text-align: left;
  }
  .order-return-cta .btn {
    width: 100%;
  }
}

/* ==========================================================================
   ПОДПИСКА НА ПОСТУПЛЕНИЕ
   ========================================================================== */

/* Кнопка занимает место «в корзину» у закончившегося товара: та же форма,
   другой смысл — поэтому спокойный синий, а не призывный оранжевый */
.btn-watch {
  border-color: rgba(74, 144, 217, 0.3);
  background: rgba(255, 255, 255, 0.45);
  color: var(--secondary);
}
.btn-watch:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}
.btn-watch--on,
.btn-watch--on:hover {
  background: rgba(74, 144, 217, 0.14);
  border-color: rgba(74, 144, 217, 0.35);
  color: var(--secondary);
  box-shadow: none;
}
.btn-watch--on:hover {
  background: rgba(74, 144, 217, 0.24);
}
/* На странице товара кнопка стоит в ряду крупных — подтягиваем размер */
.product-detail__actions .btn-watch {
  min-height: 48px;
  font-size: 0.95rem;
  flex: 1 1 auto;
}

/* ----- Вкладка «Жду» в профиле ----- */
.waiting-lead {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.waiting-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.waiting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}
.waiting-row:hover {
  background: rgba(255, 255, 255, 0.62);
}
/* Появившийся товар — единственная строка, с которой есть что делать */
.waiting-row--ready {
  background: rgba(46, 125, 50, 0.1);
  border-color: rgba(46, 125, 50, 0.28);
}
.waiting-row--ready:hover {
  background: rgba(46, 125, 50, 0.16);
}
.waiting-row__image {
  flex: 0 0 auto;
  line-height: 0;
}
.waiting-row__image img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}
.waiting-row__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.waiting-row__name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.waiting-row__name:hover {
  color: var(--primary);
}
.waiting-row__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-light);
}
.waiting-row--ready .waiting-row__state {
  color: var(--success);
  font-weight: 600;
}
.waiting-row__side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.waiting-row__stop {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-light);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.waiting-row__stop:hover {
  background: rgba(208, 59, 59, 0.14);
  color: #d03b3b;
}

/* ----- Спрос в кабинете продавца ----- */
.demand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(74, 144, 217, 0.14);
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.demand-badge i {
  font-size: 0.7rem;
}
/* Очередь за тем, чего нет на складе, — повод везти поставку */
.demand-badge--hot {
  background: rgba(241, 90, 36, 0.14);
  color: var(--primary-dark);
}

@media (max-width: 575.98px) {
  .waiting-row {
    flex-wrap: wrap;
    padding: 12px;
  }
  .waiting-row__side {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   ОРИГИНАЛЬНЫЙ ТОВАР
   ========================================================================== */

/* ----- Отметка для покупателя ----- */
/* Зелёный, а не фирменный оранжевый: это знак доверия, а не призыв.
   Оранжевый на карточке уже занят ценой со скидкой и кнопками. */
.original-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin: 2px 0 4px;
  padding: 2px 8px 2px 6px;
  border-radius: 20px;
  background: rgba(46, 125, 50, 0.12);
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.original-badge i {
  font-size: 0.72rem;
}
.original-badge--sm {
  margin: 0 0 0 6px;
  padding: 0 7px 0 5px;
  font-size: 0.66rem;
  vertical-align: 1px;
}

/* На странице товара — раскрывающееся объяснение, кто и как проверял */
.original-proof {
  margin: 10px 0 2px;
  border-radius: var(--radius-sm);
  background: rgba(46, 125, 50, 0.09);
  border: 1px solid rgba(46, 125, 50, 0.22);
}
.original-proof__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--success);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.original-proof__summary::-webkit-details-marker {
  display: none;
}
.original-proof__more {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(46, 125, 50, 0.8);
}
.original-proof__more::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}
.original-proof[open] .original-proof__more::after {
  transform: translateY(1px) rotate(-135deg);
}
.original-proof__body {
  padding: 0 14px 12px 36px;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.filter-switch__original {
  color: var(--success);
  font-size: 0.8rem;
  margin-right: 2px;
}

/* ----- Состояние заявки ----- */
.auth-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.auth-status--pending,
.auth-status--waiting {
  background: rgba(255, 184, 0, 0.2);
  color: #9a6b00;
}
.auth-status--ready {
  background: rgba(74, 144, 217, 0.16);
  color: var(--secondary);
}
.auth-status--approved {
  background: rgba(46, 125, 50, 0.16);
  color: var(--success);
}
.auth-status--rejected,
.auth-status--revoked {
  background: rgba(208, 59, 59, 0.16);
  color: #d03b3b;
}

/* Короткая пометка рядом с брендом в списке товаров продавца */
.auth-mini {
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}
.auth-mini--pending {
  color: #9a6b00;
}
.auth-mini--problem {
  color: #d03b3b;
}
.auth-mini:hover {
  text-decoration: underline;
}

/* ----- Предупреждения ----- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.45;
}
.auth-alert i {
  margin-top: 2px;
  font-size: 1rem;
}
.auth-alert--success {
  background: rgba(46, 125, 50, 0.1);
  color: #25662a;
}
.auth-alert--info {
  background: rgba(255, 184, 0, 0.14);
  color: #7a5500;
}
.auth-alert--danger {
  background: rgba(208, 59, 59, 0.1);
  color: #b53535;
}

/* ----- Очередь склада ----- */
.auth-row__image {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}
.auth-row {
  justify-content: flex-start;
}
.auth-row .order-row__main {
  flex: 1 1 auto;
  min-width: 0;
}

/* ----- Карточка заявки на складе ----- */
.auth-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.auth-head__image {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}
.auth-head__main {
  flex: 1 1 220px;
  min-width: 0;
}
.auth-head__brand {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--secondary);
}
.auth-head .auth-status {
  margin-left: auto;
}
.auth-head + .auth-alert {
  margin-top: 16px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}
.auth-label {
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-light);
}
.auth-evidence {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dark);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.auth-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-doc {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}
.auth-doc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-doc:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.auth-done {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.auth-done li {
  padding: 3px 0;
}
.auth-done i {
  width: 18px;
  color: var(--success);
}

/* ----- Решение склада ----- */
.auth-decision {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
}
.auth-decision__side {
  margin: 0;
}
.auth-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}
.auth-check .form-check-input {
  flex: 0 0 auto;
  margin: 2px 0 0;
}
.auth-check:has(input:checked) {
  background: rgba(46, 125, 50, 0.1);
  border-color: rgba(46, 125, 50, 0.3);
}
.auth-check:has(input:disabled) {
  cursor: default;
  opacity: 0.6;
}

.auth-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-history__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.auth-history__row:hover {
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
}
.auth-history__meta {
  min-width: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----- Блок у продавца ----- */
.auth-seller-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .auth-decision {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-head .auth-status {
    margin-left: 0;
  }
}

/* ==========================================================================
   ВИТРИНА МАГАЗИНА
   ========================================================================== */

.shop {
  margin-top: 20px;
  margin-bottom: 40px;
}

/* ----- Шапка ----- */
.shop-head {
  padding: 24px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.shop-head__main {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.shop-head__avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(140deg, var(--primary-light), var(--primary));
  color: var(--white);
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(241, 90, 36, 0.25);
}
.shop-head__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--white);
}
.shop-head__info {
  flex: 1 1 auto;
  min-width: 0;
}
.shop-head__name {
  margin: 2px 0 2px;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}
.shop-head__since {
  font-size: 0.82rem;
  color: var(--text-light);
}
/* Длинное описание не должно выдавливать товары за экран: три строки */
.shop-head__desc {
  margin: 8px 0 0;
  max-width: 720px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-head__actions {
  flex: 0 0 auto;
}

.shop-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}
.shop-stat {
  display: flex;
  flex-direction: column;
  min-width: 96px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.shop-stat__value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}
.shop-stat__star {
  font-size: 0.9rem;
  color: var(--gold);
}
.shop-stat__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.shop-stat--original {
  background: rgba(46, 125, 50, 0.1);
  border-color: rgba(46, 125, 50, 0.25);
}
.shop-stat--original .shop-stat__value {
  color: var(--success);
}
.shop-stat--original .shop-stat__value i {
  font-size: 0.9rem;
}

/* ----- Поиск и сортировка ----- */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.shop-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
}
.shop-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-light);
  pointer-events: none;
}
.shop-search input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: var(--transition);
}
.shop-search input:focus {
  outline: none;
  border-color: rgba(241, 90, 36, 0.45);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.12);
}

/* ----- Разделы ----- */
.shop-sections {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shop-sections::-webkit-scrollbar {
  display: none;
}
.shop-section {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.shop-section span {
  font-size: 0.74rem;
  color: var(--text-light);
}
.shop-section:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-dark);
}
.shop-section.is-active {
  background: var(--text-dark);
  border-color: var(--text-dark);
  color: var(--white);
}
.shop-section.is-active span {
  color: rgba(255, 255, 255, 0.65);
}

/* На витрине магазина подпись «продавец» на каждой карточке — повтор шапки */
.shop .product__seller {
  display: none;
}

.shop-found {
  margin: -4px 0 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.shop-found a {
  margin-left: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  .shop-head {
    padding: 18px;
  }
  .shop-head__main {
    flex-wrap: wrap;
    gap: 14px;
  }
  .shop-head__avatar {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 1.6rem;
  }
  .shop-head__name {
    font-size: 1.25rem;
  }
  /* Нулевая основа не даёт длинному описанию утащить блок под аватар */
  .shop-head__info {
    flex: 1 1 0;
  }
  .shop-head__actions {
    width: 100%;
  }
  .shop-head__actions .btn {
    width: 100%;
  }
  .shop-stats {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .shop-stat {
    flex: 0 0 auto;
  }
  .shop-search {
    max-width: none;
  }
}
