:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-rgb: 37, 99, 235;
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --accent: #f59e0b;
  --accent-soft: #fff7ed;
  --accent-dark: #c2410c;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #dc2626;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --header-h: 118px;
  --bottom-nav-h: 64px;
  --cart-bar-h: 56px;
  --ring-size: 120px;
  --ring-c: 326.73;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
}

body.has-cart-bar {
  padding-bottom: calc(
    var(--cart-bar-h) + env(safe-area-inset-bottom, 0px) + 12px
  );
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ——— Header ——— */

.site-header {
  --header-bar-h: 52px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 8px 14px 10px;
  padding-top: max(8px, env(safe-area-inset-top, 0px));
}

.header-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-height: var(--header-bar-h, 52px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 160px;
}

.brand-mark {
  display: grid;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.brand-text small {
  display: none;
}

.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.location-chip::before {
  content: none;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.header-phone:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.header-phone-icon {
  flex: 0 0 auto;
  color: var(--primary);
}

/* === Новая шапка: поиск в центр, ПВЗ + Избранное (пункты 1-3) === */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

/* (откат) modern header PVZ/Fav/search-wrap/right-group + модалы для них — убраны */

.fav-item button {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 14px;
  cursor: pointer;
}

/* Desktop: search properly centered and wide (500-700px) */
@media (min-width: 768px) {
  .header-bar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .brand {
    flex: 0 0 auto;
  }

  .header-search-wrap {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
  }

  .header-search {
    max-width: 680px;
    width: 100%;
  }

  .header-right-group {
    flex: 0 0 auto;
  }
}

/* Мобильная адаптация шапки (clean for new structure) */
@media (max-width: 767px) {
  .header-search-wrap {
    order: 2;
    flex-basis: 100%;
    width: 100%;
    margin: 4px 0;
  }

  .header-right-group {
    gap: 4px;
    flex-wrap: nowrap;
  }

  .header-pvz-btn .pvz-name,
  .header-fav-btn .fav-label,
  .header-profile-label {
    display: none;
  }

  .header-search {
    width: 100%;
  }

  .site-header {
    --header-h: 118px;
  }
}

.header-nav {
}

/* === Модернизация UI (пункты 4,6,8,9) — как Ozon/WB === */
/* Категории компактнее (уже колонка на десктопе) */
@media (min-width: 768px) {
  .catalog-categories {
    display: block !important;
    width: 180px;
    flex-shrink: 0;
  }
  .catalog-categories .category-sidebar .category-pill {
    padding: 6px 8px;
    font-size: 12px;
  }
  /* В браузерной версии горизонтальные табы не нужны — только вертикальный sidebar слева */
  .category-tabs {
    display: none;
  }

  /* Двухколоночный контент только на десктопе: категории и подкатегории слева от карточек */
  .catalog-content {
    display: grid !important;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
}

/* Мобильные категории — горизонтальный скролл */
@media (max-width: 767px) {
  .catalog-categories {
    display: none;
  }
  /* На мобильной — категории не слева, а табы в toolbar; catalog-content в одну колонку */
  .catalog-content {
    display: block;
  }
  .category-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tabs .category-pill {
    min-width: 64px;
    flex-direction: column;
    font-size: 10px;
    padding: 4px 6px;
  }
}

/* Улучшенные карточки товаров (рейтинг, бейджи, современный вид) */
.product-card {
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,23,42,0.1);
}
.product-card .product-title {
  font-weight: 700;
  line-height: 1.2;
}
.product-card .product-brief {
  color: var(--muted);
  font-size: 11px;
}
.product-card .product-price-value {
  font-size: 16px;
  font-weight: 800;
}
.product-card .add-button {
  border-radius: 10px;
  font-weight: 700;
  min-height: 36px;
}

/* Рейтинг и заказы (добавлено в рендере) */
.product-card .card-rating {
  font-size: 11px;
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.product-card .card-orders {
  font-size: 10px;
  color: var(--muted);
}

/* Бейджи */
.product-card-badges-host .badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 700;
}
.badge-hit { background: #fef3c7; color: #92400e; }
.badge-new { background: #dbeafe; color: #1e40af; }
.badge-promo { background: #fee2e2; color: #991b1b; }

/* (откат) .marketplace-feed и feed-стили полностью убраны */
  flex: 0 0 140px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}
.feed-card-media {
  height: 100px;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.feed-card-info {
  padding: 6px 8px;
}
.feed-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card-price {
  font-size: 13px;
  font-weight: 800;
  margin-top: 2px;
}

/* Современный визуал (пункт 9) */
button, .add-button, .collection-cta, .header-cart-btn {
  border-radius: 12px;
  transition: transform .1s ease, box-shadow .1s ease;
}
button:active, .add-button:active {
  transform: scale(0.985);
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-raised) 25%, var(--surface) 50%, var(--surface-raised) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s infinite;
  border-radius: 8px;
}
@keyframes skeleton { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Ленивые изображения и perf */
img[loading="lazy"] {
  transition: opacity .2s;
}
.product-thumb img {
  object-fit: cover;
  border-radius: 10px;
}

/* (откат) .collection-detail и связанные — убраны */

/* Feed row on mobile: ensure horizontal scroll works, cards not too small */
@media (max-width: 767px) {
  .feed-row {
    gap: 6px;
  }
  .feed-card {
    flex: 0 0 120px;
  }
  .feed-card-media {
    height: 80px;
  }
  .feed-card-info {
    padding: 4px 6px;
  }
}
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-nav-pill {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.28);
}

.header-nav-pill:hover {
  background: var(--primary-dark);
}

.header-nav-pill[aria-pressed="false"] {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}

.header-nav-pill[aria-pressed="false"]:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.header-nav-link {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.header-nav-link:hover {
  background: var(--surface-raised);
  color: var(--primary);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-notify-btn,
.header-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  border: 0;
  background: transparent;
}

.header-notify-icon-svg,
.header-profile-icon-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--primary-dark);
}

.header-notify-btn strong {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--surface);
}

.header-notify-btn.has-unread {
  color: var(--primary-dark);
}

.header-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

.header-cart-btn strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.mobile-search {
  width: 100%;
}

.collection-linear-wrap {
  display: none;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.collection-linear-track {
  height: 8px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.collection-linear-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  transition: width 0.35s ease;
}

.collection-linear-pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-dark);
}

.collection-idle-msg {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--success-soft);
  color: #166534;
  font-size: 13px;
  line-height: 1.4;
}

.product-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  align-items: center;
  margin-top: 4px;
}

.product-card-min,
.product-card-pack-text {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.product-card-min strong,
.product-card-pack-text strong {
  color: var(--ink);
  font-weight: 800;
}

.product-card-progress .jp-progress {
  margin: 6px 0 0;
  gap: 2px 6px;
}

.product-card-progress .jp-progress-label {
  font-size: 10px;
}

.product-card-progress .jp-progress-track {
  height: 6px;
}

.product-card-progress .jp-progress-pct {
  font-size: 10px;
}

.product-price-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.bottom-nav-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.bottom-nav-icon-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--muted);
}

.bottom-nav-item.active .bottom-nav-icon-svg {
  color: var(--primary-dark);
}

.bottom-nav-item--cart.has-items .bottom-nav-icon-svg {
  color: var(--accent-dark);
}

.bottom-nav-logo-wrap {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.bottom-nav-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bottom-nav-item--about.active .bottom-nav-logo-wrap {
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.18);
}

.bottom-nav-item--about .bottom-nav-label {
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.header-cart-btn:hover {
  background: #ffedd5;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  padding: 0 14px;
}

.search:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.search-icon {
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.sm-icon {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.location-chip-icon {
  width: 16px;
  height: 16px;
}

.header-cart-icon {
  width: 20px;
  height: 20px;
}

.collection-status-icon {
  width: 18px;
  height: 18px;
}

.search input {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  font-size: 14px;
}

.search input::placeholder {
  color: var(--muted);
}

@media (min-width: 1180px) {
  .site-header {
    padding-inline: 14px;
  }

  .header-bar {
    display: grid;
    grid-template-columns: minmax(210px, 250px) minmax(320px, 1fr) auto auto auto auto auto;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    gap: 10px;
  }

  .brand {
    flex: initial;
    width: 100%;
    min-width: 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .brand-text strong {
    font-size: 16px;
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .brand-text small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
  }

  .search {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
  }

  .location-chip,
  .header-phone,
  .header-notify-btn,
  .header-profile-btn,
  .header-cart-btn {
    justify-self: end;
  }

  .header-notify-btn,
  .header-profile-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--surface-raised);
    border: 1px solid var(--line);
  }

  .header-profile-btn {
    width: auto;
    gap: 8px;
    padding: 0 12px;
  }
}

@media (min-width: 768px) {
  .site-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
  }

  .header-bar {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
  }

  .brand {
    flex: 0 1 240px;
  }

  .header-nav {
    display: inline-flex;
  }

  .header-phone {
    margin-left: auto;
  }

  .header-cart-btn {
    order: 4;
  }

  .mobile-search,
  .search {
    flex: 1 1 200px;
    max-width: 300px;
    order: 0;
    margin-left: auto;
    margin-top: 0;
  }

  .collection-linear-wrap {
    display: none !important;
  }
}

@media (min-width: 1180px) {
  .header-bar {
    display: grid;
    grid-template-columns: minmax(210px, 250px) minmax(320px, 1fr) auto auto auto auto auto;
    max-width: 1100px;
    margin-inline: auto;
  }

  .mobile-search,
  .search {
    flex: initial;
    max-width: none;
    margin: 0;
    order: initial;
  }

  .header-phone {
    margin-left: 0;
  }
}

@media (min-width: 768px) {
  .header-bar {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(260px, 1fr) auto auto auto auto auto;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
  }

  .brand,
  .mobile-search,
  .search,
  .location-chip,
  .header-phone,
  .header-notify-btn,
  .header-profile-btn,
  .header-cart-btn {
    flex: initial;
    order: initial;
    margin: 0;
  }

  .search {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }
}

.ghost-button,
.cart-button {
  border: 0;
  font-weight: 800;
}

.ghost-button {
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--primary-dark);
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  background: var(--accent-soft);
  color: #7c4a00;
}

.cart-button strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}

/* ——— Main ——— */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 14px 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.65;
  }
}

h1,
h2,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ——— Collection ——— */

.collection-board {
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.collection-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "info ring"
    "cta cta";
  gap: 10px 14px;
  align-items: center;
}

.collection-bar-info {
  grid-area: info;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.collection-bar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.collection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.collection-board .live-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.collection-deadline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.collection-deadline-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.collection-countdown {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.collection-deadline-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.collection-amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.collection-amount strong {
  color: var(--ink);
  font-size: clamp(16px, 2.8vw, 20px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.collection-people {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.collection-people-icon {
  font-size: 15px;
  line-height: 1;
}

.collection-board-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.collection-ring--bar {
  grid-area: ring;
  --ring-size: 76px;
  margin: 0;
}

.collection-ring--bar .ring-track,
.collection-ring--bar .ring-fill {
  stroke-width: 9;
}

.collection-ring--bar .ring-track {
  stroke: #e8f5ec;
}

.collection-ring--bar .ring-label strong {
  font-size: 18px;
  color: var(--success);
}

.ring-fill--success {
  stroke: var(--success);
}

.collection-cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--success);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}

.collection-cta:hover {
  background: #15803d;
}

.collection-cta:active {
  transform: scale(0.98);
}

.primary-action,
.secondary-action,
.submit-order,
.add-button,
.icon-button {
  border: 0;
  font-weight: 800;
  transition: transform 0.15s ease, background 0.15s ease;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius-md);
  padding: 0 20px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.28);
}

.primary-action:active,
.add-button:active {
  transform: scale(0.98);
}

.success-collections {
  margin: 12px 0;
  text-align: left;
}

.submit-order:active {
  transform: scale(0.98);
}

.collection-ring {
  position: relative;
  width: var(--ring-size, 120px);
  height: var(--ring-size, 120px);
  margin: 0 auto;
  flex-shrink: 0;
}

.collection-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: #e8efe4;
  stroke-width: 10;
}

.ring-fill {
  fill: none;
  stroke: url(#ringGradient);
  stroke: var(--primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: var(--ring-c);
  stroke-dashoffset: var(--ring-c);
  transition: stroke-dashoffset 0.35s ease;
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-label strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
}

.ring-label span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.collection-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.collection-stats article {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px;
}

.collection-stats span,
.collection-stats strong {
  display: block;
}

.collection-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.collection-stats strong {
  margin-top: 4px;
  font-size: 14px;
}

/* ——— Service fee info ——— */

.service-fee-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff9ed 0%, #eef6ea 100%);
  border: 1px solid #e3dcc8;
  box-shadow: var(--shadow-sm);
}

.service-fee-badge {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.25);
}

