:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #e0e0e0;
  --border-strong: #cccccc;
  --accent: #111111;
  --accent-hover: #333333;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --success: #222222;
  --success-soft: rgba(0, 0, 0, 0.06);
  --danger: #111111;
  --danger-soft: rgba(0, 0, 0, 0.06);
  --header-bg: #000000;
  --header-text: #ffffff;
  --header-muted: rgba(255, 255, 255, 0.62);
  --header-border: rgba(255, 255, 255, 0.12);
  --header-surface: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 10px;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--site-header-height, 72px);
  scroll-padding-top: var(--site-header-height, 72px);
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.02em;
}
h1 { font-size: 1.65rem; margin: 0 0 0.35rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }

p { margin: 0.5rem 0 0; color: var(--muted); max-width: 65ch; }
.panel > p:first-of-type { margin-top: 0.35rem; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.container--wide {
  width: min(1440px, calc(100% - 24px));
}

/* ——— Site header ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: none;
  z-index: 100;
  color: var(--header-text);
}
.site-header__row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.site-header__logo {
  display: flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}
.site-header__logo:hover {
  text-decoration: none;
  opacity: 0.92;
}
.site-header__logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(220px, 48vw);
}

.catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: #ffffff;
  color: #111111;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.catalog-btn:hover {
  background: #e8e8e8;
}
.catalog-btn__icon {
  flex-shrink: 0;
}

.site-header__search {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--header-border);
  border-radius: 4px;
  background: var(--header-surface);
  overflow: hidden;
}
.site-header__search-icon {
  display: flex;
  flex-shrink: 0;
  padding: 0 12px;
  color: var(--header-muted);
}
.site-header__search-field {
  position: relative;
  flex: 1;
  min-width: 10rem;
}
.site-header__search-input {
  width: 100%;
  min-width: 0;
  border: none;
  padding: 11px 12px 11px 0;
  font-size: 0.95rem;
  background: transparent;
  color: var(--header-text);
}
.site-header__search-hint {
  position: absolute;
  inset: 0;
  padding: 11px 12px 11px 0;
  color: var(--header-muted);
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.site-header__search-input:focus ~ .site-header__search-hint,
.site-header__search-input:not(:placeholder-shown) ~ .site-header__search-hint {
  opacity: 0;
}
.site-header__search-input::placeholder {
  color: transparent;
}
.site-header__search-input:focus {
  outline: none;
}
.site-header__search-input::-webkit-search-cancel-button {
  position: relative;
  z-index: 1;
}

.site-header__actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--header-muted);
  font-size: 0.72rem;
  text-decoration: none;
}
.header-action:hover {
  color: var(--header-text);
  text-decoration: none;
  background: var(--header-surface);
}
.header-action__icon {
  position: relative;
  display: flex;
  color: var(--header-text);
}
.header-action__label {
  line-height: 1.2;
  text-align: center;
}
.header-action__badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Catalog mega-menu — below header so logo/actions stay clickable */
.catalog-mega {
  position: fixed;
  top: var(--site-header-height, 72px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
}
.catalog-mega__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.catalog-mega__dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 0 16px 24px;
}
.catalog-mega__inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  width: min(1120px, 100%);
  max-width: 1120px;
  min-height: 420px;
  max-height: min(70vh, 640px);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.catalog-mega__sidebar {
  border-right: 1px solid var(--border);
  background: #fafafa;
  overflow-y: auto;
}
.catalog-mega__sidebar-title {
  padding: 14px 16px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.catalog-mega__root {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
}
.catalog-mega__root:hover,
.catalog-mega__root.is-active {
  background: var(--surface);
  border-left-color: var(--accent);
}
.catalog-mega__root.is-active {
  font-weight: 600;
}
.catalog-mega__root-name {
  flex: 1;
  min-width: 0;
}
.catalog-mega__root-count {
  font-size: 0.78rem;
  color: var(--muted);
}
.catalog-mega__chev {
  color: var(--muted);
  font-size: 1.1rem;
}
.catalog-mega__content {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.catalog-mega__back {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.catalog-mega__panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 18px 20px;
}
.catalog-mega__panel.is-active {
  display: block;
}
.catalog-mega__columns {
  columns: 3;
  column-gap: 28px;
}
.catalog-mega__group {
  break-inside: avoid;
  margin-bottom: 18px;
}
.catalog-mega__group-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 8px;
}
.catalog-mega__group-title:hover {
  color: var(--accent);
  text-decoration: none;
}
.catalog-mega__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.catalog-mega__list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
}
.catalog-mega__list a:hover {
  color: var(--accent);
  text-decoration: none;
}
.catalog-mega__count {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.catalog-mega__empty-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

body.catalog-mega-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .site-header__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 6px 0 8px;
  }
  .site-header__logo {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
  }
  .site-header__logo-img {
    height: 24px;
    max-width: min(120px, 36vw);
  }
  .catalog-btn {
    flex: 0 0 auto;
    order: 2;
    padding: 6px;
    gap: 0;
  }
  .catalog-btn > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .catalog-btn__icon {
    width: 18px;
    height: 18px;
  }
  .site-header__actions {
    flex: 0 0 auto;
    order: 3;
    justify-content: flex-end;
    gap: 0;
    margin: 0;
  }
  .header-action {
    min-width: 0;
    padding: 4px 7px;
    gap: 0;
  }
  .header-action__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .header-action__icon svg {
    width: 18px;
    height: 18px;
  }
  .site-header__search {
    flex: 1 1 100%;
    width: 100%;
    order: 4;
  }
  .site-header__search-input,
  .site-header__search-hint {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.88rem;
  }
  .catalog-mega__dialog {
    padding: 0;
    align-items: stretch;
  }
  .catalog-mega__inner {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    width: 100%;
    max-width: none;
    min-height: 0;
    max-height: none;
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .catalog-mega__sidebar {
    max-height: none;
    height: 100%;
    border-right: none;
    border-bottom: none;
    overflow-y: auto;
  }
  .catalog-mega__content {
    display: none;
  }
  .catalog-mega--mobile-panel .catalog-mega__sidebar {
    display: none;
  }
  .catalog-mega--mobile-panel .catalog-mega__content {
    display: flex;
    height: 100%;
  }
  .catalog-mega--mobile-panel .catalog-mega__back {
    display: flex;
    flex-shrink: 0;
  }
  .catalog-mega--mobile-panel .catalog-mega__panel.is-active {
    flex: 1;
    min-height: 0;
  }
  .catalog-mega__columns {
    columns: 1;
  }
}

.categories-bar {
  padding-bottom: 12px;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.categories__group {
  position: relative;
}
.categories__link {
  display: inline-flex;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 500;
}
.categories__link--root {
  font-weight: 600;
  color: var(--text);
}
.categories__link:hover {
  color: var(--text);
  text-decoration: none;
  border-color: var(--border-strong);
  background: var(--bg);
}
.categories__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-width: 320px;
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  z-index: 40;
  flex-direction: column;
  gap: 2px;
}
.categories__group:hover .categories__dropdown,
.categories__group:focus-within .categories__dropdown {
  display: flex;
}
.categories__sublink {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.3;
  text-decoration: none;
}
.categories__sublink:hover {
  background: var(--bg);
  color: var(--accent);
  text-decoration: none;
}
.categories__sublink--level-2 { padding-left: 18px; font-size: 0.84rem; }
.categories__sublink--level-3 { padding-left: 28px; font-size: 0.82rem; }
.categories__sublink--level-4 { padding-left: 38px; }

.category-tree-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.category-tree-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.category-tree-card__head {
  display: block;
  color: inherit;
  text-decoration: none;
}
.category-tree-card__head:hover {
  text-decoration: none;
}
.category-tree-card__subs {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  max-height: 320px;
  overflow: auto;
}
.category-tree-card__head .category-tile__body {
  padding-bottom: 12px;
}
.category-tree__children--top {
  margin: 0;
  padding: 0;
  list-style: none;
}
.category-tree__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: none;
}
.category-tree__link-text {
  min-width: 0;
}
.category-tree__count {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.catalog-page__categories-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
}
.category-tree__branch + .category-tree__branch {
  margin-top: 8px;
}
.category-tree__root {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.category-tree__root:hover {
  color: var(--accent);
}
.category-tree__children {
  margin: 6px 0 0;
  padding-left: 1.1rem;
  list-style: none;
}
.category-tree__children .category-tree__children {
  margin-top: 4px;
  padding-left: 0.9rem;
}
.category-tree__link:hover {
  color: var(--accent);
}
.category-tree__link:hover .category-tree__count {
  color: var(--accent);
}
.category-tree--tiles .category-tree__branch {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.category-tree--tiles .category-tree__branch + .category-tree__branch {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .categories__dropdown {
    display: flex;
    position: static;
    max-width: none;
    max-height: none;
    margin-top: 6px;
    box-shadow: none;
    border: 1px dashed var(--border);
  }
  .categories__group {
    flex: 1 1 100%;
  }
}

.header-search {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex: 1;
  max-width: 440px;
  margin: 0 8px;
}
.header-search__input { min-width: 0; flex: 1; }
.header-search__btn { flex-shrink: 0; }

@media (max-width: 900px) {
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin: 4px 0 0;
  }
}

.main {
  flex: 1 0 auto;
  padding: 24px 0 48px;
}

/* ——— Panels & cards ——— */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.panel + .panel { margin-top: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.card__title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
}
a.card__title:hover { color: var(--accent); }
.card__meta { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }
.card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.data-table__price {
  white-space: nowrap;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.breadcrumbs__link { color: var(--muted); }
.breadcrumbs__link:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs__sep { opacity: 0.45; user-select: none; }
.breadcrumbs__current { color: var(--muted); }

a.card,
a.card:hover,
.site-header a,
.footer a,
.header-action,
.catalog-btn,
.btn,
.breadcrumbs__link,
.card__title,
.categories__link,
.categories__sublink,
.catalog-mega__group-title,
.catalog-mega__list a,
.data-table__name a,
.qty-price-bulk__toggle {
  text-decoration: none;
}

form.inline { display: inline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover {
  background: var(--bg);
  text-decoration: none;
  border-color: #c4c9d4;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn--success {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.btn--success:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn--danger {
  background: #fff;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--danger:hover {
  background: #f0f0f0;
  border-color: #999999;
  color: var(--text);
}
.btn--sm {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.order-shipped-notice {
  margin-top: 8px;
  color: #1b7f3a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.order-shipped-notice__sep {
  font-weight: 400;
  opacity: 0.85;
}

.order-shipped-notice__track {
  color: #1b7f3a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.order-shipped-notice__track:hover {
  color: #145c2a;
}
.badge--ok {
  color: var(--text);
  border-color: var(--border-strong);
  background: #f0f0f0;
}
.badge--bad {
  color: var(--text);
  border-color: #999999;
  background: #eeeeee;
}
.badge--warn {
  color: var(--muted);
  border-color: var(--border-strong);
  background: #f5f5f5;
}

.field { display: grid; gap: 6px; margin: 12px 0; }
.field:first-child { margin-top: 0; }
.field label { color: var(--muted); font-size: 0.86rem; font-weight: 500; }

.input,
select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fafafa;
  color: var(--text);
  font-size: 0.95rem;
}
.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 96px; resize: vertical; }

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

/* Django form.as_p */
.panel form > p {
  margin: 14px 0;
}
.panel form > p label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.filter-group {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.filter-group__summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}
.filter-group__summary::-webkit-details-marker { display: none; }
.filter-group__body {
  padding: 0 14px 14px;
  max-height: 360px;
  overflow: auto;
}

.footer {
  border-top: 1px solid var(--header-border);
  padding: 20px 0;
  color: var(--header-muted);
  background: var(--header-bg);
  font-size: 0.9rem;
}
.footer__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--header-text);
  font-weight: 500;
}
.footer__logo {
  display: block;
  height: 32px;
  width: 32px;
  flex-shrink: 0;
}
.footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__links a {
  color: var(--header-muted);
  text-decoration: none;
}
.footer__links a:hover {
  color: var(--header-text);
  text-decoration: none;
}

