.pm-search-picker {display:grid;gap:.25rem;min-width:0;font-size:.875rem;font-weight:650}
.pm-combobox-group {
  display:flex;align-items:center;min-height:39px;min-width:0;border:1px solid var(--pm-control);
  border-radius:.4rem;background:var(--pm-input);
}
.pm-combobox-group:focus-within {outline:2px solid var(--pm-focus);outline-offset:1px}
.shop-workspace .pm-combobox-group input {
  flex:1;min-width:0;width:100%;border:0;outline:none;background:transparent;padding:.45rem .6rem;
}
.shop-workspace .pm-search-picker .pm-combobox-group button {
  flex:none;min-width:1.9rem;min-height:2.2rem;padding:0 .3rem;border:0;
  background:transparent;color:var(--pm-muted);font-size:1rem;
}
.shop-workspace .pm-search-picker .pm-combobox-group button:hover {background:var(--pm-raised);color:var(--pm-ink)}
.pm-combobox-positioner {z-index:20;max-width:calc(100vw - 1rem);width:var(--anchor-width)}
.pm-combobox-popup {
  max-height:min(18rem,var(--available-height));overflow:auto;overscroll-behavior:contain;
  background:var(--pm-surface);color:var(--pm-ink);border:1px solid var(--pm-control);border-radius:.5rem;
  font-size:.875rem;padding:.25rem;
}
.pm-combobox-popup [role="option"] {
  display:flex;justify-content:space-between;gap:.5rem;padding:.45rem;color:var(--pm-ink);
  border-radius:.25rem;cursor:pointer;overflow-wrap:anywhere;
}
.pm-combobox-popup [role="option"][data-highlighted] {background:var(--pm-raised)}
.pm-combobox-popup [role="option"][data-selected] {font-weight:700}
.pm-combobox-popup [role="status"]:not(:empty) {color:var(--pm-muted);padding:.45rem}
.pm-editor-backdrop {
  position:fixed;inset:0;z-index:60;background:#0b0a13;opacity:.35;transition:opacity 160ms ease;
}
.pm-editor-backdrop[data-starting-style],.pm-editor-backdrop[data-ending-style] {opacity:0}
.pm-editor-viewport {
  position:fixed;inset:0;z-index:61;display:flex;justify-content:flex-end;pointer-events:none;
}
.pm-editor {
  width:min(40rem,100%);height:100%;background:var(--pm-surface);color:var(--pm-ink);
  border-inline-start:1px solid var(--pm-rule);
  pointer-events:auto;overflow:hidden;
  transform:translateX(var(--drawer-swipe-movement-x,0px));transition:transform 220ms cubic-bezier(.2,.75,.25,1);
}
.pm-editor[data-starting-style],.pm-editor[data-ending-style] {transform:translateX(100%)}
.pm-editor[data-swiping] {transition:none}
.pm-editor-content {display:flex;flex-direction:column;height:100%;min-height:0}
.pm-editor-heading {
  display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;
  margin:0;padding:1rem 1.2rem;border-bottom:1px solid var(--pm-rule);
}
.pm-editor-heading h2 {margin:0;font-size:1.15rem}
.pm-editor-heading p {margin:.3rem 0 0;color:var(--pm-muted)}
.pm-editor .pm-editor-close {flex:none;min-width:44px;min-height:44px;padding:.35rem;font-size:1.35rem}
.pm-editor .pm-editor-form {
  flex:1;display:flex;flex-direction:column;min-height:0;gap:0;
  background:transparent;border:0;border-radius:0;padding:0;margin:0;
}
.pm-editor-fields {
  flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:1rem 1.2rem;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:.85rem;
}
.pm-editor-fields > :is(p,small) {grid-column:1/-1;color:var(--pm-muted);margin:0}
.pm-editor-fields > label:not(.warranty-check,.pm-bulk-check) {display:grid;gap:.25rem;align-content:start}
.pm-editor-fields input:not([type=checkbox]),.pm-editor-fields select {width:100%}
.pm-editor-actions {
  flex:none;display:flex;gap:.5rem;align-items:center;justify-content:flex-end;border-top:1px solid var(--pm-rule);
  padding:.7rem 1.2rem max(.7rem,env(safe-area-inset-bottom));background:var(--pm-surface);
}
.pm-editor .pm-editor-actions {margin-top:0}
.pm-editor-error {margin:.7rem 1.2rem 0}
@media (max-width:44rem) {
  .pm-combobox-group {min-height:44px}
  .pm-editor {width:100%;border:0}
  .pm-editor-fields {grid-template-columns:1fr}
  .pm-editor-heading,.pm-editor-fields,.pm-editor-actions {padding-inline:1rem}
  .pm-editor-actions button {min-height:44px}
}

