/* ==========================================================================
   pm theme — shop: cards, grid, home, category/filters, product, cart, order, account, reviews, compare
   (tokens and shared components live in site/css/pm.css)
   ========================================================================== */

/* ---------- product grid & card ---------- */
.pm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
.pm-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pm-catalog__main .pm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pm-grid, .pm-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .pm-grid, .pm-grid--5, .pm-grid--3, .pm-catalog__main .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }
/* horizontal row variant */
.pm-row-scroll { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; scrollbar-width: thin; }
.pm-row-scroll .pm-grid { display: flex; gap: 16px; }
.pm-row-scroll .pm-card { flex: 0 0 240px; scroll-snap-align: start; }
@media (max-width: 767px) { .pm-row-scroll .pm-card { flex-basis: 170px; } }

.pm-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--r-l); padding: 0; margin: 0; transition: box-shadow var(--t), border-color var(--t); overflow: hidden; }
.pm-card:hover { box-shadow: var(--shadow-l); border-color: var(--border-strong); }
.pm-card__form { display: flex; flex-direction: column; height: 100%; }
.pm-card__img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--surface); overflow: hidden; }
.pm-card__pic { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .25s ease, transform .3s ease; }
.pm-card__pic--2 { position: absolute; inset: 0; opacity: 0; }
@media (hover: none) { .pm-card__pic--2 { display: none; } } /* touch: no hover, and a display:none lazy image is never downloaded */
.pm-card:hover .pm-card__pic--2 { opacity: 1; }
.pm-card:hover .pm-card__pic:not(.pm-card__pic--2) { transform: scale(1.03); }
@media (hover: hover) { .pm-card:hover .pm-card__pic:has(+ .pm-card__pic--2) { opacity: 0; } } /* (hover only: a tap leaves :hover stuck on touch screens, where the hover photo is display:none) cross-fade: the main photo must not show around a hover photo of another shape */
.pm-card__nopic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--border-strong); }
.pm-card__nopic .pm-i { width: 40px; height: 40px; }
.pm-card__badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.pm-card__badge--stock { top: auto; bottom: 10px; left: 10px; background: rgba(31,26,23,.75); color: #fff; }
.pm-card__badge--custom .badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--ink); color: #fff; }
.pm-card__tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; flex-direction: column; gap: 4px; opacity: 0; transform: translateX(4px); transition: opacity var(--t), transform var(--t); }
.pm-card:hover .pm-card__tools, .pm-card__tools:focus-within { opacity: 1; transform: none; }
@media (hover: none) { .pm-card__tools { opacity: 1; transform: none; } }
.pm-card__tool { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: color var(--t), background var(--t); }
.pm-card__tool .pm-i { width: 18px; height: 18px; }
.pm-card__tool:hover { color: var(--brand); }
.pm-card__tool.is-on { color: var(--brand); }
.pm-card__tool.is-on .pm-i { fill: currentColor; }
.pm-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1 1 auto; }
.pm-card__rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-height: 16px; }
.pm-card__title { color: var(--ink); font-weight: 500; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pm-card__title:hover { color: var(--brand); }
.pm-card__skus { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-card__skusel { display: flex; flex-direction: column; gap: 4px; }
.pm-card__skuhint { font-size: 12px; color: var(--muted); }
.pm-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.pm-card__from { font-size: 13px; color: var(--muted); }
.pm-card__cur { font-size: 18px; font-weight: 700; color: var(--ink); }
.pm-card__old { font-size: 13px; color: var(--muted); }
.pm-card__stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--success); }
.pm-card__stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.pm-card__stock--few { color: var(--warn); }
.pm-card__stock--out { color: var(--muted); }
.pm-card__stock--out::before { background: var(--border-strong); }
.pm-card__actions { display: flex; gap: 8px; }
.pm-card__buy { flex: 1 1 auto; }
.pm-card.is-unavailable .pm-card__pic { opacity: .6; }
.pm-card.is-unavailable .pm-card__pic--2 { opacity: 0; } /* the rule above would otherwise un-hide the hover photo */
.pm-card.is-unavailable:hover .pm-card__pic--2 { opacity: .6; }
.pm-card .pm-select--sm { min-height: 36px; padding: 6px 28px 6px 10px; background-position: right 8px center; font-size: 13px; }
.pm-select.is-error { border-color: var(--sale); animation: pm-shake .3s; }
@keyframes pm-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (max-width: 767px) {
  .pm-card__body { padding: 10px 10px 12px; gap: 4px; }
  .pm-card__title { font-size: 13.5px; }
  .pm-card__cur { font-size: 16px; }
  .pm-card__buy { min-height: 38px; padding: 0 10px; font-size: 13px; }
  .pm-card__buy .pm-i { display: none; }
}