.static-page {
  line-height: 1.6;
}
.static-page h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text);
}
.static-page p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  max-width: none;
}
.static-page ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}
.static-page li { margin: 0.35rem 0; }
.static-page a { color: var(--accent); }
.contacts-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.contacts-requisites {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 24px;
  margin: 0.75rem 0 0;
  max-width: none;
}
.contacts-requisites dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.contacts-requisites dd {
  margin: 0;
  color: var(--text);
}
.contacts-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  width: 100%;
}
.contacts-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 172px;
  padding: 20px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.contacts-download:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.contacts-download__icon {
  display: flex;
  flex-shrink: 0;
  width: 56px;
  height: 64px;
}
.contacts-download__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.contacts-download__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 3.2em;
}
.contacts-download__format {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contacts-download__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.contacts-download--pdf {
  color: #c62828;
  border-color: rgba(198, 40, 40, 0.25);
  background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
}
.contacts-download--pdf:hover {
  border-color: #c62828;
}
.contacts-download--pdf .contacts-download__format {
  color: #c62828;
}
.contacts-download--doc {
  color: #1565c0;
  border-color: rgba(21, 101, 192, 0.25);
  background: linear-gradient(180deg, #fff 0%, #f3f8ff 100%);
}
.contacts-download--doc:hover {
  border-color: #1565c0;
}
.contacts-download--doc .contacts-download__format {
  color: #1565c0;
}
@media (max-width: 560px) {
  .contacts-downloads {
    gap: 12px;
  }
  .contacts-download {
    min-height: 156px;
    padding: 16px 10px;
  }
  .contacts-download__icon {
    width: 48px;
    height: 56px;
  }
  .contacts-download__title {
    font-size: 0.82rem;
    max-width: none;
  }
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.panel h2 + .tiles-grid,
.card__row + .tiles-grid {
  margin-top: 12px;
}
@media (max-width: 560px) {
  .tiles-grid {
    grid-template-columns: 1fr;
  }
}

.category-tile {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 3px solid var(--border);
  box-shadow: none;
  transition: border-color 0.15s ease;
}
a.card.category-tile:hover {
  border-color: var(--accent);
  box-shadow: none;
}
.category-tile__img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}
.category-tile__placeholder {
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: linear-gradient(145deg, #e8e8e8 0%, #f3f3f3 100%);
  border-bottom: 1px solid var(--border);
}
.category-tile__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 14px;
}
.category-tile__count {
  margin-top: auto;
  padding-top: 8px;
}
.category-tile--all {
  border-style: dashed;
}
.category-tile__placeholder--all {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.product-bulk-move {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #d7e6ff;
  border-radius: 12px;
  background: #f7fbff;
}
.product-bulk-move__hint {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}
.product-bulk-move__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.product-bulk-move__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}
.product-bulk-move__count {
  font-size: 0.84rem;
  color: var(--muted);
}
.product-bulk-move__count--idle {
  font-weight: 500;
}
.product-bulk-move__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.product-bulk-move__select {
  min-width: min(360px, 100%);
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.86rem;
}
.product-bulk-move__status {
  font-size: 0.82rem;
  color: var(--muted);
}
.product-bulk-move__status--ok {
  color: #1f7a3f;
}
.product-bulk-move__status--error {
  color: #b42318;
}
.product-bulk-specs-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 8px 14px;
  border: 1px dashed rgba(100, 140, 70, 0.45);
  border-radius: 8px;
  background: rgba(220, 240, 210, 0.35);
}
.product-bulk-specs-save__count {
  font-size: 0.86rem;
  font-weight: 600;
}
.product-bulk-specs-save__count--idle {
  font-weight: 500;
  color: var(--muted);
}
.product-bulk-specs-save__status {
  font-size: 0.82rem;
  color: var(--muted);
}
.product-bulk-specs-save__status--ok {
  color: #1f7a3f;
}
.product-bulk-specs-save__status--error {
  color: #b42318;
}
tr.data-table__admin-row.product-filter-specs-edit--dirty {
  box-shadow: inset 0 0 0 1px rgba(180, 120, 0, 0.45);
}
.product-bulk-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.product-bulk-select--compact {
  position: static;
  width: auto;
  height: auto;
  box-shadow: none;
  background: transparent;
  border: 0;
}
.product-bulk-select__input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.data-table__col-select,
.data-table__select {
  width: 34px;
  text-align: center;
  vertical-align: top;
}
.data-table__select .product-bulk-select {
  margin-top: 2px;
}
.product-admin-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 10px;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}
.product-admin-controls--compact {
  margin-top: 8px;
  padding: 4px 6px;
  gap: 4px 8px;
}
.product-admin-controls--detail {
  margin-top: 10px;
  max-width: 520px;
}
.product-admin-controls .product-category-move {
  flex: 1 1 180px;
  min-width: 0;
  margin-top: 0;
}
.product-admin-controls .product-hidden-toggle {
  position: static;
  flex: 0 0 auto;
  box-shadow: none;
  padding: 0 0 6px;
  border: 0;
  background: transparent;
  white-space: nowrap;
}
/* Table: one tight row — label, select, checkbox */
.data-table__part .product-admin-controls--compact .product-category-move {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.data-table__part .product-admin-controls--compact .product-category-move__label {
  margin: 0;
  flex: 0 0 auto;
}
.data-table__part .product-admin-controls--compact .product-category-move__select {
  flex: 1 1 140px;
  min-width: 120px;
  width: auto;
  max-width: none;
}
.data-table__part .product-admin-controls--compact .product-hidden-toggle {
  padding-bottom: 6px;
}
/* Cards: keep controls inside tile; checkbox to the right of the select */
.product-card .product-admin-controls {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.product-card .product-admin-controls .product-category-move {
  flex: 1 1 auto;
  min-width: 0;
}
.product-card .product-admin-controls .product-category-move__select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.product-card .product-admin-controls .product-hidden-toggle {
  padding-bottom: 6px;
}
.product-admin-controls .product-hidden-toggle--compact {
  flex-direction: row;
  gap: 6px;
}
.data-table__col-hidden,
.data-table__hidden {
  width: 72px;
  text-align: center;
  vertical-align: top;
}
.product-hidden-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.product-hidden-toggle--compact {
  flex-direction: column;
  gap: 4px;
}
.product-hidden-toggle__input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.catalog-product--hidden {
  opacity: 0.62;
}
.product-card.catalog-product--hidden {
  border-style: dashed;
}
.data-table__rowlink.catalog-product--hidden td,
.data-table__admin-row.catalog-product--hidden td {
  background: rgba(0, 0, 0, 0.02);
}
.catalog-product--incomplete-specs {
  border-color: rgba(200, 80, 80, 0.45);
}
.product-card.catalog-product--incomplete-specs {
  border-style: dashed;
  box-shadow: inset 0 0 0 1px rgba(220, 80, 80, 0.14);
  background: rgba(255, 100, 100, 0.04);
}
.data-table__rowlink.catalog-product--incomplete-specs td {
  background: rgba(255, 100, 100, 0.06);
}
.data-table__rowlink.catalog-product--incomplete-specs:hover td {
  background: rgba(255, 100, 100, 0.1) !important;
}
.product-incomplete-specs {
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
}
.product-incomplete-specs--compact {
  margin-top: 6px;
  margin-bottom: 0;
}
.product-incomplete-specs__list {
  font-size: 0.78rem;
  line-height: 1.35;
}

.category-filter-attrs {
  border: 1px dashed rgba(180, 120, 0, 0.45);
  background: rgba(255, 193, 7, 0.04);
}
.category-filter-attrs__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.category-filter-attrs__title {
  margin: 0;
  font-size: 1.05rem;
}
.category-filter-attrs__badge {
  font-size: 0.72rem;
}
.category-filter-attrs__intro {
  margin: 0 0 10px;
}
.category-filter-attrs__sidebar {
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.category-filter-attrs__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.82rem;
}
.category-filter-attrs__note {
  margin: 0 0 10px;
  color: #8a5a00;
}
.category-filter-attrs__list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.category-filter-attrs__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.category-filter-attrs__item--local {
  border-color: rgba(180, 120, 0, 0.35);
}
.category-filter-attrs__name {
  font-weight: 600;
}
.category-filter-attrs__order {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 4px;
}
.category-filter-attrs__move,
.category-filter-attrs__rename {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
  font-size: 0.75rem;
}
.category-filter-attrs__move:hover,
.category-filter-attrs__rename:hover {
  background: rgba(0, 0, 0, 0.04);
}
.category-filter-attrs__rename {
  margin-left: 4px;
  font-size: 0.85rem;
}
.category-filter-attrs__meta {
  font-size: 0.78rem;
  color: var(--muted);
}
.category-filter-attrs__remove {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #b42318;
  cursor: pointer;
  line-height: 1;
}
.category-filter-attrs__remove:hover {
  background: rgba(180, 35, 24, 0.08);
}
.category-filter-attrs__add {
  display: grid;
  gap: 6px;
}
.category-filter-attrs__add-label {
  font-size: 0.82rem;
  font-weight: 600;
}
.category-filter-attrs__add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.category-filter-attrs__input {
  flex: 1 1 220px;
  min-width: 0;
}
.category-filter-attrs__status--error {
  color: #b42318;
}
.category-filter-attrs__status--ok {
  color: #1f7a3f;
}

.product-filter-specs-edit {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
  border: 1px dashed rgba(180, 120, 0, 0.35);
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.04);
}
.product-filter-specs-edit--compact {
  margin-top: 8px;
  padding: 8px;
}
.product-filter-specs-edit--detail {
  margin-top: 10px;
}
.product-filter-specs-edit--detail.product-filter-specs-edit--complete {
  background: rgba(120, 190, 130, 0.08);
  border-color: rgba(70, 140, 80, 0.45);
}
.product-filter-specs-edit--detail.product-filter-specs-edit--incomplete {
  background: rgba(255, 100, 100, 0.08);
  border-color: rgba(200, 80, 80, 0.45);
}
/* Catalog table (admin preview): one yellow toolbar row per product */
.data-table__admin-row {
  display: table-row;
}
.data-table__admin-row > td {
  display: table-cell;
}
.data-table__admin-row td {
  padding: 5px 4px 7px;
  vertical-align: middle;
  background-color: rgba(120, 190, 130, 0.08);
  border-top: 1px dashed rgba(70, 140, 80, 0.45);
  border-bottom: 1px dashed rgba(70, 140, 80, 0.45);
  border-left: none;
  border-right: none;
}
.data-table__admin-row td:first-child {
  border-left: 1px dashed rgba(70, 140, 80, 0.45);
  border-bottom-left-radius: 8px;
}
.data-table__admin-row td:last-child {
  border-right: 1px dashed rgba(70, 140, 80, 0.45);
  border-bottom-right-radius: 8px;
}
.data-table__admin-pad {
  padding: 4px 0 6px;
}
.data-table__admin-thumb {
  text-align: center;
  white-space: normal;
  width: 48px;
  padding-left: 2px;
  padding-right: 2px;
}
.data-table__admin-thumb .product-category-move__label {
  margin: 0 auto;
  display: block;
  max-width: 44px;
  font-size: 0.58rem;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.data-table__admin-spec-warn {
  display: inline-block;
  margin-top: 2px;
  padding: 0 4px;
  font-size: 0.62rem;
  line-height: 1.25;
  vertical-align: middle;
}
.data-table__admin-category {
  padding: 4px 6px 6px;
  white-space: normal;
  min-width: 9rem;
}
.data-table__admin-category .product-category-move__select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 3px 6px;
  font-size: 0.78rem;
  line-height: 1.2;
  border-radius: 6px;
}
.data-table__admin-category .product-category-move__status {
  display: block;
  font-size: 0.68rem;
  line-height: 1.2;
  margin-top: 2px;
}
.data-table__admin-attr {
  text-align: center;
  padding: 2px 4px 6px;
  overflow: visible;
  position: relative;
}
.data-table__admin-attr .product-filter-specs-edit__input--cell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 2px 4px;
  font-size: 0.76rem;
  line-height: 1.2;
  text-align: center;
}
.data-table__admin-attr .product-filter-specs-edit__combo {
  width: 100%;
  z-index: 1;
}
.data-table__admin-attr:focus-within {
  z-index: 8;
}
.data-table__admin-attr .product-filter-specs-edit__combo-menu {
  z-index: 40;
}
.product-filter-specs-edit__combo-empty-text {
  display: block;
  padding: 6px 8px;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--muted);
}
.data-table-wrap:has(.data-table--admin) {
  overflow: visible;
}
.data-table__admin-attr .product-filter-specs-edit__combo .product-filter-specs-edit__input--cell {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin: 0;
}
.product-filter-specs-edit__combo {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.product-filter-specs-edit__combo .product-filter-specs-edit__input {
  flex: 1 1 auto;
  min-width: 0;
}
.product-filter-specs-edit__combo-toggle {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: rgba(0, 0, 0, 0.03);
  color: inherit;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
}
.product-filter-specs-edit__combo-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}
.product-filter-specs-edit__combo-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 11rem;
  overflow-y: auto;
  margin: 0;
  padding: 2px 0;
  list-style: none;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.product-filter-specs-edit__combo-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.product-filter-specs-edit__combo-option:hover,