.service-fee-copy h2,
.service-fee-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.service-fee-copy p {
  margin: 0 0 10px;
  color: #4f5d49;
  font-size: 14px;
  line-height: 1.55;
}

.service-fee-list {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.service-fee-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.service-fee-list span {
  display: grid;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.service-fee-note {
  margin: 0 !important;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark) !important;
  font-size: 13px !important;
  font-weight: 700;
}

@media (max-width: 640px) {
  .service-fee-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .service-fee-badge {
    width: 56px;
    height: 56px;
    font-size: 18px;
  }
}

/* ——— Catalog ——— */

.catalog-section {
  margin-bottom: 28px;
}

.section-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-shrink: 0;
}

.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.select-wrap--labeled > span:not(.visually-hidden) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.select-wrap select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.select-wrap--labeled select {
  min-width: 4.5rem;
}

.toggle-chip {
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
}

.toggle-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-chip span {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.toggle-chip:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.toggle-chip:has(input:checked) span {
  color: var(--primary-dark);
}

.select-wrap--page-size .select-wrap-page-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.catalog-categories {
  grid-column: 1;
  position: sticky;
  top: var(--header-h);
  max-height: calc(100dvh - var(--header-h) - 80px);
  min-height: 120px;
  overflow-y: auto;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
  z-index: 20;
}

.catalog-categories-title {
  margin: 0 0 8px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .catalog-categories-title {
    font-size: 12px;
    color: var(--ink);
  }
}

.catalog-main {
  grid-column: 2;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.catalog-toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 8px 0 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.catalog-toolbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
  background: var(--bg);
  pointer-events: none;
}

.category-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .category-tabs .category-sublist {
    display: none;
  }
}

.category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.catalog-pagination {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 6px 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.catalog-page-btn--prev {
  grid-column: 1;
  grid-row: 1;
}

.catalog-page-nums {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.catalog-page-nums::-webkit-scrollbar {
  display: none;
}

.catalog-page-btn--next {
  grid-column: 3;
  grid-row: 1;
}

.catalog-page-num {
  flex: 0 0 auto;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 6px;
  background: var(--surface-raised);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.catalog-page-num.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.catalog-page-num:not(.is-active):active {
  background: var(--primary-soft);
}

.catalog-page-ellipsis {
  min-width: 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.catalog-pagination-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  min-width: 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.catalog-page-btn {
  flex-shrink: 0;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--surface-raised);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.catalog-page-btn:not(:disabled):active {
  background: var(--primary-soft);
}

.catalog-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.category-pill--tab {
  width: auto;
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 14px;
  white-space: nowrap;
  background: var(--surface);
}

.category-pill:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.category-pill.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.22);
}

.category-pill.active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.category-sublist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -2px 0 4px;
  padding: 6px 0 6px 8px;
  border-left: 2px solid var(--primary-soft);
}

.category-pill--sub {
  padding: 7px 8px;
  font-size: 10px;
  font-weight: 700;
  border-style: dashed;
}

.category-pill--sub.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: var(--primary);
  box-shadow: none;
}

.category-pill--sub .category-pill-icon {
  width: 18px;
  height: 18px;
}