.pm-editor-scroll {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:1rem 1.2rem}
.pm-editor .pm-editor-scroll {margin:0;border:0;border-radius:0}
.pm-editor .mapping-compare-grid {grid-template-columns:1fr}
.pm-editor .pm-source-fields {grid-template-columns:1fr}
.pm-editor .pm-bulk-check {display:flex;align-items:center;gap:.5rem}
.pm-editor .pm-bulk-options {min-width:0;margin:0;max-height:14rem;overflow:auto}
.pm-editor .pm-bulk-options label {display:flex;align-items:center;gap:.5rem}
.shop-workspace :is(.directory-search,.prices-filters,.price-upload,.mapping-run-select) .pm-search-picker {flex:1 1 13rem;min-width:0}
.pm-combobox-group input {text-overflow:ellipsis}
.portal-public main :is(h1,h2),.portal-private main :is(h1,h2),.shop-workspace main :is(h1,h2) {
  text-wrap:balance;
}
.portal-public main :is(p,li),.portal-private main :is(p,li) {text-wrap:pretty}
.portal-public main .hero {padding-block:clamp(2rem,6vw,5.5rem)}
.portal-private main .narrow-form {
  gap:.75rem;max-width:min(100%,46rem);
}
.portal-private main .narrow-form :is(input:not([type=checkbox],[type=radio]),select,textarea) {min-height:2.5rem}
.portal-private main :is(button,a,input,select,textarea,summary):focus-visible,
.portal-public :is(button,a,input,summary):focus-visible {outline:2px solid var(--pm-focus);outline-offset:3px}
/* Align the workspace navigation and full-width product card with the same page gutters. */
.shop-workspace {
  --pm-workspace-gutter:clamp(12px,2vw,24px);
  --pm-workspace-nav-inset:.625rem;
}
.shop-workspace .shop-header > .shop-header-inner,
.shop-workspace .shop-price-subnav {
  padding-inline:var(--pm-workspace-gutter);
}
.shop-workspace .shop-header-inner > nav > .shop-section-link,
.shop-workspace .shop-price-subnav > a {
  padding-inline:var(--pm-workspace-nav-inset);
}
.shop-workspace .shop-price-subnav {column-gap:.25rem}
.shop-workspace .shop-header-inner nav {scrollbar-width:thin}
.catalog-page.shop-workspace main > :is(.product-detail,.product-page-skeleton,.product-page-error).wrap {
  width:calc(100% - 2 * var(--pm-workspace-gutter));
}
.shop-workspace .overview-metric strong,.shop-workspace [data-column="warranty_months"],
.shop-workspace [data-column="lifetime_months"] {font-variant-numeric:tabular-nums}
@media (max-width:44rem) {
  .pm-editor-scroll {padding:1rem}
  .pm-editor .pm-editor-actions {flex-wrap:wrap}
  .portal-private main .narrow-form :is(input:not([type=checkbox],[type=radio]),select,textarea) {min-height:44px}
}
label[hidden] {display:none!important}
.pm-native-search {min-width:0}
.pm-native-error {margin:.25rem 0 0;color:var(--pm-error);font-size:.875rem}
.portal-private .pm-combobox-group input,.shop-pricing .pm-combobox-group input {margin:0;width:100%;min-width:0;border:0;background:transparent}
.portal-private .pm-combobox-group button,.shop-pricing .pm-combobox-group button {
  flex:none;min-width:2rem;padding:.35rem;border:0;background:transparent;color:var(--pm-muted);
}
.portal-private .pm-combobox-group button:hover,.shop-pricing .pm-combobox-group button:hover {background:var(--pm-raised)}
.portal-private .product-sections {gap:.35rem}
.portal-private .product-sections a {text-underline-offset:.24em}
.portal-private .product-detail :is(.product-panel,.product-sticky) {border-color:var(--pm-rule)}
.shop-pricing .pm-native-search {flex:1 1 12rem}
select:not([multiple],[size]) {
  --pm-select-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2353535c' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  appearance:none;background-image:var(--pm-select-icon);background-repeat:no-repeat;
  background-position:right .5rem center;background-size:1rem;padding-inline-end:1.75rem;
}
[data-pm-theme="dark"] select:not([multiple],[size]) {
  --pm-select-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23b9b9c1' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.pm-column-settings label {display:inline-flex;align-items:center;gap:.45rem;font-weight:500}
.pm-column-settings li label {flex:1}
.pm-column-settings label input[type="checkbox"] {width:auto;min-height:0;margin:0}
.pm-table-visibility {width:fit-content;margin:0 0 .35rem;color:var(--pm-muted);font-size:.875rem}
.pm-table-visibility[open] > div {
  display:flex;flex-wrap:wrap;gap:.6rem 1rem;padding:.5rem 0;
}
table [data-pm-column-hidden] {display:none!important}
.catalog-quality {display:flex;gap:.5rem;align-items:center;white-space:nowrap}
.catalog-quality-missing {color:var(--pm-muted)}
.catalog-quality strong {min-width:3ch;text-align:end;font-variant-numeric:tabular-nums}
.catalog-quality progress,.product-quality progress {accent-color:var(--pm-accent);height:.45rem}
.catalog-quality progress {width:clamp(2rem,5vw,4rem)}
.product-quality {
  width:min(100%,13.5rem);padding:.45rem .6rem;background:var(--pm-surface);border:1px solid var(--pm-rule);
  border-radius:.55rem;font-size:.83rem;color:var(--pm-ink);
}
.product-quality-heading {display:flex;align-items:center;justify-content:space-between;gap:.4rem}
.product-quality-heading strong {color:var(--pm-active-ink);font-variant-numeric:tabular-nums}
.product-quality progress {display:block;width:100%;margin:.25rem 0}
.product-quality small {color:var(--pm-muted)}
.product-detail > .product-quality {margin-block:.35rem}
@media(max-width:660px) {
  .product-sticky .product-quality {width:100%;padding:.3rem .55rem}
  .product-detail .product-panel {scroll-margin-top:215px}
}

.pm-navigation-skeleton {
  position:fixed;inset:var(--pm-navigation-top,0) 0 0;z-index:50;
  background:var(--pm-base,#fff);color:var(--pm-muted,#53535c);
  padding:clamp(1rem,4vw,2.5rem);box-sizing:border-box;
}
.pm-navigation-skeleton > p,.pm-navigation-rows {max-width:82rem;margin:.65rem auto}
.pm-navigation-skeleton > p {font-size:.875rem}
.pm-navigation-rows {display:grid;gap:.75rem}
.pm-navigation-rows span {
  display:block;height:2.25rem;border-radius:.45rem;background:var(--pm-raised,#f1f1f3);
  animation:pm-navigation-pulse 1.3s ease-in-out infinite alternate;
}
.pm-navigation-rows span:first-child {width:min(42%,16rem);height:1.35rem;margin-bottom:.5rem}
@keyframes pm-navigation-pulse {from {opacity:.55} to {opacity:1}}
@media (prefers-reduced-motion:reduce) {.pm-navigation-rows span {animation:none}}

.pm-loading-label::after {
  content:"";
  display:inline-block;
  width:1.2em;
  height:.45em;
  margin-inline-start:.25em;
  background-image:radial-gradient(circle, currentColor 55%, transparent 65%),
    radial-gradient(circle, currentColor 55%, transparent 65%),
    radial-gradient(circle, currentColor 55%, transparent 65%);
  background-position:left center, center, right center;
  background-repeat:no-repeat;
  background-size:.22em .22em;
  animation:pm-loading-dots 1.35s ease-in-out infinite;
}
@keyframes pm-loading-dots {
  0%, 100% {background-size:.32em .32em, .22em .22em, .22em .22em}
  33% {background-size:.22em .22em, .32em .32em, .22em .22em}
  66% {background-size:.22em .22em, .22em .22em, .32em .32em}
}
@media (prefers-reduced-motion:reduce) {.pm-loading-label::after {animation:none}}

/* Reuse the interface font, with aligned monetary values in both table layouts. */
table :is(th, td).pm-money-cell {
  text-align:end;
  font-variant-numeric:tabular-nums lining-nums;
}
table td.pm-money-cell {font-weight:650}
.pm-money {white-space:nowrap}
.pm-money-currency {
  display:inline-block;
  min-width:3.4ch;
  color:var(--pm-muted);
  font-size:.85em;
  font-weight:500;
  text-align:start;
}
.pm-money-cell small {font-weight:400}
.pm-money-comparison {
  display:grid;
  grid-template-columns:minmax(max-content,1fr) auto minmax(max-content,1fr);
  align-items:baseline;
  gap:.4em;
}
@media(max-width:700px) {
  .shop-workspace :is(.prices-archive-table,.mapping-table) td.pm-money-cell {
    text-align:start;
  }
  .pm-money-comparison {grid-template-columns:max-content auto max-content}
}

:root:not([data-pm-theme="dark"]) :is(.site-header,.shop-header) {background:#ffffff}

/* Shared filters and tables use neutral interaction colors. */
:is(.directory-search,.directory-filter-bar,.directory-filter-panel,.prices-filters,
    .prices-source-filters,.prices-source-toolbar,.warranty-filters,.pricing-filters,
    .mapping-search,.mapping-run-select,.native-crm-board-filters,.native-crm-partner-search,
    .native-crm-search,form[role="search"],form[aria-label*="фильтр" i],
    .table-scroll,.prices-table-scroll,.directory-table-scroll,.catalog-scroll,table) {
  --pm-focus:var(--pm-control);
  --shop-focus:var(--pm-control);
  -webkit-tap-highlight-color:transparent;
}

:root:not([data-pm-theme="dark"])
  :is(.directory-search,.directory-filter-bar,.directory-filter-panel,.prices-filters,
      .prices-source-filters,.prices-source-toolbar,.warranty-filters,.pricing-filters,
      .mapping-search,.mapping-run-select,.native-crm-board-filters,.native-crm-partner-search,
      .native-crm-search,form[role="search"],form[aria-label*="фильтр" i]) {
  background-color:#ffffff;
}

:root:not([data-pm-theme="dark"]) :is(.shop-workspace,.portal-private,.portal-public) table,
:root:not([data-pm-theme="dark"]) :is(.shop-workspace,.portal-private,.portal-public)
  table :is(thead, th, tbody tr, tbody td),
:root:not([data-pm-theme="dark"]) .shop-warranties .warranty-table tbody tr:nth-child(even):not([data-selected],:hover) td {
  background-color:#ffffff;
}

:root :is(.shop-workspace,.portal-private,.portal-public)
  table tbody tr:is(:hover,:active,[data-selected="true"],[aria-selected="true"]) > :is(th,td) {
  background-color:var(--pm-surface);
}

:is(.directory-active-filters,.native-crm-board-filters) :is(
    button[aria-pressed="true"],button[data-filter-clear],.native-crm-board-date-filter:has(input:checked)),
.shared-directory-v2 .directory-active-filters button {
  background-color:var(--pm-raised);
  border-color:var(--pm-control);
  color:var(--pm-ink);
}


:is(.directory-search,.directory-filter-panel,.prices-filters,.prices-source-filters,
    .prices-source-toolbar,.warranty-filters,.pricing-filters,.mapping-search,.mapping-run-select,
    .native-crm-board-filters,.native-crm-partner-search,.native-crm-search,
    form[role="search"],form[aria-label*="фильтр" i])
  :is(input:not([type="checkbox"],[type="radio"]),select,textarea,.pm-combobox-group) {
  --pm-focus:transparent;
}

:is(.directory-search,.directory-filter-panel,.prices-filters,.prices-source-filters,
    .prices-source-toolbar,.warranty-filters,.pricing-filters,.mapping-search,.mapping-run-select,
    .native-crm-board-filters,.native-crm-partner-search,.native-crm-search,
    form[role="search"],form[aria-label*="фильтр" i])
  :is(input:not([type="checkbox"],[type="radio"]),select,textarea):focus {
  outline:none;
}

:is(.shop-workspace,.portal-private,.portal-public) table
  :is(th,td) :is(.price-row-open,.prices-text-button,.secondary,.pm-column-title,.pm-column-arrow):is(:hover,:active) {
  background-color:transparent;
  color:var(--pm-ink);
}

/* Use the same text-only active state in the workspace and CRM navigation. */
:is(.site-header .top nav,.shop-header-inner > nav,.shop-price-subnav,.shop-mobile-links,
    .native-crm .native-crm-nav) > a,
:is(.site-header .top nav,.shop-header-inner > nav,.shop-price-subnav,.shop-mobile-links,
    .native-crm .native-crm-nav) > a:is(:hover,:active,[aria-current]) {
  background:transparent;
  color:var(--pm-ink);
  text-decoration:none;
}

:is(.site-header .top nav,.shop-header-inner > nav,.shop-price-subnav,.shop-mobile-links,
    .native-crm .native-crm-nav) > a[aria-current]:not([aria-current="false"]) {
  font-weight:700;
}

/* Slight lift for the white filter and table surfaces. */
:root:not([data-pm-theme="dark"])
  :is(.directory-search,.directory-filter-bar,.prices-filters,.prices-source-filters,
      .warranty-filters,.pricing-filters,.mapping-search,.mapping-run-select,
      .native-crm-board-filters,.native-crm-partner-search,
      .directory-table-scroll,.prices-table-scroll,.table-scroll,.catalog-scroll,
      table:not(:is(.directory-table-scroll,.prices-table-scroll,.table-scroll,.catalog-scroll) table)) {
  box-shadow:0 1px 2px rgb(24 24 27 / .05),0 3px 10px rgb(24 24 27 / .055);
}

:root :is(.shop-workspace,.portal-private,.portal-public) table thead th :is(a,button) {
  text-decoration:none;
}

:root :is(.shop-workspace,.portal-private) table tbody :is(th,td)
  a:is([href^="/products/"],[href$="#pricing-detail"]):hover {
  text-decoration:none;
}

@media (min-width:851px) and (hover:hover) and (pointer:fine) {
  :root:not([data-pm-theme="dark"]) :is(.shop-workspace,.portal-private,.portal-public,body)
    table tbody tr:hover:not(:where(:has(table:hover))) > :is(th,td) {
    background-color:#f9f9fa;
  }
}

/* Price results use text color without extra badges or fills. */
.pm-price-status-counts > span {white-space:nowrap}
.pm-price-status-counts [data-count-status="matched"] {color:var(--pm-good)}
.pm-price-status-counts [data-count-status="unmatched"] {color:var(--pm-error)}
.pm-price-status-counts [data-count-status="reviewed"] {color:var(--pm-warn)}
.pm-price-status-counts [data-count-status="error"],
.shop-workspace .mapping-status[data-state="error"] {color:var(--pm-ink);font-weight:700}

.pm-price-status-counts > span > span {font-weight:700}

.shop-workspace .shop-mapping .mapping-groups > button {
  background:transparent;
  border-color:transparent;
  color:var(--pm-ink);
  box-shadow:none;
}

.shop-workspace .shop-mapping .mapping-groups > button:is([aria-expanded="true"], [aria-pressed="true"]) {
  font-weight:700;
}

/* Match the catalogue field to the mapping status shown in the row. */
.shop-workspace .shop-mapping .mapping-table tr[data-match="unmatched"] {
  --mapping-field-background: var(--pm-error-bg);
}

.shop-workspace .shop-mapping .mapping-table tr[data-match="matched"] {
  --mapping-field-background: var(--pm-good-bg);
}

.shop-workspace .shop-mapping .mapping-table tr:is(
  [data-match="reviewed"],
  [data-match="unmatched"]:has(> .mapping-row-status .mapping-status[data-state="reviewed"])
) {
  --line-status: var(--pm-warn);
  --mapping-field-background: var(--pm-warn-bg);
}

.shop-workspace .shop-mapping .mapping-table tr:is([data-match="unmatched"], [data-match="matched"], [data-match="reviewed"])
  .mapping-row-product :is(.mapping-lookup > input, .mapping-linked-item) {
  --mapping-field-border: color-mix(in srgb, var(--line-status) 60%, var(--pm-rule));
  background-color: var(--mapping-field-background);
}

.shop-workspace .shop-mapping .mapping-table tr:is([data-match="unmatched"], [data-match="matched"], [data-match="reviewed"])
  .mapping-row-product .mapping-lookup > input {
  border-color: var(--mapping-field-border);
}

.shop-workspace .shop-mapping .mapping-table tr[data-match="matched"] .mapping-row-product .mapping-linked-item {
  padding-inline: .5rem;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--mapping-field-border);
}