.product-filter-specs-edit__combo-option:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}
.data-table__admin-actions {
  text-align: right;
  padding: 4px 6px 6px;
  white-space: nowrap;
}
.data-table__admin-stock {
  text-align: center;
  white-space: nowrap;
}
.data-table__admin-stock .product-hidden-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  font-size: 0.76rem;
  white-space: nowrap;
}
.data-table__admin-price {
  text-align: center;
  white-space: nowrap;
}
.data-table__admin-price .btn--sm {
  padding: 3px 6px;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}
.data-table__admin-actions .product-filter-specs-edit__actions--cell {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.data-table__admin-actions .product-filter-specs-edit__actions--cell .btn--sm {
  padding: 3px 7px;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}
.data-table__admin-actions .product-filter-specs-edit__status {
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: right;
}
.data-table__rowlink:has(+ .data-table__admin-row) td {
  border-bottom: none;
  padding-bottom: 4px;
}
.data-table--catalog th.data-table__attr-th,
.data-table--catalog td.data-table__attr {
  text-align: center;
  white-space: normal;
}
.data-table--catalog .data-table__pill {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.2;
}
.data-table__admin-row.catalog-product--hidden td {
  background: rgba(120, 190, 130, 0.04);
  opacity: 0.85;
}
.data-table__admin-row.catalog-product--incomplete-specs td {
  background: rgba(255, 100, 100, 0.06);
  border-top-color: rgba(200, 80, 80, 0.45);
  border-bottom-color: rgba(200, 80, 80, 0.45);
}
.data-table__admin-row.catalog-product--incomplete-specs td:first-child {
  border-left-color: rgba(200, 80, 80, 0.45);
}
.data-table__admin-row.catalog-product--incomplete-specs td:last-child {
  border-right-color: rgba(200, 80, 80, 0.45);
}
.product-filter-specs-edit__fields {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.product-filter-specs-edit--compact .product-filter-specs-edit__fields {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}
.product-filter-specs-edit__field {
  display: grid;
  gap: 3px;
}
.product-filter-specs-edit__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.product-filter-specs-edit__input {
  width: 100%;
  min-width: 0;
}
.product-filter-specs-edit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.product-filter-specs-edit__status--error {
  color: #b42318;
}
.product-filter-specs-edit__status--ok {
  color: #1f7a3f;
}

.product-category-move {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}
.product-category-move--compact {
  margin-top: 6px;
}
.product-category-move--detail {
  margin-top: 10px;
}
.product-category-move__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.product-category-move__select {
  width: 100%;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
  line-height: 1.3;
}
.product-category-move__select:disabled {
  opacity: 0.7;
}
.product-category-move__status {
  font-size: 0.75rem;
  color: var(--muted);
}
.product-category-move__status--ok {
  color: #1f7a3f;
}
.product-category-move__status--error {
  color: #b42318;
}
.product-card.product-category-move--moved-out,
.data-table__rowlink.product-category-move--moved-out,
.data-table__admin-row.product-category-move--moved-out {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.data-table__part .product-admin-controls {
  margin-top: 8px;
}
.data-table__part .product-category-move__select {
  max-width: none;
}

.product-card {
  position: relative;
  display: grid;
  gap: 8px;
}
.tiles-grid > .product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}
.tiles-grid .product-card__buy {
  margin-top: auto;
  flex-wrap: wrap;
}
.card.product-card {
  padding: 12px 14px;
}
.product-card .card__title {
  font-size: 0.95rem;
  line-height: 1.3;
}
.product-card .card__meta {
  font-size: 0.84rem;
  margin-top: 0;
}
.product-card .card__row {
  margin-top: 6px;
}
.product-card__stock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.product-card__stock-num {
  font-weight: 600;
  color: var(--text);
}
.product-card__stock-num--empty {
  color: var(--muted);
  font-weight: 500;
}
.product-card__buy {
  align-items: flex-end;
  gap: 10px;
}
.product-card__buy .price {
  margin-right: auto;
  flex-shrink: 0;
}
.product-card__price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
}
.qty-price-bulk {
  position: relative;
}
.qty-price-bulk__toggle {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.qty-price-bulk__toggle:hover {
  color: var(--text);
}
.qty-price-bulk__panel {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 4px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px;
}
.data-table__price .qty-price-bulk__panel {
  right: 0;
  left: auto;
}
.qty-price-bulk__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.qty-price-bulk__table th,
.qty-price-bulk__table td {
  padding: 4px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.qty-price-bulk__table th:first-child,
.qty-price-bulk__table td:first-child {
  text-align: left;
}
.qty-price-bulk__table tr:last-child td,
.qty-price-bulk__table tr:last-child th {
  border-bottom: none;
}
.qty-price-detail-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  width: 40%;
}

.product-add-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.product-add-form__label {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.product-add-form__qty {
  width: 7rem;
  min-width: 7rem;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 0.95rem;
  text-align: center;
}
.product-add-form--compact .product-add-form__qty {
  width: 6.5rem;
  min-width: 6.5rem;
}
.product-add-form-wrap--detail .product-add-form {
  align-items: flex-end;
  flex-wrap: wrap;
}
.product-add-form--compact .product-add-form__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.product-add-form-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}
.product-card__buy .product-add-form-wrap {
  flex: 1 1 100%;
  align-items: stretch;
}
.product-card__buy .product-add-form {
  justify-content: flex-end;
}
.product-add-form-wrap--detail,
.product-add-form-wrap--cart {
  align-items: flex-start;
}
.product-add-form__warning {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: right;
  max-width: 280px;
}
.product-card__buy .product-add-form__warning,
.product-add-form-wrap--detail .product-add-form__warning,
.product-add-form-wrap--cart .product-add-form__warning {
  text-align: left;
  max-width: none;
}
.product-add-form-wrap--table {
  display: grid;
  grid-template-columns: max-content max-content;
  grid-template-rows: auto auto;
  justify-content: end;
  justify-items: stretch;
  column-gap: 8px;
  row-gap: 4px;
  width: 100%;
  max-width: 100%;
}
.product-add-form-wrap--table .product-add-form {
  display: contents;
}
.product-add-form-wrap--table .product-add-form__label {
  display: none;
}
.product-add-form-wrap--table .product-add-form__qty {
  grid-column: 1;
  grid-row: 1;
}
.product-add-form-wrap--table .product-add-form .btn {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.product-add-form-wrap--table .product-add-form__warning {
  grid-column: 1;
  grid-row: 2;
  justify-self: stretch;
  box-sizing: border-box;
  width: auto;
  max-width: none;
  margin: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  font-size: 0.68rem;
  line-height: 1.25;
}
.data-table__action .product-add-form__warning {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  font-size: 0.68rem;
  line-height: 1.25;
}
.input--warning {
  border-color: #888888;
  background: #f5f5f5;
}
.product-card__media {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  max-width: 100%;
}
.product-card__media:hover {
  text-decoration: none;
}
.product-card__img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  display: block;
  transition: border-color 0.15s ease;
}
a.product-card__media:hover .product-card__img {
  border-color: var(--accent);
}
.product-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: linear-gradient(145deg, #eef0f2 0%, #f8f9fa 100%);
  border: 1px dashed var(--border);
  text-align: center;
}
.product-image-placeholder--card {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
}
.product-image-placeholder--gallery {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  gap: 12px;
}
.product-image-placeholder--thumb {
  width: 40px;
  height: 40px;
  gap: 0;
  border-radius: 4px;
  flex-shrink: 0;
}
.product-image-placeholder__icon {
  width: 44px;
  height: 44px;
  opacity: 0.5;
}
.product-image-placeholder--gallery .product-image-placeholder__icon {
  width: 64px;
  height: 64px;
}
.product-image-placeholder--thumb .product-image-placeholder__icon {
  width: 20px;
  height: 20px;
}
.product-image-placeholder__label {
  font-size: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.product-image-placeholder--gallery .product-image-placeholder__label {
  font-size: 0.9rem;
}
a.product-card__media:hover .product-image-placeholder {
  border-color: var(--accent);
  color: var(--text);
}

.product-detail__head {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .product-detail__head {
    grid-template-columns: 1fr;
  }
}
.product-detail__buy {
  margin-top: 14px;
}
.product-detail__description {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-top: 0;
}
.product-description-edit__label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}
.product-description-edit__textarea {
  min-height: 180px;
  line-height: 1.5;
}
.product-description-edit__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.product-description-edit__status {
  margin: 0;
}
.product-description-edit__status--error {
  color: var(--danger, #b42318);
}
.product-gallery__main {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
}
.product-gallery__open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}
.product-gallery__open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.product-gallery__img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
}
.product-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.product-gallery__thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.product-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-gallery__thumb.is-active,
.product-gallery__thumb:hover {
    border-color: var(--accent);
}
.product-gallery--admin-reorder .product-gallery__thumb {
    cursor: grab;
}
.product-gallery--admin-reorder .product-gallery__thumb.is-dragging {
    cursor: grabbing;
    opacity: 0.65;
}
.product-gallery__reorder-hint {
    margin: 8px 0 6px;
    font-size: 13px;
    color: var(--muted);
}
.product-gallery__reorder-status {
    margin: 6px 0 0;
    font-size: 13px;
}
.product-gallery__reorder-status--ok {
    color: #1f7a3f;
}
.product-gallery__reorder-status--error {
    color: #b42318;
}
.product-gallery__lightbox-sources {
  display: none;
}
.spec { color: var(--muted); font-size: 0.82rem; }
.spec__sep { color: var(--border-strong); margin: 0 6px; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
}
.spec-table th,
.spec-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.spec-table th {
  width: 38%;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}
.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}
.layout > * { min-width: 0; }
.layout--table-catalog {
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .layout__filters { order: -1; }
}