.photo-standard-preview {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: linear-gradient(180deg, #f7fbf8 0%, #fff 100%);
}

.photo-standard-preview-head {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.photo-standard-preview-lead {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.photo-standard-spec {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.photo-standard-spec li {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.2;
}

.photo-standard-compare-rows,
#photoStandardCompare {
  display: grid;
  gap: 16px;
}

.photo-standard-compare-row {
  display: grid;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(var(--primary-rgb), 0.1);
}

.photo-standard-compare-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.photo-standard-row-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.photo-standard-row-title span {
  font-weight: 600;
  color: var(--muted);
}

.photo-standard-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-standard-compare-col {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.photo-standard-compare-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.photo-standard-compare-label--new {
  color: var(--brand);
}

.photo-standard-compare-note {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.photo-standard-sample {
  pointer-events: none;
}

.product-thumb--static {
  cursor: default;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  isolation: isolate;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.14);
}

.product-card--unavailable {
  background: var(--surface-raised);
}

.product-card--unavailable .product-card-actions {
  opacity: 1;
}

.product-card--unavailable .product-title,
.product-card--unavailable .product-price-value {
  color: var(--muted);
}

.badge--muted {
  background: #8a9486;
}

.product-unavailable {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #f6f0e8;
  border: 1px dashed #d4a574;
}

.product-unavailable strong {
  font-size: 13px;
  font-weight: 800;
  color: #9a3412;
}

.product-unavailable p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #7c5c3a;
}

.product-detail .product-unavailable {
  margin-top: 4px;
}

.product-card-top {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.product-card-media {
  position: relative;
  flex: 0 0 auto;
}

.product-card-badges-host {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  max-width: calc(100% - 96px);
  line-height: 0;
  pointer-events: none;
}

.product-card:not(.product-card--unavailable) .product-card-badges-host:not(.product-card-badges-host--out) {
  top: 48px;
  max-width: calc(100% - 16px);
}

.product-card-badges-host:empty {
  display: none;
}

.product-card-badges-host--out {
  left: auto;
  right: 8px;
  max-width: calc(100% - 16px);
}

.product-card-hot-host {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  line-height: 0;
  pointer-events: none;
}

.product-card-hot-host:empty {
  display: none;
}

.product-card-hot-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff3d00 100%);
  box-shadow: 0 2px 8px rgba(255, 61, 0, 0.35);
}

.product-card-hot-mark-icon {
  filter: brightness(0) invert(1);
}

.product-share-host,
.product-favorite-host {
  position: absolute;
  top: 8px;
  z-index: 3;
  line-height: 0;
}

.product-share-host {
  left: 8px;
}

.product-favorite-host {
  right: 8px;
}

.product-share-host:empty,
.product-favorite-host:empty {
  display: none;
}

.product-favorite-host .product-favorite {
  position: static;
}

.product-card-share {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.product-card-share:hover {
  border-color: #bfdbfe;
  background: #fff;
}

.product-card-share:active {
  transform: scale(0.94);
}

.product-card-share .share-icon--card {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.product-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  flex: 0 0 auto;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  padding: 6px;
  background: #fff;
  cursor: pointer;
}

.product-card.has-photo .product-thumb {
  background: #fff;
}

.product-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.product-thumb picture,
.product-card-visual picture {
  display: block;
  width: 100%;
  height: 100%;
}

.product-thumb img,
.product-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.product-thumb .product-emoji {
  font-size: clamp(28px, 10vw, 40px);
}

.product-card-info {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.product-card-info:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.product-card-info:hover .product-title {
  color: var(--primary-dark);
}

.cart-item-emoji img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.product-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}



.product-card .badge--catalog {
  background: #e2e8f0;
  color: #475569;
}

.product-card .badge--hit {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.product-card .badge--promo {
  background: #eff6ff;
  color: var(--primary-dark);
  border: 1px solid #bfdbfe;
}

.product-card .badge--new {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

.product-card .badge--discount {
  background: #ecfdf3;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.product-card .badge--stock-out {
  background: #fff7ed;
  color: #b45309;
  border: 1px solid #fed7aa;
}

.product-favorite {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  color: #94a3b8;
  box-shadow: var(--shadow-sm);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.product-favorite:hover {
  color: #f43f5e;
  border-color: #fecdd3;
  background: #fff;
}

.product-favorite.is-active {
  color: #e11d48;
  border-color: #fda4af;
  background: #fff1f2;
}

.product-favorite:active {
  transform: scale(0.94);
}

.card-favorite-icon,
.card-action-icon,
.share-icon {
  display: block;
  object-fit: contain;
}

.qty-btn-icon {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  object-fit: contain;
}

.chosen-mark {
  display: none;
}

.product-subcategory {
  display: none;
}

.product-card .product-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: calc(2 * 1.25 * 12px);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.product-card-stock {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.3;
}

.product-card-stock--in {
  color: #15803d;
}

.product-card-stock--in strong {
  font-size: 12px;
  font-weight: 800;
}

.product-card-stock-unit {
  color: #4b6b57;
  font-weight: 600;
}

.product-card-stock--out,
.product-card-stock--order {
  color: #1d4ed8;
  font-weight: 700;
}

.product-card .product-brief {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  min-height: calc(1.2 * 10px);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.product-card .product-price-line-host,
.product-card-info .product-price-line {
  min-height: 20px;
  margin-top: auto;
}

.product-detail-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.product-specs li {
  min-width: 0;
  border-radius: 8px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.product-specs--compact .spec-label {
  font-size: 9px;
}

.spec-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.spec-value {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-info .product-price-line {
  margin-top: 2px;
  padding-top: 0;
}

.product-card .price-agency {
  display: none;
}

.product-card .product-price-line .price-unit {
  display: none;
}

.product-price-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.price-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
}

.price-per-unit {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.price-agency {
  display: inline-block;
  border-radius: 6px;
  padding: 3px 7px;
  background: var(--accent-soft);
  color: #7c4a00;
  font-size: 11px;
  font-weight: 800;
}

.product-card .product-price-value {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.product-card .price-old {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: line-through;
}

.product-price-line s {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.product-detail .product-price,
.product-detail-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.product-detail-price strong {
  font-size: 28px;
  font-weight: 800;
}

.product-price-line .price-unit {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 4px 10px 8px;
  border-top: 0;
  background: var(--surface);
}

.product-card-actions > * {
  min-width: 0;
}

.product-card-buy-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 34px;
  min-width: 0;
}

.product-card-pack-spacer {
  display: block;
  grid-column: 1 / -1;
  min-height: 30px;
}

.product-card-pack-spacer--qty {
  width: 96px;
  justify-self: end;
}

.product-card-buy-row--placeholder {
  visibility: hidden;
  pointer-events: none;
}

.product-card .purchase-field {
  gap: 0;
  margin: 0;
}

.product-card .purchase-field--pack {
  grid-column: 1 / -1;
}

.product-card .purchase-field select {
  min-height: 30px;
  font-size: 11px;
  padding: 0 6px;
}

.product-card .purchase-field--qty .card-qty {
  grid-template-columns: 32px 28px 32px;
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  overflow: hidden;
}

.product-card .card-qty button {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
}

.product-card .card-qty span {
  font-size: 13px;
  font-weight: 800;
}

.product-card .guest-order-notice {
  padding: 6px 8px;
  margin: 0;
}

.product-card .guest-order-notice p {
  display: none;
}

.product-card .guest-order-notice strong {
  margin: 0;
  font-size: 11px;
}

.product-card .product-unavailable {
  padding: 6px 8px;
  gap: 0;
}

.product-card .product-unavailable p {
  display: none;
}

.product-card .product-unavailable strong {
  font-size: 11px;
}

.product-card-comments-host {
  min-width: 0;
  flex: 0 0 auto;
}

.product-card-comments-host .product-card-comments {
  min-height: 36px;
}

.product-card--unavailable .product-card-actions {
  grid-template-columns: 1fr;
  justify-content: stretch;
}

.purchase-field {
  display: grid;
  gap: 4px;
}

.purchase-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.purchase-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.purchase-field--qty .card-qty {
  width: 100%;
  grid-template-columns: 1fr 1.2fr 1fr;
}

.product-detail-totals,
.cart-totals {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
}

.product-card-total {
  display: grid;
  justify-items: end;
  align-content: center;
  justify-self: stretch;
  min-width: 0;
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.16);
  color: #9a3412;
  overflow: hidden;
}

.product-card-total span {
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card-total strong {
  max-width: 100%;
  font-size: clamp(12px, 3.4vw, 15px);
  line-height: 1.1;
  font-weight: 900;
  color: #c2410c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .product-card-buy-row {
    gap: 5px;
  }

  .product-card .purchase-field--qty .card-qty {
    grid-template-columns: 26px 22px 26px;
    min-width: 74px;
  }

  .product-card .card-qty button {
    min-height: 32px;
  }

  .product-card-total {
    min-height: 32px;
    padding: 3px 5px;
  }

  .product-card-total span {
    display: none;
  }

  .product-card-total strong {
    font-size: 12px;
    overflow: visible;
    text-overflow: clip;
  }
}

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.total-row span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.total-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.total-row--main {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #bfdbfe;
}

.total-row--main span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.total-row--main strong {
  color: var(--primary-dark);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.cart-totals .total-row--main strong {
  color: var(--ink);
}

.product-card .product-card-buttons {
  display: block;
  flex-shrink: 0;
  margin-top: auto;
  min-height: 40px;
}

.product-card .product-card-buttons .add-button,
.product-card .product-card-buttons .add-button--register {
  width: 100%;
}

.product-icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--primary-dark);
}

.product-icon-button:active {
  background: var(--primary-soft);
}

.product-icon-button .card-action-icon {
  display: block;
}

.product-share-button {
  color: var(--primary-dark);
}

.product-share-button--head[hidden] {
  display: none;
}

.guest-order-notice {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid #f0d090;
  margin-bottom: 10px;
}

.guest-order-notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.guest-order-notice p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.add-button--register {
  background: var(--primary-dark);
}

.guest-price-preview {
  margin-bottom: 12px;
}

.share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  transform: translateX(-50%);
  max-width: min(92vw, 360px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(20, 26, 19, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

body.has-cart-bar .share-toast {
  bottom: calc(var(--bottom-nav-h) + var(--cart-bar-h) + 16px + env(safe-area-inset-bottom, 0px));
}

body.modal-open .share-toast {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.product-card .add-button,
.product-card .add-button--register {
  min-height: 32px;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
}

.product-card .product-icon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 8px;
}

.product-card .product-icon-button .card-action-icon {
  width: 18px;
  height: 18px;
}

.card-qty {
  display: grid;
  grid-template-columns: 32px 28px 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.card-qty button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  min-height: 36px;
}

.card-qty span {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.add-button {
  width: 100%;
  min-height: 40px;
  margin-top: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.24);
}

.add-button:hover {
  background: var(--primary-dark);
}

.add-button:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.add-button--out-of-stock {
  background: #fff7ed;
  color: #b45309;
  border: 1px solid #fed7aa;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.add-button--out-of-stock:hover,
.add-button--out-of-stock:active {
  background: #fff7ed;
  color: #b45309;
  transform: none;
}

.add-button--on-order {
  background: #2563eb;
  color: #fff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.add-button--on-order:hover {
  background: #1d4ed8;
}

.submit-order--on-order {
  background: #2563eb;
  border-color: #1d4ed8;
}

.submit-order--on-order:hover {
  background: #1d4ed8;
}

body.modal-open {
  overflow: hidden;
}

/* ——— Product detail ——— */

.product-panel {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 48;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.product-panel.open {
  pointer-events: auto;
  opacity: 1;
}

.product-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 12, 0.5);
}

.product-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 94dvh;
  overflow-y: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface);
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.product-panel.open .product-drawer {
  transform: translateY(0);
}

.product-drawer-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 2px;
}

.product-drawer-head .product-share-button--head {
  justify-self: start;
  flex-shrink: 0;
}

.product-drawer-head #closeProduct {
  justify-self: end;
}

.product-drawer-head .product-share-button--head.product-icon-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}

.product-drawer-head .product-share-button--head .share-icon--head {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.product-detail-hero {
  display: grid;
  min-height: 200px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--accent-soft), var(--primary-soft));
}

.product-detail-hero.has-photo {
  background: #fff;
  border: 1px solid var(--line);
}

.product-detail-hero img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.product-gallery {
  margin-bottom: 12px;
}

.product-gallery-main {
  display: grid;
  width: 100%;
  min-height: 220px;
  max-height: min(52vh, 360px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  position: relative;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  max-height: min(52vh, 360px);
  object-fit: contain;
  object-position: center;
}

.product-gallery-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(20, 26, 19, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.product-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.product-gallery-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.product-gallery-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-lightbox {
  pointer-events: none;
  visibility: hidden;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.photo-lightbox.open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 10, 0.92);
}

.photo-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 48px 8px 16px;
}

.photo-lightbox-stage {
  position: relative;
  display: grid;
  flex: 1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 0;
}

.photo-lightbox-stage.has-multiple .photo-lightbox-figure {
  cursor: pointer;
}

.photo-lightbox-figure {
  display: grid;
  gap: 10px;
  margin: 0;
  min-width: 0;
  height: 100%;
  place-content: center;
}

.photo-lightbox-figure img {
  width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}

.photo-lightbox-figure figcaption {
  text-align: center;
  color: #e8efe4;
  font-size: 13px;
  font-weight: 600;
}

.photo-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.photo-lightbox-nav {
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
}

.photo-lightbox-stage.has-multiple .photo-lightbox-nav {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.photo-lightbox-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  padding: 4px 8px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.photo-lightbox-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.photo-lightbox-thumb.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--primary);
}

.photo-lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .photo-lightbox-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .photo-lightbox-prev {
    left: 4px;
  }

  .photo-lightbox-next {
    right: 4px;
  }
}

.product-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-breadcrumbs span:last-child {
  color: var(--primary-dark);
}

.product-detail-videos {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.product-detail-videos-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.product-detail-video {
  width: 100%;
  max-height: 280px;
  border-radius: var(--radius-md);
  background: #000;
}

.product-detail-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.product-detail-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.product-detail-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.product-detail-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-detail-meta dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.product-detail-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.product-detail-price strong {
  font-size: 28px;
  font-weight: 800;
}

.product-detail-price span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.product-detail-purchase {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
}

.card-qty--large {
  max-width: 200px;
}

.card-qty--large button {
  min-height: 44px;
}

.product-detail-total {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.product-detail-total strong {
  color: var(--primary-dark);
  font-size: 20px;
}

/* ——— Product comments ——— */

.product-card-comments {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0 10px 8px;
  border-top: 0;
  background: var(--surface);
}

.product-card-comments-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-card-comments-bar .product-icon-button {
  flex-shrink: 0;
}

.comments-toggle {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 4px 0;
  min-height: 28px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.comments-toggle em {
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.product-card-comments.is-open .comments-toggle {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.comments-drawer {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.comments-drawer[hidden] {
  display: none;
}

.product-comments {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.comments-header h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.comments-count {
  display: inline-grid;
  min-width: 22px;
  margin-left: 4px;
  place-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.comments-list {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.comments-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.comment-item {
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px 8px;
  margin-bottom: 6px;
}

.comment-head-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.comment-head strong {
  font-size: 12px;
}

.comment-stars {
  display: inline-flex;
  gap: 2px;
  line-height: 1;
}

.comment-star {
  border: 0;
  padding: 0;
  background: transparent;
  color: #c5cec0;
  font-size: 16px;
  line-height: 1;
}

.comment-stars--input .comment-star {
  font-size: 26px;
  min-width: 32px;
  min-height: 32px;
}

.comment-star.is-filled {
  color: #e8a317;
}

.comment-stars--input.is-invalid .comment-star {
  color: #e8a8a0;
}

.comment-rating-field {
  display: grid;
  gap: 6px;
}

.comment-rating-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comment-head time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.comment-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.comment-photo {
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.comment-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-form {
  display: grid;
  gap: 8px;
}

.comment-form label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comment-form textarea {
  resize: vertical;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
}

.comment-form--compact textarea {
  min-height: 48px;
}

.comment-photo-label input[type="file"] {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.comment-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-photo-preview figure {
  position: relative;
  margin: 0;
}

.comment-photo-preview img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.comment-photo-preview button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.comment-form .secondary-action {
  justify-self: start;
  min-height: 40px;
}

/* ——— О Платформе ——— */

.about-us {
  margin-top: 8px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.about-card-head {
  padding: var(--about-pad) var(--about-pad) 12px;
}

.about-card-head .eyebrow {
  margin-bottom: 4px;
}

.about-card-head h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.about-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 52em;
}

.about-card {
  --about-pad: 18px;
  display: grid;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.about-proof {
  padding: 0 var(--about-pad) var(--about-pad);
  border-bottom: 1px solid var(--line);
}

.about-proof-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.about-proof-intro h3 {
  margin: 0 0 6px;
  font-size: clamp(17px, 4vw, 20px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-proof-intro p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.about-proof-badge {
  flex-shrink: 0;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--primary), #3b82f6);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.about-proof-figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f0f4ee;
  border: 1px solid var(--line);
}

.about-proof-zoom {
  display: block;
  line-height: 0;
}

.about-proof-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
}

.about-proof-figure figcaption {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-raised);
  border-top: 1px solid var(--line);
}

.about-proof-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.about-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: var(--about-pad);
  list-style: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.about-trust li {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.about-trust-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.about-trust strong {
  font-size: 13px;
  line-height: 1.25;
}

.about-trust li > span:last-child {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.about-guide {
  padding: 0 var(--about-pad) var(--about-pad);
  border-bottom: 1px solid var(--line);
}

.about-promo {
  padding: 0 var(--about-pad) var(--about-pad);
}

.about-guide-figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f0f4ee;
  border: 1px solid var(--line);
}

.about-guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.about-steps {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.about-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.about-steps span {
  display: grid;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

/* ——— Floating cart bar ——— */

.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 35;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.cart-bar-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--cart-bar-h);
  border: 0;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  text-align: left;
}

.cart-bar-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cart-bar-meta {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.cart-bar-submit {
  min-width: 110px;
  min-height: var(--cart-bar-h);
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.cart-bar-submit:hover {
  background: var(--accent-dark);
}

/* ——— Bottom nav ——— */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none; /* только мобильная версия */
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  min-height: var(--bottom-nav-h);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  position: relative;
}

.bottom-nav-item.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.bottom-nav-icon {
  font-size: 18px;
  line-height: 1;
}

.bottom-nav-item em {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.bottom-nav-item--cart.has-items {
  color: var(--accent-dark);
}

.bottom-nav-item--cart.has-items.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.header-cart-btn.has-items strong {
  animation: cart-pulse 0.35s ease;
}

@keyframes cart-pulse {
  50% {
    transform: scale(1.08);
  }
}

.bottom-nav-item em:empty,
.bottom-nav-item em[data-zero="true"] {
  display: none;
}

/* ——— Panels / drawers ——— */

.cart-panel,
.account-panel,
.admin-panel {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.admin-panel {
  z-index: 55;
}

.admin-login-gate {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.admin-login-gate.open {
  pointer-events: auto;
  opacity: 1;
}

.admin-login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.admin-login-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100% - 32px));
  transform: translate(-50%, -48%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.admin-login-gate.open .admin-login-card {
  transform: translate(-50%, -50%);
}

.admin-login-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.admin-login-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.admin-login-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-login-form input {
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
}

.admin-login-error {
  margin: 0;
  color: #dc2626;
  font-size: 0.9rem;
}

.cart-panel.open,
.account-panel.open,
.admin-panel.open {
  pointer-events: auto;
  opacity: 1;
}

.cart-backdrop,
.account-backdrop,
.admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.cart-drawer,
.account-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface);
  padding: 8px 0 0;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.14);
}

.admin-drawer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  background: var(--bg);
  padding: max(12px, env(safe-area-inset-top, 0px)) 14px 20px;
  transform: translateY(8px);
  transition: transform 0.25s ease;
}

.cart-panel.open .cart-drawer,
.account-panel.open .account-drawer {
  transform: translateY(0);
}

.admin-panel.open .admin-drawer {
  transform: translateY(0);
}

.admin-panel.admin-catalog-fullscreen .admin-drawer--storeland {
  inset: 0;
  border-radius: 0;
}

.admin-panel.admin-catalog-fullscreen .admin-sl-topbar,
.admin-panel.admin-catalog-fullscreen .admin-sl-nav,
.admin-panel.admin-catalog-fullscreen .admin-sl-goods-toolbar {
  display: none;
}

.admin-panel.admin-catalog-fullscreen .admin-section[data-admin-section="products"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.admin-panel.admin-catalog-fullscreen .admin-sl-goods-layout {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  min-height: 100%;
}

.admin-panel.admin-catalog-fullscreen .admin-sl-sidebar {
  padding-top: max(10px, env(safe-area-inset-top, 0px));
}

.admin-panel.admin-catalog-fullscreen .admin-sl-catalog {
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
}

.drawer-handle {
  width: 40px;
  height: 4px;
  margin: 4px auto 8px;
  border-radius: 999px;
  background: #e2e8f0;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 100%);
}

.cart-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-head-badge {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.cart-close-btn {
  border: 1px solid var(--line);
  background: var(--surface);
}

.cart-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 14px;
  align-content: start;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.cart-empty,
.success-message,
.account-note,
.account-empty {
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px dashed #bfdbfe;
  padding: 16px;
}

.success-message {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.cart-empty p,
.success-message p,
.account-note p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.success-order-summary {
  margin-top: 12px;
}

.success-order-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid #bbf7d0;
}

.success-order-head,
.success-order-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.success-order-head span,
.success-order-total span,
.success-order-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.success-order-head strong,
.success-order-total strong {
  color: #166534;
  font-weight: 900;
}

.success-order-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.success-order-list li {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.success-order-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.success-order-list span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.success-order-list strong,
.success-order-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.success-order-meta {
  display: grid;
  gap: 3px;
}

.cart-items-wrap {
  display: grid;
  gap: 8px;
}

.cart-items {
  display: grid;
  gap: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.cart-item-thumb {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-emoji {
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
}

.cart-item-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.cart-item-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cart-item-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.cart-item-pack {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.cart-item-price {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-item-fee {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.cart-item-qty {
  align-self: end;
}

.qty {
  display: grid;
  grid-template-columns: 32px 28px 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  overflow: hidden;
}

.qty button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 16px;
}

.qty span,
.qty input {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.qty input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.order-form,
.login-form,
.address-form,
.admin-form,
.profile-view {
  display: grid;
  gap: 12px;
}

.order-form label,
.login-form label,
.address-form label,
.admin-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.order-form input,
.order-form textarea,
.order-form select,
.login-form input,
.address-form input,
.address-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface);
  font-size: 16px;
  outline: none;
}

.admin-form textarea {
  min-height: 88px;
  resize: vertical;
  font-family: inherit;
}

.order-form input:focus,
.order-form textarea:focus,
.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

legend {
  margin-bottom: 4px;
  font-weight: 800;
}

.radio-card {
  display: grid !important;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
}

.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.radio-card strong,
.radio-card small {
  display: block;
}

.radio-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.cart-totals {
  margin-top: 4px;
}

.product-detail-total {
  margin: 0;
}

.submit-order {
  min-height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.25);
}

.submit-order--cart {
  margin-top: 4px;
}

.submit-order:hover {
  background: var(--primary-dark);
}

.cart-no-prepay {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.secondary-action {
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--primary-dark);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.role-choice {
  display: grid;
  gap: 10px;
}

.role-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.role-card strong {
  font-size: 16px;
}

.role-card span {
  color: var(--muted);
  font-size: 13px;
}

.admin-role {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
}

.profile-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card span {
  color: var(--muted);
  font-size: 13px;
}

.profile-tabs,
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--bg);
  scrollbar-width: none;
}

.profile-tab,
.admin-tab {
  flex-shrink: 0;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.profile-tab.active,
.admin-tab.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.profile-section,
.admin-section {
  display: none;
}

.profile-section.active,
.admin-section.active {
  display: grid;
  gap: 12px;
}

.profile-order-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
}

.profile-order-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.logout-button {
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid #f5c4b8;
  background: #fff5f2;
  color: var(--danger);
  font-weight: 800;
}

.admin-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.admin-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.admin-form-span2 {
  grid-column: 1 / -1;
}

.admin-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.admin-photos-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.admin-photos-fieldset legend {
  font-weight: 800;
  margin-bottom: 2px;
}

.admin-photo-toolbar {
  display: grid;
  gap: 10px;
}

.admin-photo-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
  background: var(--bg);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.admin-photo-url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.admin-photo-url-row input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface);
  font-size: 16px;
}

.admin-photo-list {
  display: grid;
  gap: 10px;
}

.admin-photo-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-photo-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg);
}

.admin-photo-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.admin-photo-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.admin-photo-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 4px 8px;
  border-radius: 999px;
}

.admin-photo-action {
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.admin-photo-action--danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.25);
}

.admin-form-actions {
  display: grid;
  gap: 8px;
}

.admin-form .submit-order {
  grid-column: auto;
}

.admin-products-layout,
.admin-goods-workspace {
  display: grid;
  grid-template-columns: minmax(148px, 28%) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.admin-goods-workspace {
  min-height: 0;
}

.admin-goods-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.admin-goods-head {
  display: grid;
  gap: 10px;
}

.admin-goods-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.admin-goods-head-text .admin-catalog-breadcrumb {
  margin-top: 2px;
}

.admin-goods-add-btn {
  min-height: 42px;
  white-space: nowrap;
}

.admin-goods-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 0;
}

.admin-goods-split.is-editing {
  grid-template-columns: minmax(0, 1fr);
}

.admin-goods-list-pane {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.admin-catalog-table-wrap {
  overflow: auto;
  max-height: min(52vh, 480px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.admin-catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-catalog-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f6f8;
}

.admin-catalog-table th,
.admin-catalog-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-catalog-table th {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.admin-catalog-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.admin-catalog-table tbody tr:hover {
  background: var(--primary-soft);
}

.admin-catalog-table tbody tr.is-active {
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.admin-catalog-table tbody tr.is-hidden-row {
  opacity: 0.65;
}

.admin-catalog-table .col-photo {
  width: 44px;
}

.admin-catalog-table .col-price,
.admin-catalog-table .col-stock {
  white-space: nowrap;
}

.admin-catalog-table .col-actions {
  width: 1%;
  white-space: nowrap;
}

.admin-table-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
}

.admin-table-emoji {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 18px;
}

.admin-table-name {
  display: grid;
  gap: 2px;
}

.admin-table-name strong {
  font-size: 13px;
  line-height: 1.3;
}

.admin-table-name span {
  font-size: 11px;
  color: var(--muted);
}

.admin-table-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table-status--live {
  background: #e8f5ee;
  color: var(--brand);
}

.admin-table-status--hidden {
  background: #f2f4f7;
  color: #667085;
}

.admin-table-status--out {
  background: #fff1f0;
  color: #b42318;
}

.admin-table-action {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 11px;
}

.admin-goods-editor-empty {
  display: grid;
  gap: 6px;
  place-content: center;
  min-height: 180px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.admin-goods-editor-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.admin-goods-editor-hint {
  margin: 0;
  font-size: 12px;
}

.admin-goods-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  max-height: min(68vh, 620px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.admin-goods-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8faf9 0%, var(--surface) 100%);
}

.admin-goods-editor-head .admin-editor-title {
  margin: 2px 0 0;
  font-size: 17px;
}

.admin-goods-editor-close {
  flex-shrink: 0;
}

.admin-goods-editor-form {
  overflow-y: auto;
  padding: 12px 14px 16px;
  display: grid;
  gap: 12px;
}

.admin-goods-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.admin-goods-section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.admin-goods-section-hint {
  margin: 0;
}

.admin-form-grid--editor {
  gap: 8px;
}

.admin-goods-editor-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -14px -16px;
  padding: 12px 14px;
  background: linear-gradient(180deg, transparent, var(--surface) 24%);
  border-top: 1px solid var(--line);
}

.admin-goods-split.is-editing .admin-goods-editor-empty {
  display: none;
}

/* ——— Storeland-style product admin ——— */

.admin-drawer--storeland {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.admin-drawer--storeland > .admin-sl-topbar,
.admin-drawer--storeland > .admin-sl-nav {
  flex-shrink: 0;
}

.admin-drawer--storeland > .admin-section.active {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.admin-drawer--storeland .admin-section:not([data-admin-section="products"]):not([data-admin-section="orders"]):not([data-admin-section="clients"]):not([data-admin-section="logistics"]):not([data-admin-section="directories"]) {
  padding: 12px 14px 20px;
  overflow-y: auto;
}

.admin-sl-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #1e2a36;
  color: #e8edf2;
}

.admin-sl-shop-link {
  border: 0;
  background: transparent;
  color: #7ec8ff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.admin-sl-refresh {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(126, 200, 255, 0.45);
  border-radius: 6px;
  background: rgba(126, 200, 255, 0.1);
  color: #c8ebff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.admin-sl-refresh:hover {
  background: rgba(126, 200, 255, 0.18);
  color: #fff;
}

.admin-sl-topbar-meta {
  margin-left: auto;
  font-size: 12px;
  color: #9aa8b5;
}

.admin-sl-close {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-sl-nav {
  display: flex;
  gap: 2px;
  padding: 0 10px;
  background: linear-gradient(180deg, #3b7fc4 0%, #356fa8 100%);
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-sl-nav-item {
  flex-shrink: 0;
  border: 0;
  border-radius: 6px 6px 0 0;
  margin-top: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #e8f2fb;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.admin-sl-nav-item.active {
  background: #f4f8fb;
  color: #1e4f7a;
}

.admin-sl-nav-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.admin-section[data-admin-section="products"] {
  display: none;
}

.admin-section.active[data-admin-section="products"] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.admin-sl-goods-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #eef4f9;
  border-bottom: 1px solid #d5e0ea;
}

.admin-sl-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.admin-sl-btn--green {
  background: #4cae4c;
  color: #fff;
  border-color: #449d44;
}

.admin-sl-btn--green:hover {
  background: #449d44;
}

.admin-sl-btn--outline {
  background: #fff;
  color: #2f6ba8;
  border-color: #b8cfe0;
}

.admin-sl-btn--sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.admin-sl-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4a5f73;
}

.admin-sl-sort select {
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #c5d5e3;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.admin-sl-goods-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.admin-sl-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 6px;
  padding: 8px;
  background: #f7fafc;
  border-right: 1px solid #d9e4ee;
  overflow: hidden;
}

.admin-sl-sidebar-search input {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #c5d5e3;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
}

.admin-sl-filter-group {
  display: grid;
  gap: 6px;
  min-height: 0;
}

.admin-sl-sidebar > .admin-sl-filter-group:not(.admin-sl-filter-group--quick) {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.admin-sl-filter-group--quick {
  padding: 6px;
  border: 1px solid #d9e4ee;
  border-radius: 6px;
  background: #fff;
}

.admin-sl-filter-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-sl-filter-current {
  min-width: 0;
  max-width: 96px;
  overflow: hidden;
  color: #1e4f7a;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sl-filter-toggle-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #e3eef7;
  color: #1e4f7a;
  font-size: 11px;
  transition: transform 0.15s ease;
}

.admin-sl-filter-group--quick:not(.is-collapsed) .admin-sl-filter-toggle-icon {
  transform: rotate(180deg);
}

.admin-sl-filter-label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7f92;
}

.admin-sl-filters {
  display: grid;
  gap: 2px;
}

.admin-sl-filter-group--quick.is-collapsed .admin-sl-filters {
  display: none;
}

.admin-sl-filter {
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 7px 8px;
  background: transparent;
  color: #2f4a60;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.admin-sl-filter:hover,
.admin-sl-filter.active {
  background: #e3eef7;
  color: #1e4f7a;
}

.admin-sl-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.admin-sl-icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #c5d5e3;
  border-radius: 4px;
  background: #fff;
  color: #2f6ba8;
  font-weight: 800;
  cursor: pointer;
}

.admin-sl-category-tree {
  max-height: none;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding-right: 0;
}

.admin-sl-category-form {
  margin-top: 8px;
}

.admin-sl-catalog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 10px 12px 12px;
  background: #fff;
  overflow: hidden;
}

.admin-sl-catalog-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 4px 10px;
  align-items: center;
}

.admin-sl-catalog-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #1e2a36;
}

.admin-sl-catalog-head .admin-catalog-breadcrumb {
  grid-column: 1;
  margin: 0;
  font-size: 12px;
  color: #6b7f92;
}

.admin-sl-catalog-search {
  grid-column: 1 / -1;
}

.admin-sl-catalog-search input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #c5d5e3;
  border-radius: 4px;
  font-size: 13px;
}

.admin-sl-catalog-head .admin-sl-btn--sm {
  grid-row: 1;
}

.admin-sl-catalog-head #adminCatalogFullscreen {
  grid-column: 2;
}

.admin-sl-catalog-head #adminCatalogNewHead {
  grid-column: 3;
}

.admin-sl-catalog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: #6b7f92;
}

.admin-sl-table-wrap {
  overflow: auto;
  border: 1px solid #d5e0ea;
  border-radius: 4px;
  min-height: 0;
}

.admin-sl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-sl-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e8eef3;
}

.admin-sl-table th,
.admin-sl-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #e2eaf1;
  vertical-align: middle;
}

.admin-sl-table th {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5a7085;
  white-space: nowrap;
}

.admin-sl-th-sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.admin-sl-th-sort em {
  color: #7f93a6;
  font-style: normal;
  font-size: 11px;
}

.admin-sl-th-sort:hover,
.admin-sl-th-sort.is-active {
  color: #1e4f7a;
}

.admin-sl-th-sort.is-active em {
  color: #1e4f7a;
}

.admin-sl-table tbody tr:nth-child(even) {
  background: #f5f9fc;
}

.admin-sl-table tbody tr:hover {
  background: #e8f3fb;
}

.admin-sl-table tbody tr.is-active {
  background: #dff0ff;
  box-shadow: inset 3px 0 0 #3b7fc4;
}

.admin-sl-table tbody tr.is-hidden-row {
  opacity: 0.7;
}

.admin-sl-table .col-check {
  width: 32px;
  text-align: center;
}

.admin-sl-table .col-hot,
.admin-sl-table .col-new {
  width: 40px;
  text-align: center;
}

.admin-hot-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  user-select: none;
}

.admin-hot-cell input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.admin-hot-cell span {
  font-size: 14px;
  line-height: 1;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

.admin-hot-cell:has(input:checked) span {
  opacity: 1;
}

.admin-hot-toggle,
.admin-new-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.admin-sl-table .col-photo {
  width: 48px;
}

.admin-sl-table .col-sku {
  width: 72px;
  color: #6b7f92;
  font-size: 11px;
}

.admin-sl-table .col-name strong {
  display: block;
  font-size: 13px;
  color: #1e4f7a;
  cursor: pointer;
}

.admin-sl-table .col-name strong:hover {
  text-decoration: underline;
}

.admin-sl-table .col-name span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #7a8fa1;
}

.admin-sl-inline-input {
  width: 100%;
  min-width: 64px;
  max-width: 96px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid #c5d5e3;
  border-radius: 3px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-sl-inline-input:focus {
  outline: 2px solid #3b7fc4;
  border-color: #3b7fc4;
}

.admin-sl-inline-input.is-saving {
  opacity: 0.6;
}

.admin-sl-pagination {
  padding-top: 4px;
}

.admin-sl-editor {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.admin-sl-editor:not([hidden]) {
  pointer-events: auto;
}

.admin-sl-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.admin-sl-editor-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f4f8fb;
  overflow: hidden;
}

.admin-sl-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  border-bottom: 1px solid #d5e0ea;
  background: #eef4f9;
  flex-shrink: 0;
}

.admin-sl-editor-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7f92;
}

.admin-sl-editor-form {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 12px;
  align-content: start;
}

.admin-sl-editor-form .admin-goods-section {
  background: #fff;
}

.admin-sl-editor-form input:not([type="checkbox"]),
.admin-sl-editor-form select {
  min-height: 44px;
}

.admin-sl-editor-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
  margin-top: 4px;
  border-top: 1px solid #e2eaf1;
  background: #fff;
}

body.admin-editor-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  .admin-sl-editor-panel {
    inset: 12px;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  }

  .admin-sl-editor-head {
    padding: 16px 24px;
    border-radius: 8px 8px 0 0;
  }

  .admin-sl-editor-form {
    padding: 20px 24px 24px;
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .admin-sl-editor-form > .admin-goods-section:nth-child(4),
  .admin-sl-editor-form > .admin-goods-section:nth-child(5),
  .admin-sl-editor-form > .admin-sl-editor-actions {
    grid-column: 1 / -1;
  }

  .admin-sl-editor-form .admin-form-grid--editor {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-sl-editor-form .admin-goods-section:nth-child(2) .admin-form-grid--editor {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .admin-sl-editor-panel {
    top: auto;
    bottom: 0;
    max-height: 96dvh;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.2);
  }

  .admin-sl-editor-head {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .admin-sl-editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.06);
  }

  .admin-sl-editor-actions .admin-sl-btn {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
  }

  .admin-sl-editor-close {
    width: 44px;
    height: 44px;
  }
}

/* ——— Storeland-style orders & clients ——— */

.admin-section[data-admin-section="orders"],
.admin-section[data-admin-section="clients"],
.admin-section[data-admin-section="logistics"],
.admin-section[data-admin-section="directories"] {
  display: none;
  padding: 0 !important;
}

.admin-section.active[data-admin-section="orders"],
.admin-section.active[data-admin-section="clients"],
.admin-section.active[data-admin-section="logistics"],
.admin-section.active[data-admin-section="directories"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0 !important;
}

.admin-sl-orders-shell,
.admin-sl-clients-shell,
.admin-sl-logistics-shell,
.admin-sl-directories-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.admin-sl-directories-shell {
  grid-template-columns: 180px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.admin-sl-directories-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border-right: 1px solid #d9e4ee;
  background: #f7fafc;
}

.admin-sl-directories-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 10px 12px 12px;
  overflow: hidden;
}

.admin-sl-status-form {
  max-width: 520px;
}

.admin-sl-subnav {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
  background: #f4f8fb;
  border-bottom: 1px solid var(--line);
}

.admin-sl-subnav-item {
  border: 0;
  border-radius: 8px 8px 0 0;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.admin-sl-subnav-item.active {
  background: #fff;
  color: var(--primary);
  box-shadow: inset 0 2px 0 var(--primary);
}

.admin-sl-logistics-panel {
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  padding: 12px 14px 20px;
  overflow: hidden;
}

.admin-sl-logistics-panel.active {
  display: grid;
}

.admin-sl-logistics-table {
  min-height: 0;
  overflow: auto;
}

.admin-sl-orders-list-view,
.admin-sl-clients-list-view {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.admin-sl-orders-toolbar,
.admin-sl-clients-toolbar {
  border-bottom: 1px solid #d5e0ea;
}

.admin-sl-orders-search,
.admin-sl-clients-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.admin-sl-orders-head,
.admin-sl-clients-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid #e2eaf1;
}

.admin-sl-orders-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.admin-sl-orders-table-wrap,
.admin-sl-clients-table-wrap {
  min-height: 0;
  overflow: auto;
  border-top: 0;
}

.admin-sl-table-row--clickable {
  cursor: pointer;
}

.admin-sl-table-row--clickable:hover {
  background: #f2f8fc;
}

.admin-sl-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #2f6ba8;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.admin-sl-link-btn:hover {
  text-decoration: underline;
}

.admin-sl-order-detail,
.admin-sl-client-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: #f4f8fb;
}

.admin-sl-order-detail-head,
.admin-sl-client-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #eef4f9;
  border-bottom: 1px solid #d5e0ea;
}

.admin-sl-order-detail-title,
.admin-sl-client-detail-title {
  min-width: 0;
}

.admin-sl-order-detail-eyebrow {
  margin: 0;
  color: #6b7f92;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-sl-order-detail-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-sl-order-detail-headline h3,
.admin-sl-client-detail-title h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.admin-sl-order-detail-meta {
  margin: 4px 0 0;
  color: #6b7f92;
  font-size: 13px;
  font-weight: 600;
}

.admin-sl-order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.9fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.admin-sl-order-detail-main,
.admin-sl-order-detail-aside,
.admin-sl-client-detail-layout {
  min-height: 0;
  overflow: auto;
}

.admin-sl-order-detail-main,
.admin-sl-order-detail-aside {
  display: grid;
  align-content: start;
  gap: 10px;
}

.admin-sl-client-detail-layout {
  display: grid;
  gap: 12px;
  padding: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.admin-sl-client-summary {
  max-width: 520px;
}

.admin-sl-order-card {
  padding: 12px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d9e4ee;
}

.admin-sl-order-card-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #2f4a60;
}

.admin-sl-order-dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.admin-sl-order-dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}

.admin-sl-order-dl dt {
  color: #6b7f92;
  font-size: 12px;
  font-weight: 700;
}

.admin-sl-order-dl dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.admin-sl-order-dl dd a {
  color: #2f6ba8;
  text-decoration: none;
}

.admin-sl-order-status-note {
  margin: 10px 0 0;
  color: #6b7f92;
  font-size: 12px;
}

.admin-sl-table--compact th,
.admin-sl-table--compact td {
  padding: 8px 10px;
  font-size: 12px;
}

.admin-sl-order-detail-aside .jp-timeline {
  margin: 0;
  padding: 0;
}

.admin-category-sidebar {
  display: grid;
  gap: 8px;
  min-width: 0;
  position: sticky;
  top: 0;
}

.admin-category-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-category-sidebar-head strong {
  font-size: 13px;
}

.admin-category-add-btn {
  min-height: 32px;
  padding: 0 10px;
}

.admin-category-tree {
  display: grid;
  gap: 3px;
  max-height: min(46vh, 380px);
  overflow: auto;
  padding-right: 2px;
}

.admin-category-tree.admin-sl-category-tree {
  align-self: stretch;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: auto;
}

.admin-sl-sidebar > .admin-sl-filter-group:not(.admin-sl-filter-group--quick) {
  align-self: stretch;
}

.admin-cat-node {
  display: grid;
  gap: 1px;
}

.admin-cat-row-wrap {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 28px;
  gap: 4px;
  align-items: stretch;
}

.admin-cat-toggle {
  display: grid;
  place-items: center;
  border: 1px solid #d5e0ea;
  border-radius: 8px;
  background: #fff;
  color: #1e4f7a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.admin-cat-toggle:hover {
  background: #e3eef7;
  border-color: #b8cfe0;
}

.admin-cat-toggle[aria-expanded="true"] {
  background: #e3eef7;
}

.admin-cat-row,
.admin-cat-sub {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.admin-cat-row--all {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.admin-cat-row--hot {
  margin-bottom: 6px;
  border-color: #ffc9b3;
  background: linear-gradient(135deg, #fff7f2 0%, #ffe8dc 100%);
}

.admin-cat-row--hot .admin-cat-name {
  color: #c2410c;
  font-weight: 700;
}

.admin-cat-row--hot.active {
  border-color: #ff6b35;
  background: linear-gradient(135deg, #ffe8dc 0%, #ffd4bf 100%);
}

.admin-cat-row.active,
.admin-cat-sub.active {
  border-color: var(--brand);
  background: var(--primary-soft);
}

.admin-cat-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  line-height: 0;
}

.admin-cat-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-cat-name {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-cat-count {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}

.admin-cat-edit {
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.admin-cat-subs {
  display: grid;
  gap: 2px;
  padding-left: 22px;
}

.admin-cat-subs[hidden] {
  display: none !important;
}

.admin-cat-sub {
  grid-template-columns: 18px minmax(0, 1fr) max-content 22px;
  min-height: 30px;
  padding: 4px 6px;
}

.admin-cat-sub .admin-cat-icon {
  width: 18px;
  height: 18px;
  font-size: 13px;
}

.admin-cat-sub .admin-cat-name {
  font-size: 10px;
  font-weight: 600;
}

.admin-cat-sub-add {
  justify-content: center;
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  background: transparent;
  border-style: dashed;
}

.admin-category-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.admin-category-form[hidden] {
  display: none;
}

.admin-category-form-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.admin-category-form label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}

.admin-category-form input,
.admin-category-form select {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.admin-category-icon-picker {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 320px);
  overflow: auto;
  padding-right: 2px;
}

.admin-category-icon-group {
  display: grid;
  gap: 4px;
}

.admin-category-icon-group-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-category-icon-group-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-category-icon-option {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  line-height: 0;
  cursor: pointer;
}

.admin-category-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.admin-category-icon-option.active {
  border-color: var(--brand);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--brand);
}

.admin-category-form-actions {
  display: grid;
  gap: 6px;
}

.admin-sl-category-form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(58vh, 520px);
  overflow: auto;
}

.admin-category-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.admin-category-form-close {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.admin-sl-category-form input,
.admin-sl-category-form select {
  width: 100%;
  min-width: 0;
}

.admin-sl-category-form .admin-category-icon-picker {
  max-width: 100%;
  max-height: min(28vh, 220px);
  gap: 6px;
}

.admin-sl-category-form .admin-category-icon-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  min-width: 0;
}

.admin-sl-category-form .admin-category-icon-option {
  width: 100%;
  min-width: 0;
  height: 30px;
}

.admin-sl-category-form .admin-category-form-actions {
  position: sticky;
  bottom: -10px;
  padding-top: 8px;
  background: var(--surface);
}

.admin-products-pane {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.admin-catalog-breadcrumb {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
}

.category-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 4px;
  box-sizing: border-box;
  line-height: 0;
  vertical-align: middle;
}

.category-pill-icon-img {
  display: block;
  width: 85%;
  height: 85%;
  margin: auto;
  object-fit: contain;
  object-position: center;
  image-rendering: crisp-edges;
  -webkit-image-rendering: crisp-edges;
}

.category-sidebar .category-pill-icon {
  width: 34px;
  height: 34px;
}

.cat-v1-icon,
.sub-v1-icon,
.sub-v1-icon-svg {
  display: block;
  width: 85%;
  height: 85%;
  margin: auto;
  object-fit: contain;
  object-position: center;
  image-rendering: crisp-edges;
  -webkit-image-rendering: crisp-edges;
  flex-shrink: 0;
}

.category-pill.active .cat-v1-icon {
  filter: brightness(0) invert(1);
}

.category-pill--sub.active .sub-v1-icon-svg {
  filter: none;
}

.category-pill--sub.active .category-pill-icon {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
  border-radius: 10px;
}



.admin-catalog-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-catalog-search input,
.admin-catalog-filter select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font: inherit;
}

.admin-catalog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.admin-catalog-list {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow: auto;
  margin-bottom: 10px;
  padding-right: 2px;
}

.admin-catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.admin-catalog-page.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.admin-catalog-page-gap {
  color: var(--muted);
  padding: 0 2px;
}

.admin-catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.admin-catalog-tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}

.admin-catalog-tag--custom {
  background: #e8f5ee;
  color: var(--brand);
}

.admin-catalog-tag--edited {
  background: #fff4e5;
  color: #b54708;
}

.admin-catalog-tag--hidden {
  background: #f2f4f7;
  color: #667085;
}

.admin-row--hidden {
  opacity: 0.72;
}

.admin-row--active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.15);
}

