/* main-category / table — products as table rows (template/blocks/main-category/_table.twig, prototype 96 «Рівень», L2).
   The filter column stays (layout side, its rules are in _axes.css); the table scrolls sideways on narrow screens with the photo and the
   name pinned (position: relative keeps the screen-reader labels of the head inside the scroller, not widening the page on phones). Marks use the card tag tokens --et-tag-mark-0..3; the profile line — --et-tag-fit. Motion: none. */
.et-ptable { position: relative; overflow-x: auto; border-radius: var(--et-radius, 14px); background: var(--et-surface); box-shadow: inset 0 0 0 1px var(--et-border); overscroll-behavior-x: contain; }
.et-ptable:focus-visible { outline: 2px solid var(--et-accent); outline-offset: 2px; }
.et-ptable__t { width: 100%; min-width: 720px; border-collapse: collapse; font-size: var(--et-text-sm); }
.et-ptable__t th { padding: 0.875rem 0.625rem; background: var(--et-surface-2); color: var(--et-text-secondary); font-size: var(--et-text-xs); font-weight: 700; text-align: left; white-space: nowrap; }
.et-ptable__t th a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.et-ptable__t td { white-space: nowrap; padding: 0.75rem 0.625rem; border-top: 1px solid var(--et-border); vertical-align: middle; color: var(--et-text); }
.et-ptable__row:hover td { background: color-mix(in srgb, var(--et-surface-2) 60%, transparent); }
.et-ptable__cmp { width: 3rem; text-align: center; }
.et-ptable__cmpbtn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--et-border); border-radius: var(--et-radius-sm, 8px);
  background: var(--et-surface); color: var(--et-text-secondary); }
.et-ptable__cmpbtn:is(.active, [aria-pressed="true"]) { background: var(--et-accent); border-color: var(--et-accent); color: var(--et-accent-contrast); }
.et-ptable__img { width: 88px; min-width: 88px; }
.et-ptable__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.et-ptable__img img { display: block; width: 64px; max-width: none; height: 64px; object-fit: contain; border-radius: var(--et-media-radius, 8px); background: var(--et-media-box, var(--et-surface-2)); }
td.et-ptable__name { min-width: 15rem; white-space: normal; }
.et-ptable__title { display: block; font-weight: 700; line-height: 1.3; color: var(--et-text); text-decoration: none; }
.et-ptable__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.et-ptable__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; margin-top: 0.375rem; }
.et-ptable__art { font-size: var(--et-text-xs); font-weight: 700; color: var(--et-text-muted); font-variant-numeric: tabular-nums; }
.et-ptable__mark { padding: 0.1875rem 0.4375rem; border-radius: 6px; background: var(--et-mark, var(--et-tag-mark-0, var(--et-accent))); color: #fff; font-size: var(--et-text-xs); font-weight: 700; white-space: nowrap; }
.et-ptable__fit { display: block; margin-top: 0.25rem; font-size: var(--et-text-xs); font-weight: 700; color: var(--et-tag-fit, var(--et-success)); }
.et-ptable__fit::before { content: "\2713\00a0"; }
.et-ptable__stock { white-space: nowrap; color: var(--et-text-muted); }
.et-ptable__stock b { color: var(--et-success); }
td.et-ptable__price { text-align: right; white-space: nowrap; }
th.et-ptable__price { text-align: right; }
.et-ptable__price b { font: var(--et-heading-weight, 700) 1.375rem/1 var(--et-font-price, var(--et-font-display)); }
.et-ptable__price b.is-sale { color: var(--et-sale, var(--et-accent)); }
.et-ptable__price s { display: block; margin-top: 0.25rem; font-size: var(--et-text-xs); color: var(--et-text-muted); }
.et-ptable__buy { width: 3.5rem; }
.et-ptable__add { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: var(--et-btn-radius, 10px); background: var(--et-accent); color: var(--et-accent-contrast); }
.et-ptable__add:hover { background: var(--et-accent-hover, var(--et-accent)); }
/* profile filter of the listing («До моїх батарей»): rows that do not fit hide like cards do */
html.et-profile-only .et-ptable__row:not(.is-fit) { display: none; }

/* phones (Baymard M, R165): a row folds into a card — photo and name, then the price and the cart button in view, the features as chips
   under them; no sideways scroll that hid the price and «Купити» */
@media (max-width: 767px) {
  .et-ptable { overflow-x: visible; }
  .et-ptable__t { display: block; min-width: 0; font-size: var(--et-text-xs); }
  .et-ptable__t thead { display: none; }
  .et-ptable__t tbody { display: block; }
  .et-ptable__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; padding: 0.75rem; border-top: 1px solid var(--et-border); }
  .et-ptable__row:first-child { border-top: 0; }
  .et-ptable__t .et-ptable__row td { display: block; padding: 0; border: 0; background: none; }
  .et-ptable__t .et-ptable__row td.et-ptable__cmp { display: none; }
  td.et-ptable__img { order: 1; width: 64px; min-width: 64px; }
  td.et-ptable__name { order: 2; flex: 1 1 calc(100% - 4.5rem); min-width: 0; }
  td.et-ptable__price { order: 3; flex: 1 1 auto; margin-left: calc(64px + 0.5rem); text-align: left; }
  td.et-ptable__buy { order: 4; width: auto; }
  .et-ptable__t .et-ptable__row td:not([class]) { order: 5; padding: 0.125rem 0.5rem; border-radius: var(--et-chip-radius, 999px); background: var(--et-surface-2); color: var(--et-text-secondary); white-space: normal; }
  td.et-ptable__stock { order: 6; margin-left: auto; }
  .et-ptable__t .et-ptable__row td.et-ptable__none { display: none; }
  .et-ptable__price b { font-size: 1.125rem; }
  .et-ptable__price s { display: inline; margin: 0 0 0 0.375rem; }
}