/* ——— Catalog listing (DigiKey-style filters on top) ——— */
.catalog-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.catalog-page__head { padding: 16px 18px; }
.catalog-page__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.catalog-page__title-row h1 { margin: 0; }
.catalog-page__count { white-space: nowrap; }
.catalog-page__filters { padding: 0; overflow: hidden; }
.catalog-page__results { padding: 14px 16px 16px; }
.catalog-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
}

.catalog-infinite-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 1px;
}
.catalog-infinite-scroll--loading {
  min-height: 44px;
  padding: 12px 0 4px;
}
.catalog-infinite-scroll__spinner,
.catalog-infinite-scroll__label {
  display: none;
}
.catalog-infinite-scroll--loading .catalog-infinite-scroll__spinner,
.catalog-infinite-scroll--loading .catalog-infinite-scroll__label {
  display: block;
}
.catalog-infinite-scroll--loading .catalog-infinite-scroll__label {
  display: inline;
}
.catalog-infinite-scroll__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d8d8d8;
  border-top-color: var(--accent, #333);
  border-radius: 50%;
  animation: catalog-infinite-spin 0.8s linear infinite;
}
.catalog-infinite-scroll--error .catalog-infinite-scroll__label {
  display: inline;
}
.catalog-infinite-scroll--error {
  color: #b45309;
}
@keyframes catalog-infinite-spin {
  to { transform: rotate(360deg); }
}