.admin-editor-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.admin-catalog-editor {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-form-span {
  grid-column: span 2;
}

.admin-hidden-toggle {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.admin-hidden-toggle input {
  width: auto;
  margin: 0;
}

.admin-videos-fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  border-style: dashed;
}

.admin-videos-fieldset legend {
  padding: 0 4px;
  font-weight: 700;
}

.admin-video-list {
  display: grid;
  gap: 10px;
}

.admin-video-item {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.admin-video-item video {
  width: 100%;
  max-height: 180px;
  border-radius: var(--radius-sm);
  background: #000;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-row,
.admin-order {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.admin-row--product {
  grid-template-columns: 48px 1fr auto;
  align-items: start;
}

.admin-row-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.admin-row-emoji {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.admin-row-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-row-meta {
  text-align: right;
  display: grid;
  gap: 2px;
}

.admin-row-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-delete-button {
  color: #b42318;
}

.admin-tab {
  position: relative;
}

.admin-tab-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.admin-orders-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.admin-orders-search input,
.admin-orders-filter select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--surface);
  font-size: 14px;
}

.admin-orders-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-orders-stat {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.admin-orders-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-orders-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.admin-orders-layout {
  display: grid;
  gap: 12px;
}

.admin-orders-panel {
  min-height: 120px;
}

.admin-orders-list {
  display: grid;
  gap: 8px;
  max-height: 42vh;
  overflow: auto;
  padding-right: 2px;
}

.admin-order-row {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.admin-order-row.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.12);
}

.admin-order-row-top,
.admin-order-row-main,
.admin-order-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-order-row-name {
  font-weight: 700;
  color: var(--ink);
}

.admin-order-row-total {
  color: #c6501d;
  white-space: nowrap;
}

.admin-order-row-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.order-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.order-status--info {
  background: #e8f2ff;
  color: #1d4ed8;
}

.order-status--warn {
  background: #fff4e5;
  color: #b45309;
}

.order-status--ok {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.order-status--muted {
  background: #eef0ec;
  color: #5f6a58;
}

.order-status--danger {
  background: #fff1f0;
  color: #b42318;
}

.admin-order-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
}

.admin-order-detail-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.admin-order-detail-body {
  display: grid;
  gap: 12px;
}

.admin-order-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-order-detail-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.admin-order-detail-date {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-order-detail-grid {
  display: grid;
  gap: 10px;
}

.admin-order-detail-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.admin-order-detail-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.admin-order-detail-card dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.admin-order-detail-card dl div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
}

.admin-order-detail-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-order-detail-card dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.admin-order-detail-card dd a {
  color: var(--primary-dark);
  text-decoration: none;
}

.admin-order-detail-totals {
  display: grid;
  gap: 8px;
}

.admin-order-table-wrap {
  overflow: auto;
}

.admin-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-order-table th,
.admin-order-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-order-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-order-legacy-items {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.admin-order-status-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.admin-order-status-field select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
}

/* Compact admin order detail: keep all information, fit more on one screen. */
.admin-sl-order-detail-head {
  gap: 8px;
  padding: 7px 10px;
}

.admin-sl-order-detail-head .admin-sl-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-sl-order-detail-eyebrow {
  font-size: 10px;
}

.admin-sl-order-detail-headline h3 {
  margin-top: 0;
  font-size: 16px;
  line-height: 1.15;
}

.admin-sl-order-detail-meta {
  margin-top: 2px;
  font-size: 11px;
}

.admin-sl-order-detail-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 0.75fr);
  gap: 8px;
  padding: 8px;
}

.admin-sl-order-detail-main,
.admin-sl-order-detail-aside {
  gap: 3px;
}

.admin-sl-order-detail-main {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  align-items: start;
}

.admin-sl-order-detail-main .admin-sl-order-card:nth-child(2) {
  grid-column: 1 / -1;
}

.admin-sl-order-card {
  padding: 6px;
  border-radius: 5px;
}

.admin-sl-order-card-title {
  margin-bottom: 5px;
  font-size: 12px;
}

.admin-sl-order-dl {
  gap: 4px;
}

.admin-sl-order-dl div {
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 6px;
}

.admin-sl-order-dl dt {
  font-size: 10px;
}

.admin-sl-order-dl dd {
  font-size: 11px;
  line-height: 1.25;
}

.admin-order-table {
  font-size: 11px;
}

.admin-order-table th,
.admin-order-table td {
  padding: 3px 4px;
  line-height: 1.25;
}

.admin-order-table th {
  font-size: 9px;
}

.admin-order-status-field {
  gap: 4px;
  font-size: 11px;
}

.admin-order-status-field select {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.admin-order-detail-totals {
  gap: 0;
}

.admin-order-detail-totals .total-row {
  padding: 3px 0;
  font-size: 11px;
}

.admin-order-detail-totals .total-row--main {
  margin-top: 2px;
  padding-top: 5px;
}

.admin-order-detail-totals .total-row--main strong {
  font-size: 15px;
}

.admin-sl-order-detail-aside .jp-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}

.admin-sl-order-detail-aside .jp-timeline-step {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 5px;
  border: 1px solid #d9e4ee;
  border-radius: 999px;
  background: #f7fafc;
}

.admin-sl-order-detail-aside .jp-timeline-dot {
  width: 7px;
  height: 7px;
}

.admin-sl-order-detail-aside .jp-timeline-label {
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sl-order-status-note {
  margin-top: 6px;
  font-size: 10px;
}

.admin-order-detail-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-row span,
.admin-order p,
.admin-order small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-order-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.admin-order ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
}

.no-results {
  grid-column: 1 / -1;
  padding: 32px 20px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ——— Mobile: cards & usability ——— */

@media (max-width: 767px) {
  :root {
    --header-safe-top: 8px;
    --header-h: 146px;
    --bottom-nav-h: 68px;
    --cart-bar-h: 52px;
  }

  button,
  .category-pill,
  .product-card-info,
  .product-thumb,
  .product-favorite,
  .product-card-share,
  .bottom-nav-item,
  .comments-toggle,
  .cart-bar-button,
  .cart-bar-submit {
    touch-action: manipulation;
  }

  body {
    font-size: 16px;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  }

  body.has-cart-bar {
    padding-bottom: calc(
      var(--bottom-nav-h) + var(--cart-bar-h) + env(safe-area-inset-bottom, 0px) + 16px
    );
  }

  main {
    padding: 10px 12px 20px;
  }

  .site-header {
    --header-bar-h: 56px;
    --header-safe-top: 8px;
    padding: 8px 14px 10px;
    position: sticky;
    top: 0;
    z-index: 40;
  }

  /* Cleaned mobile header for new structure (search center, PVZ + Fav right group) */
  .header-bar {
    min-height: var(--header-bar-h);
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 6px;
  }

  .brand {
    flex: 0 0 auto;
    min-width: 0;
  }

  .brand-text {
    display: none;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  /* (откат) оставшиеся header modern mobile правила убраны */

  .header-profile-label {
    display: none;
  }

  /* Keep cart visible */
  .header-cart-btn {
    padding: 4px 6px;
  }

  .header-phone {
    display: none !important;
  }

  .location-chip {
    display: none !important;
  }
    display: flex;
    gap: 10px;
    flex-shrink: 0;
  }

  .header-notify-btn,
  .header-profile-btn {
    min-height: 52px;
    min-width: 52px;
    padding: 0;
    border-radius: 14px;
    background: var(--primary-soft);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.12);
  }

  .header-notify-btn .header-notify-icon-svg,
  .header-profile-btn .header-profile-icon-svg {
    width: 28px;
    height: 28px;
  }

  .header-notify-btn strong {
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    line-height: 20px;
  }

  .header-cart-btn {
    display: none !important;
  }

  .header-cart-btn .header-cart-icon {
    width: 28px;
    height: 28px;
  }

  .header-cart-btn-label {
    display: none;
  }

  .header-cart-btn strong {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    background: var(--danger);
    border: 2px solid var(--surface);
  }

  .mobile-search {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 6px;
    height: 40px;
    min-height: 40px;
    border-radius: 12px;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    padding: 0;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
  }

  .mobile-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    margin: 0;
    pointer-events: none;
    z-index: 1;
  }

  .mobile-search input[type="search"] {
    display: block;
    width: 100%;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0 10px 0 36px;
    border: 0;
    line-height: normal;
    font-size: 14px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
  }

  .mobile-search input[type="search"]::-webkit-search-decoration,
  .mobile-search input[type="search"]::-webkit-search-cancel-button,
  .mobile-search input[type="search"]::-webkit-search-results-button {
    display: none;
    -webkit-appearance: none;
  }

  .collection-board {
    padding: 12px;
    margin: 0 0 10px;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    max-height: none;
  }

  .collection-board--idle {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .collection-board--idle .collection-bar {
    display: none;
  }

  .collection-board--idle .collection-idle-msg {
    display: block;
    max-height: 100px;
    overflow: hidden;
  }

  .collection-board--active .collection-idle-msg {
    display: none;
  }

  .collection-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .collection-bar-info {
    width: 100%;
  }

  .collection-bar-top {
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .collection-badge {
    font-size: 13px;
    font-weight: 800;
  }

  .collection-amount {
    margin: 4px 0;
    font-size: 14px;
  }

  .collection-people {
    margin: 0;
    font-size: 13px;
  }

  .collection-linear-wrap {
    display: grid;
  }

  .collection-ring--bar {
    display: none !important;
  }

  .collection-cta {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
  }

  /* Переделано: компактный но информативный сбор в 1 строчку в мобильной.
     "на что сбор" (note) + сумма + участники + кнопка Участвовать.
     Современно, чуть шире, удобно (как раньше но плотнее в строку). */
  #collectionBoard .collection-board {
    padding: 6px 8px;
    margin-bottom: 6px;
  }

  #collectionBoard .collection-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  #collectionBoard .collection-bar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  #collectionBoard .collection-bar-top {
    flex-shrink: 0;
  }

  #collectionBoard .collection-badge {
    font-size: 9px;
    padding: 1px 5px;
    flex-shrink: 0;
  }

  #collectionBoard .collection-board-note {
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 40px;
    color: var(--ink);
    font-weight: 600;
  }

  #collectionBoard .collection-amount {
    font-size: 9px;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--muted);
  }

  #collectionBoard .collection-amount strong {
    font-size: 10px;
    color: var(--ink);
    font-weight: 700;
  }

  #collectionBoard .collection-people {
    font-size: 9px;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--muted);
  }

  #collectionBoard .collection-deadline,
  #collectionBoard .collection-linear-wrap,
  #collectionBoard .collection-ring--bar {
    display: none !important;
  }

  #collectionBoard .collection-cta {
    width: auto;
    min-width: 78px;
    min-height: 34px;
    font-size: 11px;
    padding: 0 8px;
    flex-shrink: 0;
    border-radius: 8px;
    font-weight: 700;
  }

  .product-card-comments-host {
    display: none !important;
  }

  .search {
    flex: 1 1 100%;
    order: 10;
  }

  .search:not(.mobile-search) input {
    min-height: 44px;
    font-size: 16px;
  }

  .catalog-section {
    display: block;
  }

  .catalog-categories {
    display: none;
  }

  .catalog-main {
    margin-top: 0;
  }

  .catalog-toolbar {
    position: sticky;
    top: var(--header-h);
    z-index: 25;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0 -12px 6px;
    padding: 0 12px 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  }

  .catalog-toolbar::before {
    top: -10px;
    height: 10px;
  }

  /* Compact "Найти товар" menu in mobile: search + filter/sort toolbar */
  .catalog-toolbar .toolbar-controls {
    gap: 6px;
  }

  .catalog-toolbar .toolbar-controls > label,
  .catalog-toolbar .toggle-chip,
  .catalog-toolbar .select-wrap select {
    min-height: 36px;
    font-size: 12px;
  }

  .catalog-toolbar .toggle-chip {
    padding: 0 10px;
  }

  .category-tabs {
    --category-tab-gap: 6px;
    gap: var(--category-tab-gap);
    padding: 0 0 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .category-tabs .category-pill--tab {
    flex: 0 0 48px;
    width: 48px;
    min-height: 48px;
    padding: 4px;
    gap: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border-style: solid;
    text-align: center;
    scroll-snap-align: start;
  }

  .category-tabs .category-pill--sub {
    flex: 0 0 auto;
    width: auto;
    min-width: 58px;
    max-width: 78px;
    min-height: 56px;
    padding: 4px 5px 5px;
    gap: 3px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border-style: solid;
    text-align: center;
    scroll-snap-align: start;
  }

  /* (откат иконок к обычным размерам до модернизации: ~28-30px tab, ~18-20px sub) */
  .category-tabs .category-pill--tab .category-pill-icon {
    margin: 0;
    line-height: 0;
    width: 28px;
    height: 28px;
    padding: 4px;
  }

  .category-tabs .category-pill--sub .category-pill-icon {
    margin: 0;
    line-height: 0;
    width: 18px;
    height: 18px;
    padding: 2px;
  }

  .category-tabs .category-pill--tab .category-pill-icon-img,
  .category-tabs .category-pill--sub .category-pill-icon-img {
    width: 85%;
    height: 85%;
    margin: auto;
    image-rendering: crisp-edges;
    -webkit-image-rendering: crisp-edges;
  }

  .category-tabs .category-pill--sub.active .category-pill-label {
    color: #fff;
  }

  .category-tabs .category-sublist {
    display: contents;
  }

  .category-tabs .category-pill--sub.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.18);
  }

  .toolbar-controls {
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .toolbar-controls::-webkit-scrollbar {
    display: none;
  }

  .toggle-chip--compact {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 10px;
  }

  .toggle-chip--compact span {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
  }

  .select-wrap--compact {
    flex: 0 0 auto;
    min-width: 0;
  }

  .select-wrap--compact select {
    width: auto;
    min-height: 32px;
    min-width: 108px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 700;
  }

  .select-wrap--page-size .select-wrap-page-label {
    display: none;
  }

  .select-wrap--page-size select {
    min-width: 64px;
    text-align: center;
    text-align-last: center;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card {
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
    background: var(--surface);
  }

  .product-thumb {
    padding: 6px;
    border-radius: 18px 18px 0 0;
  }

  .product-card .product-title {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 800;
  }

  .product-card .product-brief {
    display: none;
  }

  .product-card .product-subcategory {
    font-size: 10px;
  }

  .product-card .product-price-value {
    font-size: 15px;
  }

  .product-card .add-button {
    font-size: 13px;
    font-weight: 800;
    min-height: 40px;
    border-radius: 12px;
  }

  .product-favorite,
  .product-card-share {
    width: 36px;
    height: 36px;
  }

  .product-card-share .share-icon--card {
    width: 36px;
    height: 36px;
  }

  .product-card:not(.product-card--unavailable) .product-card-badges-host:not(.product-card-badges-host--out) {
    top: 52px;
  }

  .product-card-actions {
    padding: 4px 8px 8px;
  }

  .product-card-info {
    padding: 6px 8px 4px;
  }

  .collection-amount strong {
    font-size: 17px;
  }

  .collection-countdown {
    font-size: 14px;
  }

  /* Compact "Сбор открыт" block in mobile */
  .collection-board {
    padding: 8px 10px;
    margin-bottom: 8px;
  }

  .collection-bar {
    gap: 6px 8px;
  }

  .collection-bar-top {
    gap: 6px 10px;
  }

  .collection-bar-info {
    gap: 4px;
  }

  .collection-badge {
    padding: 2px 6px;
    font-size: 10px;
  }

  .collection-deadline-label,
  .collection-deadline-note {
    font-size: 10px;
  }

  .collection-countdown {
    font-size: 13px;
  }

  .collection-amount {
    font-size: 12px;
  }

  .collection-people {
    font-size: 11px;
  }

  .collection-board-note {
    font-size: 10px;
  }

  .about-card {
    --about-pad: 16px;
  }

  .about-trust {
    grid-template-columns: 1fr;
  }



  .cart-bar {
    left: 10px;
    right: 10px;
    gap: 10px;
  }

  .cart-bar-button,
  .cart-bar-submit {
    min-height: 52px;
  }

  .cart-bar-submit {
    min-width: 120px;
    font-size: 14px;
  }

  .bottom-nav-item {
    min-height: 52px;
    font-size: 10px;
    gap: 4px;
    font-weight: 700;
  }

  .bottom-nav-icon {
    font-size: 20px;
  }

  .bottom-nav {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .product-drawer {
    max-height: 96dvh;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .cart-drawer,
  .account-drawer {
    max-height: 96dvh;
    padding: 0;
  }

  .cart-head {
    padding: 0 12px 10px;
  }

  .cart-drawer-body {
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .order-form input,
  .order-form textarea,
  .order-form select,
  .login-form input,
  .address-form input,
  .address-form textarea {
    font-size: 16px;
    min-height: 48px;
  }

  .order-form textarea {
    min-height: 96px;
  }

  .submit-order,
  .submit-order--cart {
    min-height: 52px;
    font-size: 16px;
  }

  .radio-card {
    min-height: 48px;
  }

  .product-detail-title {
    font-size: 20px;
  }

  .product-specs {
    grid-template-columns: 1fr;
  }

  .product-detail-purchase {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .bottom-nav {
    display: grid; /* показывать только на мобильных */
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  /* Восстанавливаем отступ под bottom-nav только на мобильной версии */
  body {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }
  body.has-cart-bar {
    padding-bottom: calc(
      var(--bottom-nav-h) + var(--cart-bar-h) + env(safe-area-inset-bottom, 0px) + 12px
    );
  }

  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-span2 {
    grid-column: auto;
  }

  .admin-products-layout,
  .admin-goods-workspace {
    grid-template-columns: 1fr;
  }

  .admin-category-sidebar {
    position: static;
  }

  .admin-category-tree {
    max-height: 28vh;
  }

  .admin-catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-catalog-list,
  .admin-catalog-table-wrap {
    max-height: 36vh;
  }

  .admin-goods-editor {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    max-height: 78vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
  }

  .photo-standard-compare {
    grid-template-columns: 1fr;
  }

  .admin-orders-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-order-detail-card dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }
}

/* ——— Desktop enhancements ——— */

@media (min-width: 768px) {
  body {
    padding-bottom: 24px;
  }

  body.has-cart-bar {
    padding-bottom: 24px;
  }

  .bottom-nav {
    display: none;
  }

  .header-actions--desktop {
    display: flex;
  }

  .header-catalog-btn {
    display: none;
  }

  .location-chip {
    display: none;
  }

  .search {
    max-width: 420px;
    margin-top: 0;
    margin-left: auto;
  }

  .site-header {
    --header-bar-h: 52px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
  }

  .header-bar {
    grid-column: 1;
    min-height: var(--header-bar-h);
  }

  .brand-mark {
    max-height: var(--header-bar-h);
  }

  .search {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  main {
    padding: 20px 24px 40px;
  }

  .collection-bar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "info ring cta";
    gap: 16px 20px;
  }

  .collection-ring--bar {
    --ring-size: 88px;
  }

  .collection-cta {
    grid-area: cta;
    width: auto;
    min-width: 168px;
    align-self: center;
  }

  .primary-action {
    width: auto;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .cart-drawer,
  .account-drawer {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    max-height: none;
    width: min(440px, 100%);
    border-radius: 0;
    transform: translateX(100%);
    padding: 0;
    border-left: 1px solid var(--line);
  }

  .cart-head {
    padding: 20px 22px 14px;
  }

  .cart-drawer-body {
    padding: 16px 22px 22px;
  }

  .cart-panel.open .cart-drawer,
  .account-panel.open .account-drawer,
  .product-panel.open .product-drawer {
    transform: translateX(0);
  }

  .product-drawer {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    max-height: none;
    width: min(480px, 100%);
    border-radius: 0;
    transform: translateX(100%);
    padding: 22px;
  }

  .drawer-handle {
    display: none;
  }

  .cart-bar {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: min(360px, calc(100% - 48px));
  }

  .about-card {
    --about-pad: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "head head"
      "proof proof"
      "trust trust"
      "guide guide"
      "promo promo";
    align-items: stretch;
  }

  .about-card-head {
    grid-area: head;
    padding-bottom: 4px;
  }

  .about-proof {
    grid-area: proof;
    padding-bottom: var(--about-pad);
  }

  .about-trust {
    grid-area: trust;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
  }

  .about-guide {
    grid-area: guide;
    padding-bottom: var(--about-pad);
  }

  .about-promo {
    grid-area: promo;
  }

  /* Каталог: на десктопе только боковая колонка категорий (без дубля в тулбаре). Поддержка текущей структуры с .catalog-content (тулбар сверху, категории слева от карточек) */
  .catalog-content {
    display: grid !important;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 16px 20px;
    align-items: start;
  }

  .catalog-categories {
    display: block !important;
    top: calc(var(--header-h) + 8px);
    max-height: calc(100dvh - var(--header-h) - 32px);
  }

  /* catalog-main внутри .catalog-content не требует grid-column, grid на content управляет размещением */

  .catalog-toolbar {
    position: sticky;
    top: var(--header-h);
    z-index: 15;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: stretch;
    gap: 0;
    width: 100%;
    margin: 0 0 14px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }

  .catalog-toolbar::before {
    display: none;
  }

  .catalog-toolbar .category-tabs {
    display: none;
  }

  .catalog-toolbar .toolbar-controls {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 0;
    overflow: visible;
  }

  .catalog-toolbar .toolbar-controls > label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    flex: 0 0 auto;
  }

  .catalog-toolbar .toggle-chip {
    min-height: 36px;
    padding: 0 10px;
  }

  .catalog-toolbar .toggle-chip span {
    font-size: 12px;
    font-weight: 800;
  }

  .catalog-toolbar .select-wrap select {
    min-height: 36px;
    font-size: 12px;
  }

  .catalog-toolbar .select-wrap--page-size {
    gap: 8px;
  }

  .catalog-toolbar .select-wrap--page-size .select-wrap-page-label {
    display: inline;
  }

  .category-sidebar .category-pill {
    width: 100%;
  }

  .category-sidebar .category-sublist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 6px;
    padding: 4px 0 6px 10px;
  }
}

@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 720px) {
  .admin-orders-stats,
  .admin-sl-orders-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .admin-drawer {
    inset: 10px;
    border-radius: 8px;
    max-width: none;
    margin: 0;
  }

  .admin-drawer--storeland {
    inset: 8px;
  }

  .admin-sl-catalog-head {
    grid-template-columns: 1fr auto auto;
  }

  .admin-sl-catalog-search {
    grid-column: 1 / 3;
  }
}

@media (max-width: 767px) {
  .admin-sl-goods-layout {
    grid-template-columns: 1fr;
  }

  .admin-sl-sidebar {
    max-height: 34vh;
    border-right: 0;
    border-bottom: 1px solid #d9e4ee;
  }

  .admin-sl-order-detail-layout {
    grid-template-columns: 1fr;
  }

  .admin-sl-order-dl div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 359px) {
  main {
    padding: 10px 10px 18px;
  }

  .brand-text small {
    display: none;
  }

  .location-chip {
    display: none;
  }

  .product-grid {
    gap: 8px;
  }

  .product-card .product-title {
    font-size: 10px;
  }

  .product-card .product-price-value {
    font-size: 13px;
  }

  .collection-stats {
    grid-template-columns: 1fr;
  }
}

.order-pickup-block {
  display: grid;
  gap: 8px;
}

.order-pickup-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.order-pickup-list {
  display: grid;
  gap: 8px;
}

.order-pickup-card small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.order-pickup-hint {
  margin: 0;
  font-size: 12px;
  color: var(--warn, #b45309);
}

.catalog-boot-loading,
.catalog-boot-error {
  min-height: 180px;
}

.catalog-boot-error a {
  color: var(--primary);
  font-weight: 700;
}

.catalog-boot-error kbd {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
}

.admin-pickup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-pickup-form {
  margin-top: 16px;
}

.admin-checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.admin-checkbox-row input {
  width: auto;
  min-height: auto;
}

/* Final catalog layout override: desktop sidebar, mobile tabs. */
@media (min-width: 768px) {
  .catalog-content {
    display: grid !important;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  .catalog-categories {
    display: block !important;
    width: 180px;
  }

  .category-tabs,
  .catalog-toolbar .category-tabs {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .catalog-content {
    display: block !important;
  }

  .catalog-categories {
    display: none !important;
  }

  .category-tabs,
  .catalog-toolbar .category-tabs {
    display: flex !important;
  }
}

/* Final desktop header alignment: keep header content as wide as the site sections. */
@media (min-width: 768px) {
  .site-header {
    display: block;
    padding: 8px 14px 10px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
  }

  .header-bar {
    display: grid !important;
    grid-template-columns: minmax(190px, 240px) minmax(260px, 1fr) auto auto auto auto auto;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    min-height: var(--header-bar-h, 52px);
    margin: 0 auto;
    gap: 10px;
  }

  .brand,
  .search,
  .location-chip,
  .header-phone,
  .header-notify-btn,
  .header-profile-btn,
  .header-cart-btn {
    order: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 !important;
  }

  .search {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
  }
}

@media (min-width: 1180px) {
  .header-bar {
    grid-template-columns: minmax(210px, 250px) minmax(340px, 1fr) auto auto auto auto auto;
  }
}

/* Final mobile header: logo → search → notifications → account. */
@media (max-width: 767px) {
  .site-header {
    --header-bar-h: 48px;
    display: block !important;
    padding: 8px 10px 8px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
  }

  .header-bar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    min-height: var(--header-bar-h);
    padding: 0;
    width: 100%;
  }

  .brand {
    grid-column: 1;
    min-width: 0;
    margin: 0 !important;
  }

  .brand-text,
  .header-profile-label,
  .header-phone,
  .location-chip,
  .header-cart-btn {
    display: none !important;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .search {
    grid-column: 2;
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    margin: 0 !important;
    padding: 0 9px;
    gap: 6px;
    border-radius: 13px;
    box-sizing: border-box;
  }

  .search-icon {
    width: 17px;
    height: 17px;
  }

  .search input {
    min-width: 0;
    min-height: 38px;
    height: 38px;
    font-size: 13px;
  }

  .search input::placeholder {
    font-size: 0;
  }

  .search input::placeholder {
    color: transparent;
  }

  .header-notify-btn {
    grid-column: 3;
  }

  .header-profile-btn {
    grid-column: 4;
  }

  .header-notify-btn,
  .header-profile-btn {
    display: inline-grid !important;
    place-items: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0 !important;
    border-radius: 13px;
  }

  .header-notify-btn .header-notify-icon-svg,
  .header-profile-btn .header-profile-icon-svg {
    width: 22px;
    height: 22px;
  }
}

/* Header logo emphasis. */
.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

@media (min-width: 768px) {
  .site-header {
    --header-bar-h: 64px;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .brand-text strong {
    font-size: 17px;
  }
}

/* Catalog desktop alignment: filters above cards, categories aligned below collection block. */
@media (min-width: 768px) {
  .catalog-toolbar {
    width: calc(100% - 196px) !important;
    margin-left: 196px !important;
  }

  .catalog-categories {
    margin-top: 0 !important;
    top: calc(var(--header-h) + 8px) !important;
  }
}

@media (min-width: 1180px) {
  .catalog-toolbar {
    width: calc(100% - 196px) !important;
    margin-left: 196px !important;
  }
}

/* Catalog filters flush right. */
@media (min-width: 768px) {
  .catalog-toolbar {
    margin-left: auto !important;
    margin-right: 0 !important;
    width: max-content !important;
    max-width: calc(100% - 196px) !important;
  }

  .catalog-toolbar .toolbar-controls {
    flex: 0 0 auto !important;
    width: auto !important;
    justify-content: flex-end !important;
  }
}

/* Final-final mobile header placement: logo | search | notifications | account. */
@media (max-width: 767px) {
  .site-header {
    --header-bar-h: 48px !important;
    display: block !important;
    padding: 8px 10px !important;
  }

  .header-bar {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 40px 40px !important;
    grid-template-rows: 42px !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 42px !important;
    padding: 0 !important;
  }

  .brand,
  .search,
  .header-notify-btn,
  .header-profile-btn {
    grid-row: 1 !important;
    align-self: center !important;
    margin: 0 !important;
  }

  .brand {
    grid-column: 1 !important;
    width: 42px !important;
    height: 42px !important;
  }

  .brand-mark {
    width: 42px !important;
    height: 42px !important;
    border-radius: 13px !important;
  }

  .search {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 9px !important;
  }

  .header-notify-btn {
    grid-column: 3 !important;
  }

  .header-profile-btn {
    grid-column: 4 !important;
  }

  .header-notify-btn,
  .header-profile-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

/* Compact product detail drawer MVP. Rollback: backups/rollback-compact-card-2026-06-30/ */
.product-detail-compact {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.product-detail-compact-media {
  min-width: 0;
}

.product-detail-compact-info {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.product-detail-compact .product-gallery,
.product-detail-compact .product-detail-videos {
  margin-bottom: 0;
}

.product-detail-compact .product-gallery-main {
  min-height: 240px;
  max-height: 320px;
  border-radius: 20px;
}

.product-detail-compact .product-gallery-main img {
  max-height: 320px;
}

.product-detail-compact .product-gallery-zoom {
  font-size: 10px;
  padding: 5px 8px;
}

.product-detail-compact .product-breadcrumbs {
  margin: 0;
  font-size: 11px;
}

.product-detail-code {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-detail-code strong {
  color: var(--ink);
}

.product-detail-price--compact {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #fdba74;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.product-detail-price--compact .price-main {
  display: grid;
  gap: 1px;
}

.product-detail-price--compact strong {
  color: #c2410c;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.product-detail-price--compact span {
  color: #9a3412;
}

.product-detail-price--compact .price-agency {
  max-width: 160px;
  text-align: right;
  font-size: 11px;
  line-height: 1.25;
}

.product-detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-detail-facts span {
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-detail-facts strong {
  color: var(--ink);
}

.product-detail-purchase--compact {
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: var(--primary-soft);
  border-color: #bfdbfe;
}

.product-detail-purchase--compact .purchase-field--qty {
  min-width: 124px;
}

.product-detail-purchase--compact .purchase-field > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-detail-purchase--compact .product-detail-totals {
  padding: 0;
  border: 0;
  background: transparent;
}

.product-detail-purchase--compact .total-row--main {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.product-detail-purchase--compact .total-row--main span {
  font-size: 11px;
}

.product-detail-purchase--compact .total-row--main strong {
  color: #166534;
  font-size: 21px;
  font-weight: 900;
  white-space: nowrap;
}

.product-detail-purchase--compact .submit-order {
  min-height: 44px;
  padding-inline: 18px;
  white-space: nowrap;
}

.product-detail-more {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 10px 12px;
}

.product-detail-more summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
}

.product-detail-more .product-detail-text {
  margin: 10px 0 12px;
}

.product-detail-more .product-specs {
  margin-top: 10px;
}

.product-detail-more--comments .product-comments {
  margin-top: 10px;
}

@media (min-width: 768px) {
  .product-drawer {
    left: 50%;
    right: auto;
    bottom: 24px;
    width: min(920px, calc(100vw - 32px));
    max-height: min(88dvh, 760px);
    border-radius: 28px;
    padding: 10px 18px 18px;
    transform: translate(-50%, calc(100% + 24px));
  }

  .product-panel.open .product-drawer {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 767px) {
  .product-drawer {
    max-height: 92dvh;
    padding: 6px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .product-drawer-head {
    min-height: 38px;
  }

  .product-detail-compact {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px;
  }

  .product-detail-compact .product-gallery-main {
    min-height: 116px;
    max-height: 116px;
    border-radius: 16px;
  }

  .product-detail-compact .product-gallery-main img {
    max-height: 116px;
  }

  .product-detail-compact .product-gallery-zoom {
    display: none;
  }

  .product-detail-compact .product-gallery-thumbs {
    justify-content: center;
    gap: 5px;
    margin-top: 6px;
    padding-bottom: 0;
  }

  .product-detail-compact .product-gallery-thumb {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
  }

  .product-detail-compact .product-gallery-thumb.active {
    width: 22px;
    background: var(--primary);
    box-shadow: none;
  }

  .product-detail-compact .product-gallery-thumb img {
    display: none;
  }

  .product-detail-compact-info {
    gap: 6px;
  }

  .product-detail-compact .product-breadcrumbs {
    font-size: 10px;
    gap: 4px;
  }

  .product-detail-title {
    font-size: 15px;
    line-height: 1.16;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-detail-code {
    font-size: 10px;
  }

  .product-detail-price--compact {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .product-detail-price--compact strong {
    font-size: 18px;
  }

  .product-detail-price--compact .price-agency,
  .product-detail-price--compact .price-main span {
    display: none;
  }

  .product-detail-facts {
    gap: 5px;
  }

  .product-detail-facts span {
    padding: 5px 6px;
    font-size: 10px;
  }

  .product-detail-purchase--compact {
    position: sticky;
    bottom: 0;
    z-index: 3;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    margin-top: 2px;
    padding: 9px;
    border-radius: 18px;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
  }

  .product-detail-purchase--compact .purchase-field--qty {
    min-width: 96px;
  }

  .product-detail-purchase--compact .purchase-field > span {
    display: none;
  }

  .product-detail-purchase--compact .card-qty--large {
    grid-template-columns: 32px 30px 32px;
    max-width: 96px;
  }

  .product-detail-purchase--compact .card-qty--large button {
    min-height: 34px;
  }

  .product-detail-purchase--compact .product-detail-totals {
    justify-self: end;
  }

  .product-detail-purchase--compact .total-row--main strong {
    font-size: 18px;
  }

  .product-detail-purchase--compact .submit-order {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
  }

  .product-detail-more {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .product-detail-more summary {
    font-size: 13px;
  }
}

/* Unified product price color: card and detail use the same orange money style. */
.product-card .product-price-value,
.product-card-total strong,
.product-detail-price--compact strong,
.product-detail-purchase--compact .total-row--main strong {
  color: #c2410c !important;
}

.product-card-total,
.product-detail-price--compact,
.product-detail-purchase--compact .product-detail-totals {
  color: #9a3412;
}

.product-detail-purchase--compact {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
  border-color: #fdba74 !important;
}

.product-detail-purchase--compact .total-row--main span,
.product-card-total span,
.product-detail-price--compact span {
  color: #9a3412 !important;
}

/* Price hierarchy: unit price is black, final total stays red-orange. */
.product-card .product-price-value,
.product-detail-price--compact .price-main strong {
  color: var(--ink) !important;
}

.product-card-total strong,
.product-detail-purchase--compact .total-row--main strong {
  color: #c2410c !important;
}

/* Detail card: show agency fee compactly under purchase total. */
.product-detail-purchase--compact .product-detail-fee-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.product-detail-purchase--compact .product-detail-fee-row span,
.product-detail-purchase--compact .product-detail-fee-row strong {
  color: var(--muted) !important;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .product-detail-purchase--compact .product-detail-fee-row {
    justify-content: flex-end;
  }

  .product-detail-purchase--compact .product-detail-fee-row span,
  .product-detail-purchase--compact .product-detail-fee-row strong {
    font-size: 10px;
  }
}

/* Mobile product detail: larger main photo. */
@media (max-width: 767px) {
  .product-detail-compact {
    grid-template-columns: clamp(138px, 38vw, 156px) minmax(0, 1fr) !important;
  }

  .product-detail-compact .product-gallery-main {
    min-height: clamp(138px, 38vw, 156px) !important;
    max-height: clamp(138px, 38vw, 156px) !important;
  }

  .product-detail-compact .product-gallery-main img {
    max-height: clamp(138px, 38vw, 156px) !important;
  }
}