/* sku chips (cards + product) */
.pm-skuchip { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 10px; border: 1.5px solid var(--border-strong); border-radius: 6px; font-size: 13px; color: var(--text); background: #fff; cursor: pointer; transition: all var(--t); user-select: none; }
.pm-skuchip input { position: absolute; opacity: 0; width: 0; height: 0; }
.pm-skuchip:hover { border-color: var(--ink); }
.pm-skuchip input:checked + span, .pm-skuchip.is-active { }
.pm-skuchip:has(input:checked), .pm-skuchip.is-active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; }
.pm-card .pm-skuchip { min-height: 28px; padding: 0 8px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--ink); }
.pm-card .pm-skuchip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.pm-card .pm-skuchip.is-off:has(input:checked) { background: #fff; color: var(--muted); }
.pm-skuchip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.pm-skuchip.is-off { color: var(--muted); border-style: dashed; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface) 6px 7px); cursor: not-allowed; }
.pm-skuchip--btn { border: 1.5px solid var(--border-strong); }
.pm-skuchip--color { padding-left: 8px; }
.pm-skuchip__swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-right: 6px; border: 1px solid rgba(0,0,0,.12); }
.pm-skus { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-buy .pm-skuchip { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* rating helper output ($wa->shop->ratingHtml): <i class="icon10 star|star-half|star-empty"> */
i.icon10.star, i.icon10.star-half, i.icon10.star-empty, i.icon16.star, i.icon16.star-half, i.icon16.star-empty { display: inline-block; font-style: normal; font-size: 13px; line-height: 1; color: var(--star); letter-spacing: -1px; }
i.icon16.star, i.icon16.star-half, i.icon16.star-empty { font-size: 18px; }
i.star::before { content: "★"; }
i.star-half::before { content: "★"; background: linear-gradient(90deg, var(--star) 50%, var(--border-strong) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
i.star-empty::before { content: "★"; color: var(--border-strong); }
.rate { display: inline-flex; gap: 1px; line-height: 1; }
/* rating input: rate.widget.js toggles star / star-empty / star-hover on the <i class="icon16">s */
.pm-rate-input { display: inline-flex; gap: 3px; cursor: pointer; text-decoration: none; vertical-align: middle; }
.pm-rate-input i, .pm-rate-input i.icon16 { display: inline-block; font-style: normal; font-size: 28px; line-height: 1; letter-spacing: 0; color: var(--border-strong); transition: color .12s, transform .12s; }
.pm-rate-input i::before, .pm-rate-input i.icon16::before { content: "★"; color: inherit; background: none; }
.pm-rate-input i.star, .pm-rate-input i.star-hover { color: var(--star); }
.pm-rate-input i.star-hover { transform: scale(1.12); }
.review-form .rate-clear { margin-left: 10px; vertical-align: middle; }

/* ---------- home ---------- */
.pm-hero { position: relative; margin: 8px 0 32px; border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.pm-hero__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pm-hero__track::-webkit-scrollbar { display: none; }
.pm-hero__slide { flex: 0 0 100%; scroll-snap-align: start; }
.pm-hero__inner { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 40px; align-items: center; padding: 32px 48px; min-height: 420px; color: var(--ink); }
.pm-hero__inner--promo { background: var(--hero-bg, var(--surface)); color: var(--hero-fg, var(--ink)); }
.pm-hero__pic { display: block; aspect-ratio: 1; background: #fff; border-radius: var(--r-l); overflow: hidden; }
.pm-hero__img { width: 100%; height: 100%; object-fit: contain; }
.pm-hero__img--promo { max-height: 380px; width: auto; }
.pm-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.pm-hero__title { font-size: 34px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: inherit; }
.pm-hero__lead { color: var(--muted); font-size: 16px; max-width: 520px; }
.pm-hero__inner--promo .pm-hero__lead { color: inherit; opacity: .85; }
.pm-hero__price { font-size: 26px; font-weight: 700; }
.pm-hero__price s { font-size: 16px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.pm-hero__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-l); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); z-index: 2; }
.pm-hero__nav--prev { left: 12px; } .pm-hero__nav--next { right: 12px; }
.pm-hero__nav:hover { color: var(--brand); }
.pm-hero__dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.pm-hero__dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(31,26,23,.25); transition: all var(--t); }
.pm-hero__dots button.is-active { background: var(--brand); width: 22px; border-radius: 4px; }
@media (max-width: 1023px) { .pm-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 24px; min-height: 0; } .pm-hero__title { font-size: 26px; } }
@media (max-width: 640px) {
  .pm-hero { margin: 0 0 24px; border-radius: var(--r-l); }
  .pm-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 16px 36px; }
  .pm-hero__pic { max-width: 260px; margin: 0 auto; width: 100%; }
  .pm-hero__title { font-size: 20px; } .pm-hero__lead { font-size: 14px; display: none; } .pm-hero__price { font-size: 20px; }
  .pm-hero__nav { display: none; }
  .pm-hero__text .pm-btn { min-height: 40px; }
}
.pm-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-tabs__tab { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--text); background: var(--surface); transition: all var(--t); border: 0; }
.pm-tabs__tab:hover { background: var(--surface-2); color: var(--ink); }
.pm-tabs__tab.is-active { background: var(--ink); color: #fff; }
.pm-tabs__n { font-size: 12px; opacity: .7; }
.pm-tabs--line { gap: 0; border-bottom: 1px solid var(--border); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pm-tabs--line .pm-tabs__tab { border-radius: 0; background: none; min-height: 46px; padding: 0 18px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pm-tabs--line .pm-tabs__tab.is-active { background: none; color: var(--brand-dark); border-bottom-color: var(--brand); }
.pm-tabs--line .pm-tabs__tab:hover { background: none; color: var(--brand); }
.pm-sets__head { align-items: center; }
.pm-sets__more { display: flex; justify-content: center; margin-top: 20px; }
.pm-welcome { max-width: 860px; }
.pm-welcome .pm-h1 { font-size: 26px; }
.pm-welcome__text { font-size: 15px; color: var(--text); }
.pm-hreviews__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pm-hreview { background: var(--surface); border-radius: var(--r-l); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.pm-hreview__top { display: flex; justify-content: space-between; align-items: center; }
.pm-hreview__text { margin: 0; font-size: 14px; flex: 1 1 auto; }
.pm-hreview__foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 13px; }
.pm-hreview__author { font-weight: 600; color: var(--ink); }
.pm-hreview__product { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pm-hreview__product img { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; background: #fff; }
@media (max-width: 1023px) { .pm-hreviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pm-hreviews__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- category ---------- */
.pm-list-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pm-list-head .pm-h1 { margin: 0; }
.pm-admin-link { font-size: 16px; color: var(--muted); margin-left: 8px; vertical-align: middle; }
.pm-subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
@media (max-width: 767px) { .pm-subcats { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 14px; padding: 0 var(--gutter) 4px; scrollbar-width: none; } .pm-subcats .pm-chip { white-space: nowrap; } }
.pm-cat-desc { margin: 0 0 20px; font-size: 15px; max-width: 900px; }
.pm-cat-desc--bottom { margin: 32px 0 0; }
.pm-catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.pm-catalog--nofilters { grid-template-columns: minmax(0, 1fr); }
.pm-catalog--nofilters .pm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pm-catalog--nofilters .pm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .pm-catalog--nofilters .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pm-catalog__side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; scrollbar-width: thin; }
.pm-list { position: relative; }
#page-content.is-loading .pm-list { opacity: .5; pointer-events: none; }
#page-content.is-loading .pm-catalog__side { cursor: progress; }
#page-content.is-loading .js-filters-form { pointer-events: none; }
#page-content.is-loading .pm-list::after { content: ""; position: absolute; top: 60px; left: 50%; width: 32px; height: 32px; margin-left: -16px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: pm-spin .8s linear infinite; }
.pm-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 40px; }
@media (max-width: 767px) {
  .pm-toolbar { gap: 8px; }
  .pm-toolbar__count, .pm-toolbar .pm-grow { display: none; }
  .pm-toolbar .js-filters-open, .pm-toolbar .pm-sort { flex: 1 1 0; min-width: 0; }
  .pm-toolbar .js-filters-open { min-height: 44px; border-color: var(--ink); }
  .pm-sort__btn { width: 100%; min-height: 44px; justify-content: center; white-space: nowrap; overflow: hidden; }
  .pm-sort__btn b { overflow: hidden; text-overflow: ellipsis; }
  .pm-sort__menu { left: 0; right: 0; min-width: 0; }
}
.pm-toolbar__fcount { background: var(--brand); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; margin-left: 2px; }
.pm-sort { position: relative; }
.pm-sort__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border-strong); background: #fff; font-size: 14px; color: var(--text); }
.pm-sort__btn:hover { border-color: var(--ink); }
.pm-sort__btn b { color: var(--ink); }
.pm-sort__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-l); box-shadow: var(--shadow-l); z-index: 40; }
.pm-sort__menu a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: var(--r-s); color: var(--text); font-size: 14px; }
.pm-sort__menu a:hover { background: var(--surface); color: var(--brand); }
.pm-sort__menu li.is-active a { color: var(--brand-dark); font-weight: 600; background: var(--brand-tint); }
.pm-sort__menu a i { font-style: normal; color: var(--muted); }
.pm-sort__menu a i.sort-asc::after { content: "↑"; } .pm-sort__menu a i.sort-desc::after { content: "↓"; }
.pm-list__nav { margin-top: 24px; }
.pm-pagination-wrap { display: flex; justify-content: center; }
/* filters */
.pm-filters { background: #fff; border: 1px solid var(--border); border-radius: var(--r-l); padding: 6px 16px 12px; }
.pm-filters__head { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
.pm-filters__head .pm-link { margin-left: auto; }
.pm-filter { border-bottom: 1px solid var(--border); }
.pm-filter:last-of-type { border-bottom: 0; }
.pm-filter__head { display: flex; align-items: center; gap: 8px; padding: 12px 0; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; user-select: none; }
.pm-filter__head::-webkit-details-marker { display: none; }
.pm-filter__head::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--t); }
.pm-filter[open] > .pm-filter__head::after { transform: rotate(225deg); }
.pm-filter__n { color: var(--muted); font-weight: 400; font-size: 13px; }
.pm-filter__body { padding: 0 0 12px; }
.pm-filter__list { display: flex; flex-direction: column; }
.pm-filter__list--scroll { max-height: 262px; overflow: auto; scrollbar-width: thin; padding-right: 4px; }
.pm-filter__search { margin-bottom: 8px; }
.pm-filter .pm-check { font-size: 14px; padding: 5px 0; }
.pm-filter .pm-check__text a { color: inherit; pointer-events: none; } /* the label ticks the box; the link stays for crawlers */
.pm-filter .pm-check__text a:hover { color: var(--brand); }
.pm-input--sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.pm-range__inputs { display: flex; align-items: center; gap: 8px; }
.pm-range__inputs label, .pm-range__inputs input { flex: 1 1 0; min-width: 0; }
.pm-range__dash { color: var(--muted); }
.pm-range__slider { position: relative; height: 28px; margin: 10px 4px 0; }
.pm-range__track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; background: var(--border); border-radius: 2px; }
.pm-range__fill { position: absolute; top: 0; bottom: 0; background: var(--brand); border-radius: 2px; }
.pm-range__slider input[type=range] { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 28px; margin: 0; background: none; -webkit-appearance: none; appearance: none; pointer-events: none; }
.pm-range__slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow); pointer-events: auto; cursor: pointer; }
.pm-range__slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow); pointer-events: auto; cursor: pointer; }
.pm-range__slider input[type=range]::-moz-range-track { background: transparent; }
.pm-filters__foot { position: sticky; bottom: 0; background: #fff; padding: 12px 0 0; margin-top: 8px; border-top: 1px solid var(--border); }
@media (max-width: 1023px) {
  .pm-catalog { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pm-catalog__side { position: fixed; top: 0; left: 0; bottom: 0; width: min(380px, 90vw); max-height: none; z-index: 95; background: #fff; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-l); overflow: auto; }
  .pm-catalog__side.is-on { transform: none; }
  .pm-filters { border: 0; border-radius: 0; padding: 0 16px 16px; min-height: 100%; display: flex; flex-direction: column; }
  .pm-filters__head { position: sticky; top: 0; background: #fff; z-index: 1; }
  .pm-filters__form { flex: 1 1 auto; display: flex; flex-direction: column; }
  .pm-filters__foot { margin-top: auto; }
  .pm-toolbar { margin-bottom: 12px; }
}

/* ---------- product ---------- */
.pm-product__top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pm-product__gallery { position: sticky; top: 16px; }
.pm-product__info { min-width: 0; max-width: 560px; }
.pm-product__title { font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
.pm-product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.pm-product__rating { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pm-product__rating:hover { color: var(--brand); }
.pm-product__bullets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text); }
.pm-product__bullets > span { display: flex; gap: 8px; align-items: flex-start; }
.pm-product__bullets .pm-i { color: var(--brand); flex: 0 0 auto; margin-top: 1px; }
.pm-product__aux { margin-top: 16px; }
@media (max-width: 1023px) { .pm-product__top { grid-template-columns: minmax(0, 1fr); gap: 20px; } .pm-product__gallery { position: static; } .pm-product__info { max-width: none; } .pm-product__title { font-size: 22px; } }
/* tabs ≥768 / accordions on phones */
.pm-product__tabs { margin-top: 40px; }
.pm-ptab { max-width: 900px; }
.pm-ptab__acc { display: none; }
@media (min-width: 768px) {
  .pm-ptab { display: none; padding: 24px 0 8px; }
  .pm-ptab.is-active { display: block; }
}
@media (max-width: 767px) {
  .pm-product__tabs { margin: 24px calc(-1 * var(--gutter)) 0; }
  .pm-ptab { border-top: 1px solid var(--border); }
  .pm-ptab__acc { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 var(--gutter); background: none; border: 0; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
  .pm-ptab__acc .pm-i { width: 18px; height: 18px; transition: transform var(--t); color: var(--muted); }
  .pm-ptab.is-open .pm-ptab__acc .pm-i { transform: rotate(180deg); }
  .pm-ptab__body { display: none; padding: 0 var(--gutter) 16px; font-size: 14px; }
  .pm-ptab.is-open .pm-ptab__body { display: block; }
  .pm-ptab__acc--link { border-top: 1px solid var(--border); }
  .pm-product__tabs > :last-child { border-bottom: 1px solid var(--border); }
}
/* gallery: thumbs column on the left (desktop), dots on phones */
.pm-gallery { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pm-gallery__main { position: relative; aspect-ratio: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); overflow: hidden; }
.pm-gallery__item { position: absolute; inset: 0; display: none; cursor: zoom-in; }
.pm-gallery__item.is-active { display: block; }
.pm-gallery__item img { width: 100%; height: 100%; object-fit: contain; }
.pm-gallery__nopic { display: flex; align-items: center; justify-content: center; color: var(--border-strong); cursor: default; }
.pm-gallery__nopic .pm-i { width: 64px; height: 64px; }
.pm-gallery__badge { position: absolute; top: 16px; left: 16px; z-index: 2; }
.pm-gallery__tools { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.pm-gallery__tools .pm-card__tool { width: 40px; height: 40px; }
.pm-gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); z-index: 2; opacity: 0; transition: opacity var(--t); }
.pm-gallery__nav--prev { left: 10px; } .pm-gallery__nav--next { right: 10px; }
.pm-gallery__main:hover .pm-gallery__nav { opacity: 1; }
.pm-gallery__zoom { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; z-index: 2; }
.pm-gallery__thumbs { display: flex; gap: 8px; overflow: auto; scrollbar-width: none; padding: 2px; }
.pm-gallery__thumbs::-webkit-scrollbar { display: none; }
.pm-gallery__thumb { flex: 0 0 72px; width: 72px; height: 72px; padding: 0; border-radius: var(--r); border: 2px solid transparent; background: var(--surface); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; transition: border-color var(--t); }
.pm-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.pm-gallery__thumb.is-active { border-color: var(--brand); }
.pm-gallery__thumb--video .pm-i { width: 28px; height: 28px; }
.pm-gallery__dots { display: none; }
@media (min-width: 1024px) {
  .pm-gallery.has-thumbs { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start; }
  .pm-gallery.has-thumbs .pm-gallery__thumbs { grid-column: 1; grid-row: 1; flex-direction: column; height: 0; min-height: 100%; align-self: stretch; }
  .pm-gallery.has-thumbs .pm-gallery__main { grid-column: 2; grid-row: 1; }
}
@media (max-width: 1023px) { .pm-gallery__thumb { flex-basis: 56px; width: 56px; height: 56px; } }
@media (max-width: 767px) {
  .pm-product__gallery { margin: 0 calc(-1 * var(--gutter)); }
  .pm-gallery__main { border: 0; border-radius: 0; }
  .pm-gallery__thumbs, .pm-gallery__nav, .pm-gallery__zoom { display: none; }
  .pm-gallery__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; z-index: 2; pointer-events: none; }
  .pm-gallery__dots i { width: 6px; height: 6px; border-radius: 3px; background: #fff; border: 1px solid var(--border); transition: width var(--t); }
  .pm-gallery__dots i.is-active { width: 20px; background: var(--brand); border-color: var(--brand); }
  .pm-gallery__tools .pm-card__tool { width: 44px; height: 44px; }
}
/* buy block */
.pm-buy { display: flex; flex-direction: column; gap: 18px; }
.pm-buy__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pm-price { font-size: 32px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; line-height: 1.1; }
.pm-price__old { font-size: 17px; color: var(--muted); }
.pm-buy__per { font-size: 14px; }
.pm-buy__label { font-size: 15px; color: var(--muted); margin-bottom: 8px; padding: 0; }
.pm-buy__label b { color: var(--ink); font-weight: 600; }
fieldset.pm-buy__option { border: 0; margin: 0; padding: 0; min-width: 0; }
.pm-buy__options { display: flex; flex-direction: column; gap: 14px; }
.pm-buy__services { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface); border-radius: var(--r); }
.pm-service .pm-select { margin: 4px 0 0 30px; width: auto; }
.pm-buy__facts { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pm-stock { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--success); }
.pm-stock__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: 0 0 auto; }
.pm-stock:has(.pm-stock__dot--few) { color: var(--warn); }
.pm-stock:has(.pm-stock__dot--no) { color: var(--muted); }
.pm-stock__dot--few { background: var(--warn); } .pm-stock__dot--no { background: var(--border-strong); }
.pm-buy__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pm-buy__row { display: flex; gap: 10px; flex: 1 1 300px; min-width: 0; }
.pm-buy__row .pm-qty { height: 48px; flex: 0 0 auto; } .pm-buy__row .pm-qty button { width: 44px; } .pm-buy__row .pm-qty input { width: 48px; }
.pm-buy__btn { flex: 1 1 auto; min-height: 48px; }
.pm-buy__btnprice { display: none; }
.pm-buy__btnprice::before { content: "·\00a0"; }
.pm-buy__btnprice:empty { display: none !important; }
.pm-buy__plugin { flex: 1 1 180px; min-width: 0; }
.pm-buy__plugin .quickorder-button { display: flex !important; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 1px solid var(--border-strong); border-radius: var(--r); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; transition: border-color var(--t); width: 100%; }
.pm-buy__plugin .quickorder-button:hover { border-color: var(--ink); }
/* out of stock (no notify-me yet): the stock line says «Немає в наявності»; no price, qty, buy, 1-click or services */
.pm-buy.is-out .pm-buy__price, .pm-buy.is-out .pm-buy__actions, .pm-buy.is-out .pm-buy__services { display: none; }
/* «Немає в наявності» in place of a price (live search, mini lists, compare, hero) */
.pm-oos { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
/* product chips (≤5 SKUs): name + price */
.pm-skuchip--price { flex-direction: column; align-items: flex-start; gap: 1px; min-height: 46px !important; padding: 5px 12px !important; border-radius: var(--r); font-weight: 600; color: var(--ink); line-height: 1.2; }
.pm-skuchip--price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.pm-skuchip--price.is-on, .pm-skuchip--price:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
/* many-SKU size picker */
.pm-sz__field, .pm-sz__sheethead, .pm-sz__foot, .pm-sz__backdrop { display: none; }
.pm-sz__box { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border); border-radius: var(--r-l); padding: 16px; }
.pm-sz__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.pm-sz__head b { color: var(--ink); font-weight: 600; }
.pm-sz__widths { display: flex; flex-direction: column; gap: 6px; }
.pm-sz__wl { font-size: 12px; color: var(--muted); }
.pm-sz__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-wchip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; flex: 0 0 auto; transition: all var(--t); }
.pm-wchip:hover { border-color: var(--ink); }
.pm-wchip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pm-sz__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 296px; overflow: auto; padding-right: 4px; scrollbar-width: thin; align-content: start; }
.pm-szrow { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 54px; padding: 6px 12px; border: 1.5px solid var(--border); border-radius: var(--r); background: #fff; font-size: 14px; color: var(--ink); cursor: pointer; transition: border-color var(--t), background var(--t); }
.pm-szrow:hover { border-color: var(--border-strong); }
.pm-szrow input { position: absolute; opacity: 0; width: 0; height: 0; }
.pm-szrow__radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); background: #fff; }
.pm-szrow__name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-szrow__st { font-size: 12px; color: var(--success); white-space: nowrap; }
.pm-szrow__pr { font-weight: 700; white-space: nowrap; }
.pm-szrow.is-on { border-color: var(--brand); background: var(--brand-tint); }
.pm-szrow.is-on .pm-szrow__radio { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 42%, #fff 47%); }
.pm-szrow:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pm-szrow.is-off { color: var(--muted); border-style: dashed; cursor: not-allowed; }
.pm-szrow.is-off .pm-szrow__st { color: var(--muted); }
.pm-sz__note { font-size: 12px; color: var(--muted); }
.pm-sz__note:empty { display: none; }
@media (min-width: 768px) and (max-width: 1199px) { .pm-sz__list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .pm-sz__field { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 56px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
  .pm-sz__field-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .pm-sz__field-l { font-size: 12px; color: var(--muted); }
  .pm-sz__field-v { font-size: 16px; font-weight: 600; }
  .pm-sz__box { display: none; }
  .pm-sz.is-open .pm-sz__backdrop { display: block; position: fixed; inset: 0; z-index: 96; background: rgba(31,26,23,.45); }
  .pm-sz.is-open .pm-sz__box { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 97; max-height: 85vh; gap: 0; padding: 0; border: 0; border-radius: 16px 16px 0 0; background: #fff; box-shadow: 0 -8px 32px rgba(0,0,0,.18); }
  .pm-sz__sheethead { display: flex; align-items: center; gap: 8px; padding: 14px 8px 8px 16px; border-bottom: 1px solid var(--border); position: relative; }
  .pm-sz__sheethead::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--border); }
  .pm-sz__title-m { flex: 1 1 auto; font-size: 18px; color: var(--ink); margin-top: 4px; }
  .pm-sz__head { display: none; }
  .pm-sz__widths { padding: 12px 16px 4px; }
  .pm-sz__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .pm-sz__chips::-webkit-scrollbar { display: none; }
  .pm-wchip { min-height: 40px; }
  .pm-sz__list { grid-template-columns: minmax(0, 1fr); max-height: none; flex: 1 1 auto; padding: 4px 16px 12px; overflow: auto; }
  .pm-szrow { min-height: 56px; padding: 7px 14px; font-size: 15px; }
  .pm-sz__note { padding: 0 16px 8px; }
  .pm-sz__foot { display: block; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
  /* fixed buy bar instead of the tab bar on the product page (design: ProductMobile) */
  body.action-product .pm-tabbar { display: none !important; }
  body.action-product { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .pm-buy__row { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
  .pm-buy__row .pm-qty { height: 48px; } .pm-buy__row .pm-qty button { width: 40px; } .pm-buy__row .pm-qty input { width: 40px; }
  .pm-buy__btnprice { display: inline; white-space: nowrap; }
  /* the fixed bar is qty + button: the button may shrink and wrap its label instead of running off the screen */
  .pm-buy__btn { min-width: 0; padding: 0 14px; white-space: normal; line-height: 1.15; text-align: center; }
  .pm-buy__plugin { flex-basis: 100%; }
  /* out of stock: no buy bar, so the bottom tab bar comes back */
  body.action-product:has(.pm-buy.is-out) .pm-tabbar { display: flex !important; }
  body.action-product:has(.pm-buy.is-out) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .pm-product__bullets { font-size: 12px; gap: 8px; }
  .pm-price { font-size: 28px; }
}
/* specs */
.pm-specs { width: 100%; max-width: 760px; font-size: 14.5px; border-collapse: collapse; }
.pm-specs th, .pm-specs td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.pm-specs th { width: 42%; color: var(--muted); font-weight: 400; }
.pm-specs tr:nth-child(even) th, .pm-specs tr:nth-child(even) td { background: var(--surface); }
.pm-specs__divider th { color: var(--ink) !important; font-weight: 600; background: #fff !important; padding-top: 18px; }
.pm-specs--sku { margin-top: 0; }
/* reviews */
.pm-reviews-list, .reviews-branch { list-style: none; margin: 0; padding: 0; }
.reviews-branch .reviews-branch { margin: 8px 0 0 24px; padding-left: 12px; border-left: 2px solid var(--border); }
.pm-review { padding: 16px 0; border-bottom: 1px solid var(--border); }
.pm-review.new { background: var(--success-tint); border-radius: var(--r); padding: 16px; }
.pm-review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pm-review__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint-2); color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.pm-review__who { display: flex; flex-direction: column; line-height: 1.3; gap: 2px; }
.pm-review__name { font-weight: 600; color: var(--ink); }
.pm-review__rate { margin-left: auto; }
.pm-review__title { display: block; margin-bottom: 4px; color: var(--ink); }
.pm-review__text { margin: 0; font-size: 15px; }
.pm-review__images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pm-review__img { width: 72px; height: 72px; border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.pm-review__img img { width: 100%; height: 100%; object-fit: cover; }
.pm-review .actions { margin-top: 8px; }
.pm-reviews-short .pm-btn { margin-top: 16px; }
.pm-reviews-page { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
.pm-reviews-page__product { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.pm-reviews-page__img { aspect-ratio: 1; border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.pm-reviews-page__img img { width: 100%; height: 100%; object-fit: contain; }
.pm-reviews-page__name { font-weight: 600; color: var(--ink); }
.write-review { margin: 0 0 16px; }
.pm-authtype { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.pm-authtype li.selected .pm-chip { background: var(--brand-tint); border-color: var(--brand); }
.pm-authtype img { width: 16px; height: 16px; }
.review-form .errormsg { color: var(--sale); font-size: 13px; display: block; margin-top: 4px; }
.review-form .error { border-color: var(--sale); }
.s-review-images-section .s-image-form-section { position: relative; border: 1.5px dashed var(--border-strong); border-radius: var(--r); padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.s-review-images-section .s-file-field { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.s-review-images-section.is-dragging .s-image-form-section { border-color: var(--brand); background: var(--brand-tint); }
.s-attached-files-section { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.s-file-wrapper { position: relative; width: 110px; }
.s-file-wrapper .s-image-wrapper img { width: 110px; height: 110px; object-fit: cover; border-radius: var(--r-s); }
.s-file-wrapper .s-description-wrapper { font-size: 12px; margin-top: 4px; }
.s-file-wrapper .s-hidden { display: none; } .s-file-wrapper .is-extended .s-visible { display: none; } .s-file-wrapper .is-extended .s-hidden { display: block; }
.s-file-wrapper .s-textarea { width: 100%; font-size: 12px; min-height: 50px; border: 1px solid var(--border-strong); border-radius: 4px; }
.s-file-wrapper .s-actions { position: absolute; top: 4px; right: 4px; }
.s-file-wrapper .s-action { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.9); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
.s-errors-section .s-error { color: var(--sale); font-size: 13px; margin-top: 6px; }
.pm-captcha img { border-radius: var(--r); } .pm-captcha input { max-width: 160px; }
@media (max-width: 900px) { .pm-reviews-page { grid-template-columns: minmax(0, 1fr); gap: 16px; } .pm-reviews-page__product { position: static; flex-direction: row; align-items: center; flex-wrap: wrap; } .pm-reviews-page__img { width: 80px; } .pm-reviews-page__product .pm-btn { display: none; } }

/* ---------- cart ---------- */
.pm-cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.pm-cart__items { display: flex; flex-direction: column; }
.pm-cart-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); transition: opacity var(--t); }
.pm-cart-item.is-removing { opacity: .4; pointer-events: none; }
.pm-cart-item__img { flex: 0 0 96px; width: 96px; height: 96px; border-radius: var(--r); background: var(--surface); overflow: hidden; }
.pm-cart-item__img img { width: 100%; height: 100%; object-fit: contain; }
.pm-cart-item__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pm-cart-item__name { color: var(--ink); font-weight: 500; line-height: 1.3; }
.pm-cart-item__name:hover { color: var(--brand); }
.pm-cart-item__row { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.pm-cart-item__price { display: flex; flex-direction: column; line-height: 1.2; color: var(--ink); margin-left: auto; text-align: right; }
.pm-cart-item__remove { color: var(--muted); min-width: 36px; min-height: 36px; }
.pm-cart-item__remove:hover { color: var(--sale); }
.pm-cart-item__services { display: flex; flex-direction: column; gap: 2px; }
.pm-cart__summary { position: sticky; top: 16px; background: var(--surface); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pm-cart__totals { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pm-cart__totals > div { display: flex; justify-content: space-between; align-items: baseline; }
.pm-cart__totals dt { color: var(--muted); } .pm-cart__totals dd { margin: 0; color: var(--ink); }
.pm-cart__total { border-top: 1px solid var(--border-strong); padding-top: 10px; font-size: 20px; font-weight: 700; }
.pm-cart__total dt { color: var(--ink); }
.pm-cart__actions { display: flex; flex-direction: column; gap: 8px; }
.pm-cart__coupon details summary { cursor: pointer; list-style: none; }
.pm-cart__coupon-row { display: flex; gap: 8px; margin-top: 8px; }
.pm-cart__related { grid-column: 1 / -1; margin-top: 16px; min-width: 0; }
/* grid items default to min-width:auto — a wide child (the related-products scroller) would stretch the whole cart past the screen on phones */
.pm-cart > * { min-width: 0; }
.pm-cart__empty { grid-column: 1 / -1; }
@media (max-width: 900px) { .pm-cart { grid-template-columns: minmax(0, 1fr); gap: 16px; } .pm-cart__summary { position: static; } .pm-cart-item__img { flex-basis: 72px; width: 72px; height: 72px; } }
/* drawer variant */
.pm-cart-drawer .pm-wrap { padding: 0; max-width: none; }
.pm-cart--drawer { grid-template-columns: minmax(0, 1fr); gap: 0; }
.pm-cart--drawer .pm-cart__items { padding: 0 20px; }
.pm-cart--drawer .pm-cart-item { padding: 14px 0; gap: 12px; }
.pm-cart--drawer .pm-cart-item__img { flex-basis: 72px; width: 72px; height: 72px; }
.pm-cart--drawer .pm-cart__summary { position: sticky; bottom: 0; border-radius: 0; margin-top: 8px; background: #fff; border-top: 1px solid var(--border); padding: 14px 20px; }
.pm-cart--drawer .pm-cart__related { margin: 16px 20px 0; }
.pm-cart--drawer .pm-cart__empty { padding: 48px 20px; }
.pm-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pm-mini__item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r); }
.pm-mini__img { flex: 0 0 56px; width: 56px; height: 56px; border-radius: var(--r-s); background: var(--surface); overflow: hidden; }
.pm-mini__img img { width: 100%; height: 100%; object-fit: contain; }
.pm-mini__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-mini__title { font-size: 13.5px; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-mini__price { font-weight: 600; font-size: 14px; }

/* ---------- order (checkout v2) ---------- */
html.is-order body { background: var(--surface); }
.pm-order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; margin-top: 8px; }
.pm-order .pm-card { padding: 20px 24px; }
/* grid items default to min-width:auto: one wide child (e.g. the LiqPay logo row) stretched the whole checkout past a phone screen */
.pm-order > *, .pm-order-view > * { min-width: 0; }
.pm-order__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pm-order__head h2 { margin: 0; }
.s-section-footer { margin-top: 12px; }
@media (max-width: 900px) { .pm-order { grid-template-columns: minmax(0, 1fr); gap: 16px; } .pm-order .pm-card { padding: 16px; } .pm-order__cart { order: 2; } }
.pm-success { max-width: 640px; margin: 24px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pm-success__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--success-tint); color: var(--success); display: inline-flex; align-items: center; justify-content: center; }
.pm-success__icon .pm-i { width: 36px; height: 36px; }
.pm-success__icon--error { background: var(--warn-tint); color: var(--warn); }
.pm-success__num { font-size: 18px; }
.pm-success__summary { width: 100%; text-align: left; }
.pm-success .pm-box { margin-bottom: 0; }
.pm-success__items { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pm-success__items li { display: flex; justify-content: space-between; gap: 12px; }
.pm-success__total { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; font-size: 17px; }
.pm-success__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- account orders ---------- */
.pm-orders { display: flex; flex-direction: column; gap: 10px; }
.pm-order-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 160px 120px; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r-l); color: var(--text); background: #fff; transition: border-color var(--t), box-shadow var(--t); }
.pm-order-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow); color: var(--text); }
.pm-order-row__id { display: flex; flex-direction: column; } .pm-order-row__id b { color: var(--ink); }
.pm-order-row__items { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-order-row__total { text-align: right; color: var(--ink); }
.pm-status { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 500; }
@media (max-width: 700px) { .pm-order-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pm-order-row__items { grid-column: 1 / -1; } .pm-order-row__total { text-align: left; } }
.pm-order-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pm-order-table td { padding: 8px 6px; }
.pm-order-table__sum td { color: var(--muted); border-bottom: 0; padding: 4px 6px; }
.pm-order-table__total td { font-size: 17px; padding-top: 10px; border-top: 1px solid var(--border); }
.pm-right { text-align: right; } .pm-nowrap { white-space: nowrap; }
@media (max-width: 800px) { .pm-order-view { grid-template-columns: minmax(0, 1fr); } }
.pm-order-view { overflow-wrap: break-word; }
/* phones: the 3-column items table (name | price × qty | sum, two of them nowrap) did not fit — name on its own line, numbers below */
@media (max-width: 600px) {
  .pm-order-view .pm-box { padding: 16px; }
  .pm-order-table, .pm-order-table tbody { display: block; }
  .pm-order-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; }
  .pm-order-table td { padding: 0; }
  .pm-order-table tr:not(.pm-order-table__sum):not(.pm-order-table__total) { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .pm-order-table tr:not(.pm-order-table__sum):not(.pm-order-table__total) td { border: 0; }
  .pm-order-table tr:not(.pm-order-table__sum):not(.pm-order-table__total) td:first-child { grid-column: 1 / -1; margin-bottom: 4px; }
  .pm-order-table__sum td { padding: 4px 0; border: 0; }
  .pm-order-table__total { margin-top: 6px; border-top: 1px solid var(--border); }
  .pm-order-table__total td { padding-top: 10px; border: 0; }
}

/* ---------- compare ---------- */
.pm-compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.pm-compare { min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.pm-compare th, .pm-compare td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; min-width: 180px; }
.pm-compare thead th, .pm-compare thead td { position: sticky; top: 0; background: #fff; z-index: 1; border-bottom: 2px solid var(--border-strong); }
.pm-compare tbody th { color: var(--muted); font-weight: 400; min-width: 140px; position: sticky; left: 0; background: #fff; }
.pm-compare tr.is-same td, .pm-compare tr.is-same th { color: var(--muted); }
.pm-compare__product { position: relative; display: flex; flex-direction: column; gap: 6px; max-width: 200px; }
.pm-compare__img { aspect-ratio: 1; width: 120px; border-radius: var(--r); background: var(--surface); overflow: hidden; }
.pm-compare__img img { width: 100%; height: 100%; object-fit: contain; }
.pm-compare__name { color: var(--ink); font-weight: 500; }
.pm-compare__remove { position: absolute; top: 0; right: 0; color: var(--muted); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.pm-tabs--chips .pm-chip.is-active { background: var(--brand-tint); border-color: var(--brand); }

/* ---------- lightbox ---------- */
.pm-lightbox { position: fixed; inset: 0; background: rgba(20,16,14,.92); z-index: 300; display: flex; align-items: center; justify-content: center; }
.pm-lightbox__stage { max-width: 92vw; max-height: 92vh; }
.pm-lightbox__stage img { max-width: 92vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; }
.pm-lightbox__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pm-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pm-lightbox__nav--prev { left: 14px; } .pm-lightbox__nav--next { right: 14px; }
.pm-lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-size: 13px; }

/* ---------- search page ---------- */
.pm-search--page { max-width: 640px; margin: 0 0 20px; }

/* product subpages (info pages like «Видео»): content first on narrow screens, embeds fit the column */
@media (max-width: 1023px) { .pm-product--page .pm-product__info { order: -1; } .pm-product--page .pm-product__gallery { margin-top: 24px; } }
.pm-product--page .pm-prose iframe, .pm-product--page .pm-prose video, .pm-ptab__page iframe, .pm-ptab__page video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-l); }

/* ---- product code «Код» (critical for the call centre): highlighted badge on the product page, click = copy;
        the same code on every SKU (size rows, chips), in the cart, the order page and the success page ---- */
.pm-code { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border: 1px solid #A9D3D0; border-radius: var(--r); background: var(--accent-tint); color: var(--ink); font: inherit; line-height: 1; cursor: pointer; transition: background var(--t), border-color var(--t); }
.pm-code[hidden] { display: none; }
.pm-code:hover { background: #D3EAE8; border-color: var(--accent); }
.pm-code:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pm-code__l { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.pm-code__v { font-size: 17px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; -webkit-user-select: all; user-select: all; }
.pm-code__i { color: var(--accent); }
.pm-code__i--ok, .pm-code.is-copied .pm-code__i--copy { display: none; }
.pm-code.is-copied .pm-code__i--ok { display: inline-block; }
.pm-sku-code b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.pm-sku-code--block { display: block; margin-top: 2px; }
.pm-szrow__main, .pm-szrow__side { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.25; }
.pm-szrow__side { align-items: flex-end; text-align: right; }
.pm-szrow__code { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pm-szrow.is-on .pm-szrow__code b, .pm-skuchip--price.is-on .pm-skuchip__code b { color: var(--accent); }
.pm-skuchip--price .pm-skuchip__code { margin-top: 1px; }
/* narrow phones: «Купити» with the price under it, no cart icon */
@media (max-width: 400px) {
  .pm-buy__btn { flex-direction: column; gap: 2px; }
  .pm-buy__btn > .pm-i { display: none; }
  .pm-buy__btnprice::before { content: none; }
  .pm-buy__btnprice { font-size: 13px; font-weight: 500; opacity: .9; }
}