.catalog-filters { display: flex; flex-direction: column; }
.catalog-filters--hub .catalog-filters__toolbar {
  border-top: 1px solid var(--border);
}
.catalog-filters--hub .catalog-filters__columns-wrap--hub {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}
.catalog-filters__columns-scroll {
  flex: 1 1 auto;
  min-width: 0;
}
.catalog-filters__columns-scroll:not(.is-columns-ready) {
  visibility: hidden;
}
.catalog-filters--hub .catalog-filters__columns--hub {
  min-height: 220px;
}
@media (max-width: 899px) {
  .catalog-filters__columns-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (min-width: 900px) {
  .catalog-filters__columns-scroll {
    overflow: visible;
  }
  .catalog-filters__columns-wrap,
  .catalog-filters__columns-wrap--hub {
    overflow: visible;
  }
  .catalog-filters--hub .catalog-filters__columns--hub,
  .catalog-filters__columns {
    display: flex;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }
  .filter-column {
    flex: 0 0 var(--filter-column-width, 132px);
    width: var(--filter-column-width, auto);
    max-width: var(--filter-column-width, none);
    min-width: 0;
  }
  .filter-column[data-filter-wrap="1"] {
    flex: 1 1 var(--filter-column-width, 132px);
    width: auto;
    min-width: min(var(--filter-column-width, 108px), 108px);
  }
  .catalog-filters--hub .filter-column__option {
    align-items: flex-start;
  }
}
.catalog-filters__apply {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-left: 1px solid var(--border);
  background: var(--surface);
  min-width: 148px;
}
.catalog-filters--hub .catalog-filters__apply {
  flex: 0 0 156px;
  flex-shrink: 0;
  width: 156px;
  min-width: 156px;
  max-width: 156px;
}
.catalog-filters__hint {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  max-width: 140px;
}
.catalog-filters--hub .catalog-filters__hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  max-width: none;
  min-height: 3.25rem;
  margin: 0;
  line-height: 1.25;
}
.catalog-filters--hub .catalog-filters__hint-count {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.catalog-filters--hub .catalog-filters__hint-detail {
  display: block;
  min-height: 2.6em;
  max-width: 136px;
  font-size: 0.72rem;
  line-height: 1.3;
  text-wrap: balance;
}
.btn--apply-lg {
  min-width: 132px;
  padding: 10px 18px;
}
.catalog-filters__apply .catalog-filters__reset {
  min-width: 132px;
  text-align: center;
}
.catalog-filters__columns-wrap {
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  overflow: hidden;
}
.catalog-filters__columns {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 200px;
  padding: 10px 8px;
  gap: 8px;
  width: auto;
}
.filter-column {
  flex: 0 0 var(--filter-column-width, auto);
  width: var(--filter-column-width, auto);
  max-width: var(--filter-column-width, none);
  min-width: 120px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.filter-column__head {
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  background: #eeeeee;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.35;
}
.filter-column:not(.filter-column--subgroup) .filter-column__head {
  text-transform: none;
  letter-spacing: normal;
}
.filter-column__search {
  margin: 6px 8px 4px;
  width: calc(100% - 16px);
}
.filter-column__list {
  flex: 1;
  overflow-y: auto;
  padding: 2px 0 6px;
  max-height: 160px;
}
.filter-column__option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  column-gap: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  line-height: 1.3;
  cursor: pointer;
}
.filter-column__option:hover { background: var(--accent-soft); }
.filter-column__option input { margin-top: 2px; }
.filter-column__label {
  min-width: 0;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.filter-column[data-filter-wrap="1"] .filter-column__head,
.filter-column[data-filter-wrap="1"] .filter-column__label {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: min(35ch, 100%);
}
.filter-column__count {
  justify-self: end;
  align-self: start;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  padding-top: 1px;
  padding-left: 4px;
}
.filter-column__option[hidden] { display: none; }
.filter-column__empty {
  display: block;
  padding: 8px 10px;
  font-size: 0.8rem;
}

.catalog-filters__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  padding: 12px 14px;
  background: var(--surface);
}
.catalog-filters__toolbar-head {
  display: contents;
}
.catalog-filters__toolbar-more {
  display: contents;
}
.catalog-filters__toggle {
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.84rem;
}
.catalog-filters__toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.catalog-filters__toggle-badge[hidden] {
  display: none;
}
@media (max-width: 899px) {
  .catalog-filters__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .catalog-filters__toolbar-head {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
  }
  .catalog-filters__toolbar-more {
    display: none;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    width: 100%;
    padding-top: 10px;
  }
  .catalog-filters__toolbar-more.is-open {
    display: flex;
  }
  .catalog-filters__field--search {
    flex: 1 1 auto;
    min-width: 0;
  }
  .catalog-filters__toolbar-head .catalog-filters__field--search > label {
    display: none;
  }
  .catalog-filters__toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }
  .catalog-filters__toolbar-more .catalog-filters__actions {
    margin-left: 0;
    width: 100%;
  }
}
@media (min-width: 900px) {
  .catalog-filters__toolbar-head,
  .catalog-filters__toolbar-more {
    display: contents;
  }
}
.catalog-filters__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.catalog-filters__field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.catalog-filters__field--check { justify-content: flex-end; }
.catalog-filters__check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}
.catalog-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.input--sm {
  padding: 7px 10px;
  font-size: 0.88rem;
}
.btn--apply {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 650;
}
.btn--apply:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.filters-panel {
  position: sticky;
  top: 72px;
}
@media (max-width: 980px) {
  .filters-panel { position: static; }
}

.data-table-wrap {
  max-width: 100%;
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table-hint {
  margin: 0 0 8px;
  font-size: 0.8rem;
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.35;
  table-layout: auto;
}
.data-table--catalog {
  min-width: 1024px;
  table-layout: fixed;
  font-size: 0.82rem;
  line-height: 1.3;
}
.data-table--catalog col.data-table__col-thumb { width: 52px; }
.data-table--catalog col.data-table__col-select { width: 34px; }
.data-table--catalog col.data-table__col-part { width: 260px; }
.data-table--catalog col.data-table__col-attr { width: 118px; }
.data-table--catalog col.data-table__col-stock { width: 84px; }
.data-table--catalog col.data-table__col-price { width: 92px; }
.data-table--catalog col.data-table__col-action { width: 88px; }

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.data-table--catalog th,
.data-table--catalog td {
  padding: 5px 8px;
  vertical-align: top;
}
.data-table th { white-space: nowrap; }
.data-table__sortable a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.data-table__sortable a:hover { color: var(--accent); }
.data-table__sort-indicator {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.25;
  vertical-align: middle;
}
.data-table__sortable.is-sorted-asc .data-table__sort-indicator,
.data-table__sortable.is-sorted-desc .data-table__sort-indicator {
  opacity: 1;
  border-top-color: currentColor;
  border-bottom-color: transparent;
  border-top-width: 5px;
  border-bottom-width: 0;
}
.data-table__sortable.is-sorted-desc .data-table__sort-indicator {
  border-top-color: transparent;
  border-bottom-color: currentColor;
  border-top-width: 0;
  border-bottom-width: 5px;
}
.data-table td {
  white-space: nowrap;
  color: var(--text);
}
.data-table__name {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.data-table__thumb {
  text-align: center;
  padding-left: 6px !important;
  padding-right: 6px !important;
}
.data-table__thumb-zoom {
  display: inline-block;
  width: 40px;
  height: 40px;
  vertical-align: middle;
}
.data-table__thumb img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  display: block;
}
@media (hover: hover) and (pointer: fine) {
  .data-table__thumb-zoom {
    position: relative;
    z-index: 1;
  }
  .data-table__thumb-zoom:hover {
    z-index: 40;
  }
  .data-table__thumb-zoom img {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    transform-origin: top left;
  }
  .data-table__thumb-zoom:hover img {
    position: relative;
    transform: scale(5);
    z-index: 40;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    border-color: #d0d0d0;
  }
  .data-table--catalog .data-table__rowlink:has(.data-table__thumb-zoom:hover) {
    position: relative;
    z-index: 30;
  }
  .data-table-wrap:has(.data-table__thumb-zoom:hover) {
    overflow: visible;
  }
}
.data-table--catalog td.data-table__part,
.data-table--catalog th.data-table__part {
  overflow: hidden;
  max-width: 280px;
}
.data-table__part {
  line-height: 1.35;
  min-width: 0;
}
.data-table__thumb-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.data-table__thumb-link:hover { text-decoration: none; }
.data-table__part-sku-line {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.data-table__part-sivuch,
.product-display-sku__sivuch {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}
.data-table__part-sku {
  display: inline;
  flex-shrink: 0;
  font-weight: 650;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.data-table__part-sku:hover { text-decoration: underline; }
.data-table__part-name {
  display: block;
  font-size: 0.78rem;
  color: var(--text);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
}
.data-table__part-name:hover {
  color: var(--accent);
  text-decoration: underline;
}
.data-table__part-brand {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table tbody tr:nth-child(even) td { background: #fafbfc; }
.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.data-table th.data-table__attr-th {
  text-transform: none;
  letter-spacing: normal;
}
.data-table--catalog td.data-table__attr,
.data-table--catalog td.data-table__num,
.data-table--catalog td.data-table__action {
  padding-top: 5px;
}
.data-table--catalog td.data-table__attr .data-table__pill,
.data-table--catalog td.data-table__attr .data-table__empty {
  display: inline-block;
  margin-top: 0;
  vertical-align: top;
}
.data-table tr:hover td { background: #f0f0f0; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.86em;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: #f4f4f4;
  z-index: 2;
  border-bottom: 1px solid var(--border-strong);
}
.data-table td { font-size: 0.9rem; }
.data-table__col-name { min-width: 220px; }
.data-table__col-sku { min-width: 100px; }
.data-table__col-attr { min-width: 72px; }
.data-table__col-num { min-width: 64px; text-align: right; }
.data-table--catalog th.data-table__col-num,
.data-table--catalog td.data-table__num {
  min-width: 72px;
  overflow: visible;
  text-overflow: clip;
}
.data-table--catalog td.data-table__price {
  overflow: hidden;
  min-width: 0;
}
.data-table--catalog .data-table__price .qty-price-bulk {
  max-width: 100%;
}
.data-table--catalog .data-table__price .qty-price-bulk__toggle {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table__col-action { width: 128px; }

.data-table__sku {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table__pill {
  display: inline-block;
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 4px;
  background: #eeeeee;
  font-size: 0.76rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.data-table__empty { color: var(--border-strong); }
.data-table__out { color: var(--muted); }
.data-table--catalog .data-table__price { font-weight: 600; }

.data-table__num { text-align: right; }

.data-table__name a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.data-table__name a:hover { color: var(--accent); text-decoration: underline; }

.data-table__action .product-add-form {
  justify-content: flex-end;
}
.data-table--catalog .data-table__action .product-add-form {
  justify-content: flex-start;
  gap: 4px;
}
.data-table__action .product-add-form__qty {
  width: 5.5rem;
  min-width: 5.5rem;
  padding: 6px 8px;
  font-size: 0.88rem;
}
.data-table--catalog .data-table__action .product-add-form__qty {
  width: 3.25rem;
  min-width: 3.25rem;
  padding: 4px 5px;
  font-size: 0.82rem;
}
.data-table--catalog td.data-table__action {
  white-space: normal;
  vertical-align: top;
  overflow: hidden;
}
.data-table__action {
  text-align: right;
  white-space: nowrap;
}
.data-table--catalog .data-table__action {
  white-space: normal;
}
.data-table__action .product-add-form-wrap {
  min-width: 0;
  max-width: 100%;
  align-items: flex-end;
}
.data-table__action .btn {
  width: 100%;
  min-width: 56px;
  justify-content: center;
}
.data-table--catalog .data-table__action .btn {
  width: auto;
  min-width: 0;
  padding: 4px 10px;
}
.btn--icon {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  padding: 4px 9px !important;
}

.data-table__rowlink:hover td { background: rgba(0, 0, 0, 0.02) !important; }
.data-table--admin .data-table__admin-row > td {
  background-color: rgba(120, 190, 130, 0.08) !important;
  border-top: 1px dashed rgba(70, 140, 80, 0.45) !important;
  border-bottom: 1px dashed rgba(70, 140, 80, 0.45) !important;
  border-left: none !important;
  border-right: none !important;
}
.data-table--admin .data-table__admin-row > td:first-child {
  border-left: 1px dashed rgba(70, 140, 80, 0.45) !important;
  border-bottom-left-radius: 8px;
}
.data-table--admin .data-table__admin-row > td:last-child {
  border-right: 1px dashed rgba(70, 140, 80, 0.45) !important;
  border-bottom-right-radius: 8px;
}
.data-table--admin .data-table__admin-row.catalog-product--incomplete-specs > td {
  background-color: rgba(255, 100, 100, 0.08) !important;
  border-top: 1px dashed rgba(200, 80, 80, 0.45) !important;
  border-bottom: 1px dashed rgba(200, 80, 80, 0.45) !important;
}
.data-table--admin .data-table__admin-row.catalog-product--incomplete-specs > td:first-child {
  border-left: 1px dashed rgba(200, 80, 80, 0.45) !important;
}
.data-table--admin .data-table__admin-row.catalog-product--incomplete-specs > td:last-child {
  border-right: 1px dashed rgba(200, 80, 80, 0.45) !important;
}
.data-table--admin .data-table__admin-row.catalog-product--hidden > td {
  background-color: rgba(120, 190, 130, 0.04) !important;
  opacity: 0.88;
}

@media (max-width: 900px) {
  .data-table:not(.data-table--catalog) .data-table__col-attr,
  .data-table:not(.data-table--catalog) .data-table__attr { display: none; }
}

@media (max-width: 560px) {
  .data-table:not(.data-table--catalog) .data-table__col-sku,
  .data-table:not(.data-table--catalog) .data-table__sku { display: none; }
}

.checkout-form h3 {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 1.35rem 0 0.35rem;
  color: var(--text);
}
.checkout-form h3:first-of-type {
  margin-top: 0.25rem;
}

.helptext {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

ul.errorlist {
  margin: 0 0 12px;
  padding: 10px 12px 10px 28px;
  list-style: disc;
  background: #f0f0f0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.86rem;
}

.field ul.errorlist {
  margin-top: 6px;
  margin-bottom: 0;
}

.panel--alert {
  border-color: var(--border-strong);
  background: #f5f5f5;
}
.checkout-form-errors,
.checkout-submit-errors {
  border-color: #c62828;
  background: #ffebee;
  color: #b71c1c;
}
.checkout-submit-errors {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #c62828;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.4;
}
.checkout-privacy-consent {
  margin: 16px 0 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}
.checkout-privacy-consent a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.privacy-policy-doc {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.privacy-policy-doc__frame {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: 0;
}
.field--invalid .input {
  border-color: #c62828;
}
.panel--notice {
  border-color: var(--border-strong);
  background: #fafafa;
}

.checkout-block-list {
  margin: 10px 0 0;
  padding-left: 1.25rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}
.checkout-block-list li + li {
  margin-top: 6px;
}

.flash-messages {
  margin-bottom: 12px;
}
.flash {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.4;
}
.flash + .flash {
  margin-top: 8px;
}
.flash--error {
  background: #eeeeee;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.flash--success {
  background: #f0f0f0;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.flash--info,
.flash--debug {
  background: #fafafa;
  border: 1px solid var(--border);
  color: var(--muted);
}

.checkout-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}

.checkout-delivery-section {
  margin-top: 1.35rem;
}

.checkout-section-title--delivery {
  margin-top: 0;
  color: var(--text);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.88rem;
}

.checkout-delivery-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
}

.checkout-delivery-stack .field + .field {
  margin-top: 12px;
}

.checkout-delivery-options-field {
  margin-top: 12px;
  margin-bottom: 0;
}

.checkout-delivery-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-delivery-option {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

.checkout-delivery-option:has(input[type="radio"]:checked) {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--text);
}

.checkout-delivery-option__label input[type="radio"] {
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--text);
}

.checkout-delivery-option__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkout-delivery-option__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.checkout-delivery-option__title {
  font-weight: 600;
  line-height: 1.35;
}

.checkout-delivery-option__price {
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}

.checkout-delivery-option__price:empty {
  display: none;
}

.checkout-delivery-option__desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.checkout-delivery-option__label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  margin: 0;
}

.checkout-delivery-option__actions {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 16px 14px 42px;
}

.checkout-delivery-option--pvz:has(input[type="radio"]:checked) .checkout-delivery-option__actions {
  display: flex;
}

.checkout-delivery-option__extra {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.checkout-delivery-option__extra[hidden] {
  display: none !important;
}

.checkout-delivery-pvz-selected {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
}

.checkout-delivery-pvz-selected--ok {
  color: var(--text);
}

.checkout-delivery-map-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  text-underline-offset: 2px;
}

.checkout-delivery-map-link:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

.checkout-delivery-map-link.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: none;
}

.cdek-block {
  margin: 12px 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  overflow: visible;
}

.cdek-city-field {
  position: relative;
  overflow: visible;
  z-index: 1;
}

.cdek-city-field--open {
  z-index: 5;
}

.cdek-city-field--open + .field,
.cdek-city-field--open + .checkout-delivery-options-field {
  margin-top: 0;
}

.cdek-city-search {
  margin-top: 10px;
  position: relative;
  overflow: visible;
}

.cdek-city-search__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.cdek-suggestions {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  max-height: 200px;
  overflow: auto;
  position: relative;
  box-shadow: var(--shadow-md);
}

.cdek-suggestions li {
  margin: 0;
}

.cdek-suggest-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.cdek-suggest-btn:hover {
  background: #f3f3f3;
}

.cdek-suggest-empty {
  padding: 8px 10px;
  color: var(--muted);
}

.cdek-quote {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.cdek-quote--ok {
  color: var(--text);
  font-weight: 500;
}

.cdek-quote--error {
  color: #b00020;
}

.cdek-location-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px 16px;
}

.cdek-pvz-fields {
  margin-top: 12px;
}

.cdek-pvz-selected {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.cdek-pvz-selected--ok {
  border-color: var(--border-strong);
  background: #fafafa;
}

.cdek-map-open-btn {
  width: 100%;
}

.cdek-map-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cdek-map-modal[hidden] {
  display: none !important;
}

body.cdek-map-modal-open {
  overflow: hidden;
}

.cdek-map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.cdek-map-modal__dialog {
  position: relative;
  width: min(960px, 100%);
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cdek-map-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.cdek-map-modal__header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.cdek-map-modal__close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.cdek-map-modal__tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.cdek-map-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font: inherit;
}

.cdek-map-tab.is-active {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.cdek-map-container {
  min-height: 420px;
  height: 60vh;
}

.cdek-map-list {
  overflow: auto;
  max-height: 60vh;
  padding: 8px;
}

.cdek-map-list__item {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.cdek-map-list__item:hover {
  border-color: var(--border-strong);
  background: #fafafa;
}

.cdek-map-list__empty {
  margin: 16px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .cdek-location-grid {
    grid-template-columns: 1fr;
  }

  .cdek-map-container {
    min-height: 320px;
    height: 50vh;
  }
}

.price--accent {
  font-size: 1.25rem;
  font-weight: 700;
}
