/* =========================================================
   Celena Commerce theme — main stylesheet
   Светлая магазинная тема. Все классы префиксованы .cm-
   ========================================================= */

:root {
  --cm-bg:               #f4f4f4;
  --cm-surface:          #ffffff;
  --cm-surface-alt:      #fafafa;
  --cm-text:             #1d1d1f;
  --cm-text-muted:       #707378;
  --cm-text-soft:        #a0a3a8;
  --cm-border:           #e8e8e8;
  --cm-border-strong:    #d6d6d6;

  --cm-accent:           #0095e0;
  --cm-accent-hover:     #00aff0;
  --cm-accent-soft:      #e0f4fb;
  --cm-warn:             #ff6b00;
  --cm-warn-soft:        #ffe6cc;
  --cm-danger:           #e02020;
  --cm-purple:           #6f5cf2;
  --cm-purple-soft:      #ede9fe;
  --cm-yellow:           #ffe168;
  --cm-yellow-strong:    #ffd540;

  --cm-radius:           12px;
  --cm-radius-sm:        8px;
  --cm-radius-lg:        18px;
  --cm-radius-pill:      999px;

  --cm-shadow:           0 2px 8px rgba(15, 18, 25, .05);
  --cm-shadow-hover:     0 16px 36px rgba(15, 18, 25, .12);
  --cm-shadow-soft:      0 1px 3px rgba(0, 0, 0, .04);

  --cm-font:             'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --cm-content-max:      1680px;
  --cm-gutter:           28px;

  --cm-z-header:         100;
  --cm-z-overlay:        500;
  --cm-z-hover:          30;
  --cm-z-modal:          1000;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.cm-body {
  margin: 0;
  font-family: var(--cm-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--cm-text);
  background: var(--cm-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img,
svg {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

a:hover {
  color: var(--cm-accent);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

.cm-container {
  width: 100%;
  max-width: var(--cm-content-max);
  margin: 0 auto;
  padding: 0 var(--cm-gutter);
}

.cm-main {
  display: block;
  padding-bottom: 32px;
}

/* ---------- Buttons ---------- */

.cm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--cm-radius-pill);
  background: var(--cm-surface);
  color: var(--cm-text);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  cursor: pointer;
}

.cm-btn--primary {
  background: var(--cm-accent);
  color: #fff;
}

.cm-btn--primary:hover {
  background: var(--cm-accent-hover);
  color: #fff;
}

.cm-btn--ghost {
  background: var(--cm-surface);
  border-color: var(--cm-border-strong);
  color: var(--cm-text);
}

.cm-btn--ghost:hover {
  background: var(--cm-bg);
  border-color: var(--cm-text-muted);
  color: var(--cm-text);
}

.cm-btn--lg {
  padding: 14px 28px;
  font-size: 14px;
}

.cm-btn--block {
  width: 100%;
}

/* ---------- Topbar ---------- */

.cm-topbar {
  background: #1d1d1f;
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
}

.cm-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  gap: 16px;
}

.cm-topbar-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cm-topbar-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cm-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s;
  cursor: pointer;
}

.cm-topbar-link:hover {
  color: #fff;
}

.cm-topbar-link--icon {
  color: rgba(255, 255, 255, .9);
  font-weight: 600;
}

@media (max-width: 880px) {
  .cm-topbar-nav { display: none; }
  .cm-topbar-inner { justify-content: flex-end; }
}

/* ---------- Header ---------- */

.cm-header {
  position: sticky;
  top: 0;
  z-index: var(--cm-z-header);
  background: var(--cm-surface);
  border-bottom: 1px solid var(--cm-border);
}

.cm-header-inner {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.cm-logo {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--cm-accent);
}

.cm-logo:hover {
  color: var(--cm-accent);
}

.cm-logo-text::after {
  content: '.';
  color: var(--cm-warn);
}

.cm-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--cm-radius-sm);
  background: var(--cm-accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s;
}

.cm-catalog-btn:hover {
  background: var(--cm-accent-hover);
}

.cm-catalog-btn[aria-expanded="true"] {
  background: var(--cm-accent-hover);
}

.cm-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 720px;
  background: var(--cm-bg);
  border: 1px solid transparent;
  border-radius: var(--cm-radius-sm);
  transition: border-color .15s, background .15s;
}

.cm-search:focus-within {
  background: var(--cm-surface);
  border-color: var(--cm-accent);
}

.cm-search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--cm-text);
  outline: none;
}

.cm-search-input::placeholder {
  color: var(--cm-text-soft);
}

.cm-search-submit {
  flex-shrink: 0;
  width: 48px;
  height: 44px;
  border: 0;
  border-radius: var(--cm-radius-sm);
  background: var(--cm-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.cm-search-submit:hover {
  background: var(--cm-accent-hover);
}

.cm-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cm-icon-link {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: var(--cm-radius-sm);
  color: var(--cm-text);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  min-width: 64px;
  transition: color .15s, background .15s;
}

.cm-icon-link:hover {
  color: var(--cm-accent);
  background: var(--cm-bg);
}

.cm-icon-link__ico {
  position: relative;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
}

.cm-icon-link__label {
  white-space: nowrap;
  font-size: 11px;
  color: var(--cm-text-muted);
}

.cm-icon-link__badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--cm-radius-pill);
  background: var(--cm-warn);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.cm-icon-link__badge--accent {
  background: var(--cm-warn);
}

.cm-icon-link--cart .cm-icon-link__ico {
  color: var(--cm-accent);
}

.cm-icon-link__total {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--cm-accent);
  white-space: nowrap;
  margin-top: -2px;
}

.cm-icon-link__total[hidden] { display: none; }

/* ---------- Cart mini (dropdown в шапке) ---------- */

.cm-cart-mini {
  position: relative;
}

.cm-cart-mini__pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 360px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  box-shadow: 0 16px 40px rgba(15, 18, 25, .15);
  padding: 14px;
  z-index: 200;
  animation: cm-fade-down .15s ease-out;
}

.cm-cart-mini__pop[hidden] { display: none; }

.cm-cart-mini__head {
  font-size: 13px;
  color: var(--cm-text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cm-border);
  margin-bottom: 10px;
}

.cm-cart-mini__head b { color: var(--cm-text); }

.cm-cart-mini__list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cm-cart-mini__list::-webkit-scrollbar { width: 4px; }
.cm-cart-mini__list::-webkit-scrollbar-thumb { background: var(--cm-border); border-radius: 2px; }

.cm-cart-mini__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cm-cart-mini__img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--cm-radius-sm);
  background: var(--cm-surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-cart-mini__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-cart-mini__body {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cm-cart-mini__title {
  font-weight: 600;
  color: var(--cm-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.cm-cart-mini__body small {
  color: var(--cm-text-muted);
  font-size: 11px;
}

.cm-cart-mini__line {
  font-size: 11px;
  color: var(--cm-text-muted);
}

.cm-cart-mini__line b {
  color: var(--cm-text);
  font-weight: 700;
}

.cm-cart-mini__rm {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--cm-bg);
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.cm-cart-mini__rm:hover {
  background: var(--cm-danger);
  color: #fff;
}

.cm-cart-mini__more {
  text-align: center;
  font-size: 12px;
  color: var(--cm-text-muted);
  padding: 4px;
}

.cm-cart-mini__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--cm-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}

.cm-cart-mini__total b {
  font-size: 20px;
  font-weight: 800;
  color: var(--cm-text);
}

.cm-cart-mini__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cm-cart-mini__empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--cm-text-muted);
  font-size: 13px;
}

.cm-cart-mini__empty p { margin: 0; }

@media (max-width: 600px) {
  .cm-cart-mini__pop {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: var(--cm-radius) var(--cm-radius) 0 0;
  }
}

/* ---------- Toast: уведомление о добавлении в корзину ---------- */

.cm-toasts {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 100%;
}

.cm-toast {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas:
    "check img body close"
    "check img actions actions";
  align-items: center;
  gap: 12px;
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 14px 16px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  box-shadow: 0 12px 32px rgba(15, 18, 25, .18);
  border-left: 4px solid var(--cm-accent);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.cm-toast.is-show {
  transform: translateX(0);
  opacity: 1;
}

.cm-toast__check {
  grid-area: check;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cm-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cm-toast__img {
  grid-area: img;
  width: 48px;
  height: 48px;
  border-radius: var(--cm-radius-sm);
  background: var(--cm-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-text-soft);
}

.cm-toast__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-toast__body {
  grid-area: body;
  min-width: 0;
}

.cm-toast__head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  color: var(--cm-accent);
  margin-bottom: 2px;
}

.cm-toast__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.cm-toast__body small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--cm-text-muted);
}

.cm-toast__close {
  grid-area: close;
  align-self: flex-start;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--cm-text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}

.cm-toast__close:hover {
  background: var(--cm-bg);
  color: var(--cm-text);
}

.cm-toast__actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.cm-toast__actions .cm-btn {
  height: 32px;
  font-size: 12px;
  padding: 0 12px;
}

@media (max-width: 600px) {
  .cm-toasts { top: auto; bottom: 16px; right: 16px; left: 16px; }
  .cm-toast { width: 100%; }
}

/* Скрываем стандартный shop.js toast в commerce-теме —
   используем свой, более заметный сверху-справа. */
.shop-toast { display: none !important; }

/* ---------- Catalog dropdown panel ---------- */

.cm-catalog-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--cm-surface);
  border-bottom: 1px solid var(--cm-border);
  box-shadow: var(--cm-shadow);
  overflow: hidden;
  animation: cm-fade-down .18s ease-out;
}

.cm-catalog-panel[hidden] {
  display: none;
}

.cm-catalog-panel__inner {
  padding: 24px var(--cm-gutter);
}

.cm-catalog-panel__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 24px;
}

.cm-catalog-panel__list a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--cm-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--cm-text);
  transition: background .12s, color .12s;
}

.cm-catalog-panel__list a:hover {
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
}

@keyframes cm-fade-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Categories tile row ---------- */

.cm-cats {
  position: relative;
  margin-top: 20px;
}

.cm-cats-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.cm-cats-row::-webkit-scrollbar { display: none; }

.cm-cat-tile {
  flex: 0 0 auto;
  width: 200px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  color: var(--cm-text);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  min-height: 86px;
  scroll-snap-align: start;
  border: 1px solid transparent;
}

.cm-cat-tile:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  color: var(--cm-text);
  transform: translateY(-3px);
  border-color: rgba(0, 0, 0, 0.05);
}
.cm-cat-tile:hover .cm-cat-tile__ico { transform: scale(1.06); }

.cm-cat-tile__ico {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--cm-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
}

.cm-cat-tile__ico svg {
  width: 36px;
  height: 36px;
  stroke-width: 2;
}

.cm-cat-tile__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--cm-text);
}

/* Палитра — каждой плитке свой тон, циклично через nth-child. */
.cm-cat-tile:nth-child(7n+1) .cm-cat-tile__ico { background: #e8f0ff; color: #2563eb; }
.cm-cat-tile:nth-child(7n+2) .cm-cat-tile__ico { background: #ffeaea; color: #dc2626; }
.cm-cat-tile:nth-child(7n+3) .cm-cat-tile__ico { background: #fff4d6; color: #d97706; }
.cm-cat-tile:nth-child(7n+4) .cm-cat-tile__ico { background: #e6f9ee; color: #15803d; }
.cm-cat-tile:nth-child(7n+5) .cm-cat-tile__ico { background: #f3e8ff; color: #7c3aed; }
.cm-cat-tile:nth-child(7n+6) .cm-cat-tile__ico { background: #fde7f3; color: #db2777; }
.cm-cat-tile:nth-child(7n+7) .cm-cat-tile__ico { background: #d8f5f2; color: #0d9488; }

.cm-cats__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--cm-surface);
  color: var(--cm-text);
  box-shadow: var(--cm-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: background .15s, color .15s;
}

.cm-cats__arrow:hover {
  background: var(--cm-accent);
  color: #fff;
}

.cm-cats__arrow--prev { left: -8px; }
.cm-cats__arrow--next { right: -8px; }

.cm-cats__arrow[hidden] { display: none; }

/* ---------- Hero row (slider + weekend) ---------- */

.cm-hero-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  margin-top: 16px;
}

.cm-hero {
  position: relative;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  overflow: hidden;
  min-height: 320px;
}

.cm-hero__viewport {
  position: relative;
  height: 320px;
}

.cm-hero__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.cm-hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 36px 48px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s;
}

.cm-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .45s ease;
}

.cm-hero__slide--lime    { background: linear-gradient(135deg, #d8f5b9, #a9e57b); }
.cm-hero__slide--green   { background: linear-gradient(135deg, #0095e0, #035a89); color: #fff; }
.cm-hero__slide--peach   { background: linear-gradient(135deg, #ffd0bd, #ffa379); }
.cm-hero__slide--mint    { background: linear-gradient(135deg, #cdeede, #91d6b3); }

.cm-hero__text {
  position: relative;
  z-index: 2;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.cm-hero__kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(0, 0, 0, .55);
}

.cm-hero__slide--green .cm-hero__kicker {
  color: rgba(255, 255, 255, .85);
}

.cm-hero__title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: inherit;
}

.cm-hero__title-strike {
  display: inline-block;
  margin-left: 6px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
}

.cm-hero__title-accent {
  color: var(--cm-warn);
  font-weight: 800;
}

.cm-hero__sub {
  font-size: 14px;
  color: rgba(0, 0, 0, .65);
  font-weight: 600;
}

.cm-hero__slide--green .cm-hero__sub {
  color: rgba(255, 255, 255, .9);
}

.cm-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 10px 18px;
  background: var(--cm-text);
  color: #fff;
  border-radius: var(--cm-radius-pill);
  font-weight: 600;
  font-size: 13px;
  transition: background .15s;
}

.cm-hero__cta:hover {
  background: #000;
  color: #fff;
}

.cm-hero__pricecard {
  position: absolute;
  right: 36px;
  top: 36px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 14px 18px;
  box-shadow: var(--cm-shadow);
  text-align: right;
  z-index: 2;
}

.cm-hero__pricecard-old {
  font-size: 13px;
  color: var(--cm-text-muted);
  text-decoration: line-through;
}

.cm-hero__pricecard-new {
  font-size: 22px;
  font-weight: 800;
  color: var(--cm-text);
}

.cm-hero__shape {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.cm-hero__shape--vacuum   { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23066b2c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><circle cx='80' cy='160' r='30'/><circle cx='80' cy='160' r='10'/><path d='M80 130V60a18 18 0 0 1 18-18h60'/><rect x='150' y='30' width='30' height='24' rx='4'/></svg>"); }
.cm-hero__shape--scooter  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><circle cx='50' cy='160' r='22'/><circle cx='160' cy='160' r='22'/><path d='M50 160l50-90h60'/><line x1='160' y1='40' x2='160' y2='150'/></svg>"); }
.cm-hero__shape--phone    { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23842c00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><rect x='70' y='30' width='80' height='150' rx='14'/><line x1='90' y1='44' x2='130' y2='44'/></svg>"); }
.cm-hero__shape--phones   { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%231d6b3e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><rect x='40' y='40' width='60' height='130' rx='10'/><rect x='110' y='30' width='60' height='130' rx='10'/></svg>"); }

/* Фотослайд: картинка товара = фон всего слайда. */
.cm-hero__slide:has(.cm-hero__shape--photo img) {
  position: relative;
}
.cm-hero__shape--photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
}
.cm-hero__shape--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Затемняющий градиент слева — чтобы заголовок и кнопка хорошо читались поверх любой фотки. */
.cm-hero__shape--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 35%,
    rgba(0, 0, 0, 0.05) 65%,
    rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
/* Текст и pricecard поверх фото. */
.cm-hero__slide:has(.cm-hero__shape--photo) .cm-hero__text,
.cm-hero__slide:has(.cm-hero__shape--photo) .cm-hero__pricecard {
  position: relative;
  z-index: 2;
}
.cm-hero__slide:has(.cm-hero__shape--photo) .cm-hero__title,
.cm-hero__slide:has(.cm-hero__shape--photo) .cm-hero__kicker,
.cm-hero__slide:has(.cm-hero__shape--photo) .cm-hero__sub {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.cm-hero__slide:has(.cm-hero__shape--photo) .cm-hero__cta {
  background: var(--cm-surface);
  color: #1d1d1f;
}

.cm-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: var(--cm-text);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--cm-shadow);
  transition: background .15s, color .15s;
}

.cm-hero__arrow:hover {
  background: var(--cm-surface);
  color: var(--cm-accent);
}

.cm-hero__arrow--prev { left: 12px; }
.cm-hero__arrow--next { right: 12px; }

.cm-hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.cm-hero__dot {
  width: 24px;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(0, 0, 0, .25);
  padding: 0;
  cursor: pointer;
  transition: background .2s, width .2s;
}

.cm-hero__dot.is-active {
  background: var(--cm-text);
  width: 36px;
}

/* Weekend product card on the right */

.cm-weekend {
  background: linear-gradient(180deg, #ecf6e8 0%, #f9fbf6 100%);
  border-radius: var(--cm-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.cm-weekend__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cm-weekend__timer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.cm-weekend__cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 32px;
}

.cm-weekend__cell b {
  font-size: 16px;
  color: var(--cm-text);
}

.cm-weekend__cell i {
  font-size: 9px;
  color: var(--cm-text-muted);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cm-weekend__sep {
  font-size: 16px;
  font-weight: 700;
  color: var(--cm-text-muted);
}

.cm-weekend__product {
  position: relative;
  display: block;
  padding: 12px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
}

.cm-weekend__discount {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--cm-warn);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--cm-radius-sm);
}

.cm-weekend__img {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-text-soft);
  margin-bottom: 6px;
}

.cm-weekend__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.cm-weekend__rating {
  font-size: 11px;
  color: var(--cm-text-muted);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cm-weekend .cm-product-prices {
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .cm-hero-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .cm-hero__viewport { height: 240px; }
  .cm-hero__slide { padding: 20px; }
  .cm-hero__title { font-size: 22px; }
  .cm-hero__pricecard { right: 16px; top: 16px; padding: 8px 12px; }
  .cm-hero__pricecard-new { font-size: 16px; }
}

/* ---------- Promo pill row (4 чипа под hero) ---------- */

.cm-promo-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.cm-promo-row--big {
  grid-template-columns: repeat(3, 1fr);
}

.cm-promo-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--cm-text);
  transition: box-shadow .15s, transform .15s, color .15s;
}

.cm-promo-pill:hover {
  box-shadow: var(--cm-shadow);
  transform: translateY(-1px);
  color: var(--cm-text);
}

.cm-promo-pill__ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
}

.cm-promo-pill__ico--blue   { background: linear-gradient(135deg, #2196f3, #1976d2); }
.cm-promo-pill__ico--orange { background: linear-gradient(135deg, #ff9800, #f57c00); }
.cm-promo-pill__ico--red    { background: linear-gradient(135deg, var(--cm-danger), #b71c1c); }
.cm-promo-pill__ico--violet { background: linear-gradient(135deg, var(--cm-purple), #4527a0); }

.cm-promo-pill__text {
  line-height: 1.2;
}

.cm-promo-pill__text small {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: var(--cm-radius-sm);
  background: var(--cm-warn);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}

@media (max-width: 1024px) {
  .cm-promo-row { grid-template-columns: repeat(2, 1fr); }
  .cm-promo-row--big { grid-template-columns: 1fr; }
}

/* ---------- Section header & layout ---------- */

.cm-section {
  margin-top: 32px;
}

.cm-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cm-section__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-section__more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--cm-text-muted);
  font-weight: 500;
}

.cm-section__more:hover {
  color: var(--cm-accent);
}

.cm-section__lead {
  margin: -8px 0 16px;
  color: var(--cm-text-muted);
  max-width: 780px;
}

.cm-section__crown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--cm-warn);
  color: #fff;
  border-radius: var(--cm-radius-sm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.cm-section__crown svg {
  fill: #fff;
}

.cm-section__more-row {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.cm-section--best {
  background: var(--cm-warn-soft);
  padding: 18px;
  border-radius: var(--cm-radius);
}

.cm-section--best .cm-section__head { margin-bottom: 12px; }

/* ---------- Carousel (horizontal scroll) ---------- */

.cm-carousel {
  position: relative;
  /* Чтобы hover-панель карточки могла визуально вылезать поверх стрелок */
  overflow: visible;
}

.cm-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 8px 4px;
  /* Дополнительный воздух снизу/сверху, чтобы hover-панель не клипалась горизонтальным скроллом */
  margin: -8px -4px;
}

.cm-carousel__track::-webkit-scrollbar { display: none; }

.cm-carousel__track > .cm-product {
  scroll-snap-align: start;
}

.cm-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--cm-surface);
  color: var(--cm-text);
  box-shadow: var(--cm-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: background .15s, color .15s, opacity .15s;
}

.cm-carousel__arrow:hover {
  background: var(--cm-accent);
  color: #fff;
}

.cm-carousel__arrow--prev { left: -12px; }
.cm-carousel__arrow--next { right: -12px; }

.cm-carousel__arrow[hidden] { display: none; }

@media (max-width: 1280px) {
  .cm-carousel__track { grid-auto-columns: minmax(200px, 220px); }
}

/* ---------- Grid (responsive product grid) ---------- */

.cm-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}

.cm-grid--viewed {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1440px) { .cm-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .cm-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .cm-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Product card ---------- */

.cm-product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 16px;
  transition: box-shadow .2s, transform .2s;
  min-height: 420px;
}

.cm-product:hover {
  box-shadow: var(--cm-shadow);
}

.cm-product-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.cm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--cm-radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
}

.cm-badge--crown {
  background: var(--cm-warn);
  color: #fff;
}

.cm-badge--discount {
  background: var(--cm-danger);
  color: #fff;
}

.cm-badge--purple {
  background: var(--cm-purple);
  color: #fff;
}

.cm-badge--delivery1 {
  background: var(--cm-warn);
  color: #fff;
}

.cm-product-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.cm-product-actions--hover {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 6;
}

.cm-product-act {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--cm-bg);
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}

.cm-product-act:hover {
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
}

.cm-product-act.is-active {
  color: var(--cm-danger);
}

/* Товар уже в избранном — заливаем сердечко (только кнопку «обране», не «порівняння»). */
.cm-product-act[data-cm-fav].is-active svg {
  fill: currentColor;
}

.cm-product-image {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--cm-radius-sm);
  overflow: hidden;
  background: var(--cm-surface);
  margin: -16px -16px 12px; /* фото на всю ширину карточки, без внутреннего отступа */
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.cm-product-image__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}

.cm-product:hover .cm-product-image__img {
  transform: scale(1.04);
}

.cm-product-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-text-soft);
}

.cm-product-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cm-product-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cm-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.cm-product-title a {
  color: inherit;
}

.cm-product-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f5b400;
  font-weight: 700;
}

.cm-stars svg { color: #f5b400; }
.cm-stars > span { color: var(--cm-text); }

.cm-product-reviews {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cm-text-muted);
}

.cm-product-delivery {
  margin-top: 2px;
}

.cm-delivery-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--cm-warn);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}

.cm-delivery-pill--solid {
  background: var(--cm-warn);
}

.cm-delivery-pill__sup {
  font-size: 9px;
  vertical-align: super;
}

.cm-product-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.cm-price-old {
  color: var(--cm-text-soft);
  text-decoration: line-through;
  font-size: 13px;
}

.cm-price-now {
  font-size: 22px;
  font-weight: 800;
  color: var(--cm-text);
  line-height: 1;
}

.cm-price-now--lg { font-size: 26px; }

.cm-product-prices--big .cm-price-now-big {
  font-size: 30px;
  font-weight: 800;
  color: var(--cm-text);
  line-height: 1;
}

.cm-price-old-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.cm-price-discount {
  background: var(--cm-warn);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--cm-radius-sm);
}

.cm-product-bonus {
  display: none; /* removed by design */
}

.cm-bonus-ico {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  color: var(--cm-warn);
}

.cm-product-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.cm-product-buy .cm-product-prices {
  flex: 1;
  min-width: 0;
}

.cm-btn-cart {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--cm-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
  box-shadow: 0 2px 8px rgba(0, 149, 224, .25);
}

.cm-btn-cart:hover {
  background: var(--cm-accent-hover);
  transform: scale(1.05);
}

.cm-btn-cart--mini {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 30px;
  height: 30px;
}

/* ---------- Product hover panel ----------
   Используем position: fixed, чтобы панель не клиппалась горизонтальным
   overflow каруселей и сеток. JS вычисляет top/left относительно viewport
   и центрирует панель по карточке (с edge-clamp у краёв экрана).
   Видимостью управляет CSS через :hover родительской .cm-product — так
   срабатывает и при наведении мышью на саму панель (она остаётся потомком). */

.cm-product-hover {
  position: fixed;
  /* По умолчанию — увозим за viewport. JS (positionHover) пересчитает top/left
     при mouseover на родительскую карточку. Так без JS панель никогда не «мелькает»
     в углу экрана, даже если listener ещё не успел отработать первый hover. */
  top: -9999px;
  left: -9999px;
  width: 360px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  box-shadow: 0 24px 56px rgba(15, 18, 25, .18);
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  z-index: 200;
  pointer-events: none;
}

.cm-product:hover .cm-product-hover,
.cm-product-hover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease;
}

.cm-product-hover__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cm-product-hover__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-right: 80px; /* место под cm-product-actions--hover */
}

.cm-product-hover__code {
  font-size: 11px;
  color: var(--cm-text-muted);
}

.cm-product-hover__code b {
  color: var(--cm-text);
  font-weight: 600;
}

.cm-product-hover__image {
  position: relative;
  display: block;
  height: 280px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius-sm);
  overflow: hidden;
  margin: 0 -18px; /* картинка во всю ширину hover-панели, без боковых отступов */
}

.cm-product-hover__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-product-hover__nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: -2px;
}

.cm-product-hover__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cm-border-strong);
  display: inline-block;
}

.cm-product-hover__dot.is-active {
  background: var(--cm-accent);
}

.cm-product-hover__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--cm-text);
  line-height: 1.3;
  margin-top: 6px;
}

.cm-product-hover__title .cm-product-badges {
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  margin-bottom: 8px;
  align-items: center;
  gap: 8px;
}

.cm-product-installment {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
  font-size: 12px;
  color: var(--cm-text);
}

.cm-installment-ico {
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cm-product-installment b {
  color: var(--cm-text);
  font-weight: 700;
}

.cm-product-specs {
  font-size: 12px;
  color: var(--cm-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cm-product-specs--list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-product-specs--list li {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--cm-text-muted);
  padding: 4px 0;
  border-bottom: 1px dashed var(--cm-border);
}

.cm-product-specs--list li:last-child { border-bottom: 0; }

.cm-product-specs--list li b {
  color: var(--cm-text);
  font-weight: 600;
  text-align: right;
  margin-left: 12px;
}

.cm-product-hover__actions {
  margin-top: 4px;
}

/* На очень узких viewport панель сужается, чтобы не вылезала */
@media (max-width: 480px) {
  .cm-product-hover {
    width: calc(100vw - 32px);
    left: 50%;
  }
}

/* ---------- Promo banners (большие) ---------- */

.cm-promo {
  position: relative;
  display: block;
  border-radius: var(--cm-radius);
  padding: 24px;
  min-height: 180px;
  color: var(--cm-text);
  overflow: hidden;
  isolation: isolate;
  transition: transform .2s, box-shadow .2s;
}

.cm-promo:hover {
  transform: translateY(-2px);
  box-shadow: var(--cm-shadow-hover);
}

.cm-promo--peach   { background: linear-gradient(135deg, #ffd6c0, #ff9a73); }
.cm-promo--coral   { background: linear-gradient(135deg, #ff7a65, #b53b2c); color: #fff; }
.cm-promo--graphite{ background: linear-gradient(135deg, #2c2f3a, #14161e); color: #fff; }
.cm-promo--emerald { background: linear-gradient(135deg, #0095e0, #035a89); color: #fff; }
.cm-promo--sky     { background: linear-gradient(135deg, #cfe9ff, #6ab9f1); }

.cm-promo__text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 60%;
}

.cm-promo__kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .65;
}

.cm-promo__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.cm-promo__sub {
  font-size: 13px;
  opacity: .85;
}

.cm-promo__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, .85);
  color: #fff;
  border-radius: var(--cm-radius-pill);
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
}

.cm-promo__shape {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 60%;
  height: 80%;
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  opacity: .85;
}

.cm-promo__shape--gadgets { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23842c00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><circle cx='90' cy='90' r='40'/><circle cx='90' cy='90' r='14'/><rect x='140' y='80' width='40' height='60' rx='6'/></svg>"); }
.cm-promo__shape--tv      { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><rect x='30' y='40' width='140' height='90' rx='6'/><line x1='80' y1='150' x2='120' y2='150'/></svg>"); }
.cm-promo__shape--gaming  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M40 80h120a25 25 0 0 1 25 25v15a20 20 0 0 1-35 13l-10-15H60l-10 15a20 20 0 0 1-35-13v-15A25 25 0 0 1 40 80z'/><circle cx='75' cy='105' r='6'/><circle cx='130' cy='100' r='4'/><circle cx='145' cy='115' r='4'/></svg>"); }

/* ---------- About / читать полностью ---------- */

.cm-about {
  margin-top: 32px;
  padding: 24px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
}

.cm-about__title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--cm-text);
}

.cm-about__lead {
  font-size: 13px;
  line-height: 1.6;
  color: var(--cm-text);
  margin-bottom: 12px;
}

.cm-about__more {
  margin-bottom: 12px;
}

.cm-about__more summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
  list-style: none;
  text-decoration: underline;
  text-decoration-color: var(--cm-border);
  text-underline-offset: 4px;
}

.cm-about__more summary::-webkit-details-marker { display: none; }

.cm-about__more-body {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cm-text-muted);
}

.cm-about__readmore {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cm-text-muted);
  border-bottom: 1px solid var(--cm-border-strong);
  padding-bottom: 2px;
}

/* ---------- App bar (QR) ---------- */

.cm-app-bar {
  margin-top: 32px;
  background: var(--cm-accent);
  color: #fff;
  padding: 12px 0;
  position: relative;
  overflow: hidden;
}

.cm-app-bar__inner {
  display: grid;
  grid-template-columns: 160px 1fr 140px;
  gap: 24px;
  align-items: center;
  min-height: 140px;
}

.cm-app-bar__phone {
  color: rgba(255, 255, 255, .7);
}

.cm-app-bar__text h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
}

.cm-app-bar__text p {
  font-size: 13px;
  opacity: .85;
  margin: 0 0 12px;
}

.cm-app-bar__stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cm-store-badge {
  display: inline-flex;
  flex-direction: column;
  padding: 8px 16px;
  background: rgba(0, 0, 0, .85);
  color: #fff;
  border-radius: var(--cm-radius-sm);
  text-align: left;
  line-height: 1.1;
  transition: background .15s;
}

.cm-store-badge:hover {
  background: #000;
  color: #fff;
}

.cm-store-badge__sub {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .7;
}

.cm-store-badge__main {
  font-size: 16px;
  font-weight: 700;
}

.cm-app-bar__qr {
  display: flex;
  justify-content: flex-end;
}

.cm-qr-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  background: var(--cm-surface);
  background-image:
    repeating-linear-gradient(0deg,  #1d1d1f 0 6px, transparent 6px 14px),
    repeating-linear-gradient(90deg, #1d1d1f 0 6px, transparent 6px 14px);
  background-size: 100% 100%;
  background-blend-mode: multiply;
  border: 6px solid #fff;
  box-shadow: inset 0 0 0 2px #1d1d1f;
}

@media (max-width: 768px) {
  .cm-app-bar__inner { grid-template-columns: 1fr; text-align: center; }
  .cm-app-bar__stores { justify-content: center; }
  .cm-app-bar__phone { display: none; }
}

/* ---------- Footer ---------- */

.cm-footer {
  margin-top: 32px;
  padding: 32px 0 0;
  background: var(--cm-surface);
  border-top: 1px solid var(--cm-border);
}

.cm-footer-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cm-border);
}

.cm-footer-info__col {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cm-footer-info__ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-accent);
}

.cm-footer-info__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--cm-text);
}

.cm-footer-info__col p {
  font-size: 12px;
  color: var(--cm-text-muted);
  line-height: 1.45;
}

.cm-footer-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1.2fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--cm-border);
}

.cm-footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--cm-text);
}

.cm-footer-col ul li {
  margin-bottom: 6px;
}

.cm-footer-col ul li a {
  font-size: 12px;
  color: var(--cm-text-muted);
  transition: color .15s;
}

.cm-footer-col ul li a:hover {
  color: var(--cm-accent);
}

.cm-footer-col--newsletter p {
  font-size: 12px;
  color: var(--cm-text-muted);
  margin-bottom: 12px;
}

.cm-footer-col--contacts {
  text-align: left;
}

.cm-footer-phone {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--cm-text);
  margin-bottom: 4px;
}

.cm-footer-phone-note {
  font-size: 11px;
  color: var(--cm-text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.cm-footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-footer-contacts li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-footer-contacts li a:hover {
  color: var(--cm-accent);
}

.cm-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--cm-border);
  gap: 16px;
  flex-wrap: wrap;
}

.cm-footer-bottom__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cm-footer-copy {
  font-size: 11px;
  color: var(--cm-text-muted);
}

.cm-footer-payments {
  display: flex;
  gap: 6px;
}

.cm-payment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--cm-bg);
  font-size: 11px;
  font-weight: 800;
  color: var(--cm-text);
  letter-spacing: .04em;
}

.cm-footer-social {
  display: flex;
  gap: 8px;
}

.cm-footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cm-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-text-muted);
  transition: background .15s, color .15s;
}

.cm-footer-social a:hover {
  background: var(--cm-accent);
  color: #fff;
}

.cm-footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 16px 0 32px;
  align-items: center;
}

.cm-tag-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cm-text);
  margin-right: 4px;
}

.cm-tag-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--cm-radius-pill);
  background: var(--cm-bg);
  color: var(--cm-text-muted);
  font-size: 11px;
  transition: background .15s, color .15s;
}

.cm-tag-pill:hover {
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
}

@media (max-width: 1100px) {
  .cm-footer-info { grid-template-columns: repeat(2, 1fr); }
  .cm-footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .cm-footer-info { grid-template-columns: 1fr; }
  .cm-footer-cols { grid-template-columns: repeat(2, 1fr); }
  .cm-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Newsletter ---------- */

.cm-newsletter {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-newsletter__field input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--cm-border-strong);
  border-radius: var(--cm-radius-sm);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, background .15s;
}

.cm-newsletter__field input:focus {
  border-color: var(--cm-accent);
  background: var(--cm-accent-soft);
}

.cm-newsletter__submit {
  align-self: flex-start;
  height: 38px;
  padding: 0 20px;
  font-size: 13px;
}

/* ---------- Quickview modal (заглушка) ---------- */

.cm-quickview {
  position: fixed;
  inset: 0;
  z-index: var(--cm-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-quickview[hidden] { display: none; }

.cm-quickview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 25, .55);
  cursor: pointer;
}

.cm-quickview-inner {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  margin: 16px;
  padding: 24px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius-lg);
  box-shadow: var(--cm-shadow-hover);
  overflow: auto;
}

.cm-quickview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}

.cm-quickview-close:hover {
  background: var(--cm-bg);
  color: var(--cm-text);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
  .cm-product-hover { transition: none !important; }
}

/* ---------- Mobile adjustments for header ---------- */

@media (max-width: 1024px) {
  .cm-header-inner {
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 12px;
  }
  .cm-header-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-around;
  }
  .cm-search { grid-column: 3; }
  .cm-icon-link { min-width: 56px; }
}

@media (max-width: 768px) {
  .cm-header-inner {
    grid-template-columns: auto 1fr auto;
    row-gap: 8px;
  }
  .cm-catalog-btn span { display: none; }
}

/* =========================================================
   Category page (страница категории с фильтрами)
   ========================================================= */

.cm-cat-page {
  padding-top: 16px;
}

/* ---------- Breadcrumbs ---------- */

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

.cm-breadcrumbs a {
  color: var(--cm-text-muted);
  transition: color .15s;
  display: inline-flex;
  align-items: center;
}

.cm-breadcrumbs a:hover {
  color: var(--cm-accent);
}

.cm-breadcrumbs__sep {
  color: var(--cm-text-soft);
  font-size: 12px;
}

.cm-breadcrumbs__current {
  color: var(--cm-text);
  font-weight: 500;
}

/* ---------- Category head ---------- */

.cm-cat-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cm-cat-head__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-cat-head__count {
  font-size: 13px;
  color: var(--cm-text-muted);
}

.cm-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cm-cat-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--cm-radius-pill);
  background: var(--cm-surface);
  color: var(--cm-text);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}

.cm-cat-chip:hover {
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
}

.cm-cat-chip.is-active {
  background: var(--cm-text);
  color: #fff;
}

/* ---------- Toolbar (sort + view) ---------- */

.cm-cat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
}

.cm-sort__group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cm-sort__icon {
  display: inline-flex;
  color: var(--cm-text-muted);
}

.cm-sort__select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  cursor: pointer;
  padding: 8px 28px 8px 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.cm-view-toggle {
  display: inline-flex;
  border-radius: var(--cm-radius-sm);
  background: var(--cm-bg);
  padding: 3px;
  gap: 2px;
}

.cm-view-toggle__btn {
  width: 32px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.cm-view-toggle__btn:hover {
  color: var(--cm-text);
}

.cm-view-toggle__btn.is-active {
  background: var(--cm-surface);
  color: var(--cm-text);
  box-shadow: var(--cm-shadow-soft);
}

/* ---------- Layout sidebar + main ---------- */

.cm-cat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cm-cat-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Filters sidebar ---------- */

.cm-filters {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 4px 0;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.cm-filters::-webkit-scrollbar { width: 6px; }
.cm-filters::-webkit-scrollbar-thumb { background: var(--cm-border); border-radius: 3px; }

.cm-filters__mobile-toggle {
  display: none;
  width: 100%;
  height: 44px;
  border: 0;
  background: var(--cm-bg);
  color: var(--cm-text);
  border-radius: var(--cm-radius);
  font-weight: 600;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 1024px) {
  .cm-filters {
    position: static;
    max-height: none;
  }
  .cm-filters__mobile-toggle {
    display: inline-flex;
    margin: 8px;
    width: calc(100% - 16px);
  }
  .cm-filters__form {
    display: none;
  }
  .cm-filters.is-open .cm-filters__form {
    display: block;
  }
}

.cm-filter-group {
  border-bottom: 1px solid var(--cm-border);
}

.cm-filter-group:last-of-type {
  border-bottom: 0;
}

.cm-filter-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.cm-filter-group__head::-webkit-details-marker { display: none; }

.cm-filter-group[open] .cm-filter-group__head svg {
  transform: rotate(180deg);
}

.cm-filter-group__head svg {
  transition: transform .2s;
  color: var(--cm-text-muted);
}

.cm-filter-group__body {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-filter-group__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  margin: 0 -4px;
  padding: 0 4px;
}

.cm-filter-group__list::-webkit-scrollbar { width: 4px; }
.cm-filter-group__list::-webkit-scrollbar-thumb { background: var(--cm-border); border-radius: 2px; }

.cm-filter-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
  color: var(--cm-text-muted);
  margin-bottom: 4px;
}

.cm-filter-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--cm-text);
  outline: none;
  padding: 0;
}

/* ---------- Filter checkbox item ---------- */

.cm-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--cm-radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--cm-text);
  transition: background .12s;
}

.cm-filter-item:hover {
  background: var(--cm-bg);
}

.cm-filter-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cm-filter-item__check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--cm-border-strong);
  border-radius: 4px;
  background: var(--cm-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}

.cm-filter-item input[type="checkbox"]:checked + .cm-filter-item__check {
  background: var(--cm-accent);
  border-color: var(--cm-accent);
}

.cm-filter-item input[type="checkbox"]:checked + .cm-filter-item__check::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.cm-filter-item input[type="checkbox"]:focus-visible + .cm-filter-item__check {
  box-shadow: 0 0 0 3px var(--cm-accent-soft);
}

.cm-filter-item__text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-filter-item__count {
  font-size: 11px;
  color: var(--cm-text-soft);
  margin-left: 6px;
}

.cm-filter-item.is-hidden { display: none; }

.cm-filter-item__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--cm-border, rgba(0, 0, 0, 0.12));
  margin-right: 6px;
  flex: 0 0 auto;
  display: inline-block;
}

.cm-filter-item__thumb {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--cm-border, rgba(0, 0, 0, 0.12));
  margin-right: 6px;
  flex: 0 0 auto;
}

.cm-spec-img {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--cm-border, rgba(0, 0, 0, 0.12));
  margin-right: 4px;
  vertical-align: middle;
  background: var(--cm-surface-2, #f7f7f9);
}
.cm-spec-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-spec-img + .cm-spec-img { margin-left: 0; }

.cm-cat-intro {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--cm-surface-2, #f7f7f9);
  border-left: 3px solid var(--cm-accent, #2bb673);
  border-radius: 6px;
  color: var(--cm-text, #1d1d1f);
  line-height: 1.55;
  font-size: 14px;
}
.cm-cat-intro p:last-child { margin-bottom: 0; }

/* ---------- Price range ---------- */

.cm-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cm-price-range__field {
  flex: 1;
  position: relative;
}

.cm-price-range__field input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--cm-border-strong);
  border-radius: var(--cm-radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--cm-text);
  outline: none;
  transition: border-color .15s;
  appearance: textfield;
  -moz-appearance: textfield;
}

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

.cm-price-range__field input:focus {
  border-color: var(--cm-accent);
}

.cm-price-range__sep {
  color: var(--cm-text-soft);
}

.cm-price-range__slider {
  position: relative;
  height: 20px;
  margin: 4px 8px;
}

.cm-price-range__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 9px;
  height: 4px;
  background: var(--cm-border);
  border-radius: 2px;
}

.cm-price-range__fill {
  position: absolute;
  top: 9px;
  height: 4px;
  background: var(--cm-accent);
  border-radius: 2px;
}

.cm-price-range__handle {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--cm-accent);
  box-shadow: 0 2px 6px rgba(0, 149, 224, .3);
  cursor: grab;
  transform: translateX(-50%);
  padding: 0;
  touch-action: none;
}

.cm-price-range__handle:active { cursor: grabbing; }

.cm-price-range__hint {
  font-size: 11px;
  color: var(--cm-text-muted);
}

.cm-price-range__hint b {
  color: var(--cm-text);
  font-weight: 600;
}

/* ---------- Filters actions ---------- */

.cm-filters__actions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--cm-border);
  background: var(--cm-surface);
  position: sticky;
  bottom: 0;
}

.cm-filters__reset {
  font-size: 12px;
  color: var(--cm-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cm-filters__reset:hover {
  color: var(--cm-danger);
}

/* ---------- Active filters chips ---------- */

.cm-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.cm-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
  border-radius: var(--cm-radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.cm-active-filter__label {
  color: var(--cm-text-muted);
  font-weight: 500;
}

.cm-active-filter__x {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 149, 224, .15);
  color: var(--cm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}

.cm-active-filter__x:hover {
  background: var(--cm-accent);
  color: #fff;
}

/* ---------- Catalog grid (на странице категории) ---------- */

.cm-grid--catalog {
  /* стандартный cm-grid: 5 → 4 → 3 → 2 — наследуется */
}

@media (min-width: 1441px) {
  .cm-cat-layout .cm-grid--catalog { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1440px) and (min-width: 1101px) {
  .cm-cat-layout .cm-grid--catalog { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Product info (краткие характеристики под ценой) ---------- */

.cm-product-info {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cm-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Mini product card (для слайдера «Кращі товари») ----------
   Минималистичная версия: фото, название, рейтинг, цена. Без hover-панели,
   без кнопки корзины — карточка целиком — ссылка на страницу товара. */

.cm-product-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  color: var(--cm-text);
  transition: box-shadow .15s, transform .15s;
  text-decoration: none;
}

.cm-product-mini:hover {
  box-shadow: var(--cm-shadow);
  transform: translateY(-2px);
  color: var(--cm-text);
}

.cm-product-mini__image {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--cm-surface);
  border-radius: var(--cm-radius-sm);
  overflow: hidden;
  margin: -14px -14px 6px;
}

.cm-product-mini__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}

.cm-product-mini:hover .cm-product-mini__image img {
  transform: scale(1.04);
}

.cm-product-mini__noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-text-soft);
}

.cm-product-mini__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-product-mini__title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cm-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.cm-product-mini__rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-carousel__track--mini {
  grid-auto-columns: minmax(200px, 1fr);
}

/* Селекторы вариаций товара (рендерятся JS внутри hover-панели,
   если у товара есть options/variations) */
.cm-variation-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.cm-variation-options:empty {
  display: none;
}

/* Компактные селекты в основной карточке (не в hover) */
.cm-variation-options--mini {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
  gap: 4px;
}

.cm-variation-options--mini:empty {
  display: none;
}

.cm-variation-options--mini .cm-variation-option {
  font-size: 11px;
  gap: 6px;
}

.cm-variation-options--mini .cm-variation-option__name {
  min-width: 56px;
  font-size: 11px;
}

.cm-variation-options--mini .cm-variation-option__select {
  height: 26px;
  padding: 0 22px 0 8px;
  font-size: 12px;
  font-weight: 500;
  background-color: var(--cm-surface);
}

/* Преимущества — fallback под ценой если нет ни specs, ни short, ни variations */
.cm-product-perks {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-product-perks li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-product-perks li svg {
  color: var(--cm-accent);
  flex-shrink: 0;
}

.cm-variation-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-variation-option__name {
  flex-shrink: 0;
  min-width: 70px;
  color: var(--cm-text-muted);
}

.cm-variation-option__select {
  flex: 1;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--cm-border-strong);
  border-radius: var(--cm-radius-sm);
  background: var(--cm-surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  outline: none;
  transition: border-color .15s;
}

.cm-variation-option__select:focus,
.cm-variation-option__select:hover {
  border-color: var(--cm-accent);
}

/* Сообщение «недоступно» */
.cm-product-out {
  margin: 4px 0 0;
  padding: 6px 10px;
  background: rgba(224, 32, 32, .08);
  color: var(--cm-danger);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--cm-radius-sm);
  text-align: center;
}

.cm-product-out[hidden] {
  display: none;
}

/* Disabled-кнопка корзины */
.cm-btn-cart:disabled,
.cm-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Список характеристик (custom fields) — пары label / value */
.cm-product-specs-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cm-product-specs-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.cm-product-specs-list__label {
  color: var(--cm-text-muted);
  flex-shrink: 0;
}

.cm-product-specs-list__value {
  color: var(--cm-text);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cm-btn-cart__label {
  display: none;
  font-weight: 600;
  font-size: 14px;
  margin-left: 6px;
}

/* ---------- List view (toggle) ---------- */

.cm-grid--catalog.is-list {
  grid-template-columns: 1fr;
}

.cm-grid--catalog.is-list .cm-product {
  flex-direction: row;
  min-height: 0;
  padding: 16px;
  gap: 20px;
}

.cm-grid--catalog.is-list .cm-product-image {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  margin: 0;
  border-radius: var(--cm-radius-sm);
}

.cm-grid--catalog.is-list .cm-product-body {
  flex: 1;
  min-width: 0;
}

.cm-grid--catalog.is-list .cm-product-info {
  -webkit-line-clamp: 5;
  font-size: 13px;
  margin-top: 12px;
}

/* В list-view — характеристики выводятся вверх под рейтингом */
.cm-grid--catalog.is-list .cm-product-buy {
  margin-top: 12px;
}

/* В list-view — кнопка корзины широкая, с текстом */
.cm-grid--catalog.is-list .cm-btn-cart {
  width: auto;
  padding: 0 24px;
  border-radius: var(--cm-radius-pill);
}
.cm-grid--catalog.is-list .cm-btn-cart__label {
  display: inline;
}

/* Бейджи позиционируются от карточки — в list-view сместить их на изображение */
.cm-grid--catalog.is-list .cm-product-badges {
  top: 24px;
  left: 24px;
}
.cm-grid--catalog.is-list .cm-product-actions {
  top: 24px;
  left: auto;
  right: 24px;
  flex-direction: row;
}

/* В list-view — hover-панель отключена полностью */
.cm-grid--catalog.is-list .cm-product-hover {
  display: none !important;
}

/* ---------- Pagination ---------- */

.cm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
  margin-top: 16px;
}

.cm-pagination__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  background: var(--cm-surface);
  color: var(--cm-text);
  border-radius: var(--cm-radius-pill);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, color .15s;
}

.cm-pagination__nav:hover {
  background: var(--cm-accent);
  color: #fff;
}

.cm-pagination__nav.is-disabled {
  background: var(--cm-bg);
  color: var(--cm-text-soft);
  pointer-events: none;
}

.cm-pagination__info {
  font-size: 13px;
  color: var(--cm-text-muted);
}

.cm-pagination__info b {
  color: var(--cm-text);
  font-weight: 700;
}

/* =========================================================
   Search page (страница поиска)
   ========================================================= */

.cm-search-page {
  padding-top: 16px;
}

.cm-search-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.cm-search-head__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-search-head__count {
  font-size: 13px;
  color: var(--cm-text-muted);
}

.cm-search-head__count b {
  color: var(--cm-text);
  font-weight: 700;
}

.cm-search--page {
  max-width: 720px;
  margin: 0 0 24px;
}

.cm-search-tips {
  padding: 24px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  color: var(--cm-text-muted);
  font-size: 14px;
}

/* ---------- Result list ---------- */

.cm-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-search-result {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  color: var(--cm-text);
  transition: box-shadow .15s, transform .15s;
}

.cm-search-result:hover {
  box-shadow: var(--cm-shadow);
}

.cm-search-result__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-indent: -9999px;
  overflow: hidden;
}

.cm-search-result > *:not(.cm-search-result__link) {
  position: relative;
  z-index: 2;
}

.cm-search-result__img {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--cm-radius-sm);
  overflow: hidden;
  background: var(--cm-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-search-result__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-search-result__img-placeholder {
  color: var(--cm-text-soft);
}

.cm-search-result__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-search-result__top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--cm-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cm-search-result__kind {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--cm-bg);
}

.cm-search-result--news    .cm-search-result__kind { background: var(--cm-purple-soft); color: var(--cm-purple); }
.cm-search-result--page    .cm-search-result__kind { background: var(--cm-bg);         color: var(--cm-text-muted); }
.cm-search-result--product .cm-search-result__kind { background: var(--cm-accent-soft); color: var(--cm-accent); }

.cm-search-result__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--cm-text);
  transition: color .15s;
}

.cm-search-result:hover .cm-search-result__title {
  color: var(--cm-accent);
}

.cm-search-result__snippet {
  font-size: 13px;
  color: var(--cm-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.cm-search-result__buy {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cm-search-result__cart {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

@media (max-width: 600px) {
  .cm-search-result {
    flex-direction: column;
  }
  .cm-search-result__img {
    width: 100%;
    height: 180px;
  }
}

/* =========================================================
   Product page (страница товара)
   ========================================================= */

.cm-pp {
  padding-top: 16px;
}

/* ---------- Title + meta ---------- */

.cm-pp-head {
  margin: 16px 0 20px;
}

.cm-pp-head__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0 0 10px;
}

.cm-pp-head__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--cm-text-muted);
}

.cm-pp-head__stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00a046;
  font-weight: 600;
}

.cm-pp-head__stock--out { color: var(--cm-danger); }

.cm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.cm-pp-head__sku b {
  color: var(--cm-text);
  font-weight: 600;
}

/* ---------- Hero: 3-колоночный layout ---------- */

.cm-pp-hero {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1280px) {
  .cm-pp-hero { grid-template-columns: minmax(0, 380px) minmax(0, 1fr) 320px; gap: 16px; }
}

@media (max-width: 1024px) {
  .cm-pp-hero { grid-template-columns: 1fr; }
}

/* ---------- Gallery (sticky) ---------- */

.cm-pp-gallery {
  position: sticky;
  top: 84px;
  align-self: start;
}

.cm-pp-gallery__inner {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  overflow: hidden;
  padding: 8px;
}

.cm-pp-gallery__thumbs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.cm-pp-gallery__thumbs::-webkit-scrollbar { width: 4px; }
.cm-pp-gallery__thumbs::-webkit-scrollbar-thumb { background: var(--cm-border); border-radius: 2px; }

.cm-pp-gallery__thumb {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 4px;
  border: 1.5px solid var(--cm-border);
  border-radius: var(--cm-radius-sm);
  background: var(--cm-surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
  flex-shrink: 0;
}

.cm-pp-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-pp-gallery__thumb:hover { border-color: var(--cm-border-strong); }
.cm-pp-gallery__thumb.is-active { border-color: var(--cm-accent); }

.cm-pp-gallery__main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cm-surface);
  border-radius: var(--cm-radius-sm);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.cm-pp-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.cm-pp-gallery__main:hover .cm-pp-gallery__main-img {
  transform: scale(1.02);
}

.cm-pp-gallery__zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--cm-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--cm-shadow);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}

.cm-pp-gallery__main:hover .cm-pp-gallery__zoom { opacity: 1; }

.cm-pp-gallery__noimg {
  color: var(--cm-text-soft);
}

.cm-pp-gallery__actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

@media (max-width: 1024px) {
  .cm-pp-gallery { position: static; }
}

@media (max-width: 600px) {
  .cm-pp-gallery__inner { grid-template-columns: 1fr; }
  .cm-pp-gallery__thumbs {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    order: 2;
  }
  .cm-pp-gallery__main { order: 1; }
}

/* ---------- Info column (middle) ---------- */

.cm-pp-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cm-pp-info__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
}

.cm-pp-info__brand-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
}

.cm-pp-info__brand-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cm-pp-info__brand-link:hover { color: var(--cm-accent); }

.cm-pp-block {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 16px 20px;
}

.cm-pp-block__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cm-pp-block__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cm-text);
  margin: 0;
}

.cm-pp-block__more {
  margin-left: auto;
  font-size: 12px;
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cm-pp-block__more:hover { color: var(--cm-accent); }

/* Specs list (label .... value) */

.cm-pp-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cm-pp-specs li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--cm-border);
}

.cm-pp-specs li:last-child { border-bottom: 0; }

.cm-pp-specs__label {
  color: var(--cm-text-muted);
  flex-shrink: 0;
}

.cm-pp-specs__dots {
  flex: 1;
  border-bottom: 1px dotted var(--cm-border-strong);
  height: 0;
  margin: 0 6px;
  align-self: flex-end;
  transform: translateY(-4px);
}

.cm-pp-specs__value {
  color: var(--cm-text);
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
  max-width: 60%;
}

.cm-pp-specs--full {
  background: var(--cm-surface);
  padding: 16px 24px;
  border-radius: var(--cm-radius);
}

/* Services */

.cm-pp-services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-pp-service {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
}

.cm-pp-service__ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cm-pp-service__body {
  flex: 1;
  min-width: 0;
}

.cm-pp-service__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  margin-bottom: 2px;
}

.cm-pp-service__desc {
  font-size: 12px;
  color: var(--cm-text-muted);
  line-height: 1.4;
}

.cm-pp-service__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
  flex-shrink: 0;
}

/* Payments */

.cm-pp-payments {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 16px 20px;
}

.cm-pp-payments__title {
  font-size: 13px;
  color: var(--cm-text);
  margin-bottom: 12px;
}

.cm-pp-payments__icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cm-pp-payments__note {
  font-size: 12px;
  color: var(--cm-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Buy box (sticky right) ---------- */

.cm-pp-buy {
  position: sticky;
  top: 84px;
  align-self: start;
}

.cm-pp-buy__inner {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cm-pp-buy__signup {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--cm-yellow);
  border-radius: var(--cm-radius-sm);
  font-size: 12px;
  color: var(--cm-text);
}

.cm-pp-buy__signup-ico {
  flex-shrink: 0;
  color: var(--cm-warn);
}

.cm-pp-buy__signup b {
  font-weight: 700;
}

.cm-pp-buy__prices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-pp-buy__old {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cm-pp-buy__now {
  font-size: 32px;
  font-weight: 800;
  color: var(--cm-text);
  line-height: 1;
}

.cm-pp-buy__bonus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--cm-warn);
  font-weight: 600;
}

.cm-pp-buy__cart {
  height: 52px;
  font-size: 16px;
}

.cm-pp-buy__credit {
  font-size: 13px;
  height: 40px;
}

.cm-pp-buy__pay-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--cm-border);
}

/* Платёжные бейджи (используются и в product page, и в footer) */
.cm-pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 44px;
  padding: 0 8px;
  border: 1px solid var(--cm-border);
  border-radius: 4px;
  background: var(--cm-surface);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--cm-text);
}

.cm-pay-badge--visa  { color: #1a1f71; font-style: italic; font-size: 12px; }
.cm-pay-badge--mc    { padding: 0 4px; }
.cm-pay-badge--apple { font-size: 0; padding: 0 6px; }
.cm-pay-badge--gpay  { font-size: 11px; }

.cm-pp-buy__bonus-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--cm-text);
  padding: 8px 10px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
}

.cm-pp-buy__bonus-note b { font-weight: 700; }

/* Delivery */

.cm-pp-delivery {
  padding-top: 8px;
  border-top: 1px solid var(--cm-border);
}

.cm-pp-delivery__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--cm-text);
}

.cm-pp-delivery__city {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--cm-bg);
  border: 0;
  border-radius: var(--cm-radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  cursor: pointer;
  margin-bottom: 12px;
  width: 100%;
  justify-content: flex-start;
}

.cm-pp-delivery__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-pp-delivery__item {
  padding: 8px 0;
  border-bottom: 1px dashed var(--cm-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cm-pp-delivery__item:last-child { border-bottom: 0; }

.cm-pp-delivery__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.cm-pp-delivery__name { color: var(--cm-text); }
.cm-pp-delivery__price { color: var(--cm-accent); font-weight: 600; }
.cm-pp-delivery__date { font-size: 11px; color: var(--cm-text-muted); }

@media (max-width: 1024px) {
  .cm-pp-buy { position: static; }
}

/* ---------- Tabs ---------- */

.cm-pp-tabs {
  display: flex;
  gap: 4px;
  margin: 32px 0 0;
  border-bottom: 2px solid var(--cm-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.cm-pp-tabs::-webkit-scrollbar { display: none; }

.cm-pp-tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

.cm-pp-tab:hover { color: var(--cm-text); }

.cm-pp-tab.is-active {
  color: var(--cm-accent);
  border-bottom-color: var(--cm-accent);
}

/* ---------- Sections ---------- */

.cm-pp-section {
  scroll-margin-top: 80px;
  margin-top: 32px;
}

.cm-pp-section__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0 0 16px;
}

.cm-pp-section__empty {
  padding: 24px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  color: var(--cm-text-muted);
  font-size: 14px;
  margin: 0;
}

.cm-pp-description {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 24px 28px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--cm-text);
}

.cm-pp-description img {
  max-width: 100%;
  height: auto;
  border-radius: var(--cm-radius-sm);
  margin: 12px 0;
}

.cm-pp-description h2,
.cm-pp-description h3 {
  margin: 24px 0 12px;
  color: var(--cm-text);
}

/* ---------- Lightbox для галереи товара ---------- */

.cm-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--cm-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.cm-lightbox[hidden] { display: none; }

.cm-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 25, .9);
  cursor: zoom-out;
}

.cm-lightbox__img {
  position: relative;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  width: auto;
  height: auto;
  object-fit: contain;
  z-index: 2;
  border-radius: var(--cm-radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
  background: var(--cm-surface);
}

.cm-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  cursor: pointer;
  transition: background .15s;
}

.cm-lightbox__close:hover { background: rgba(255, 255, 255, .22); }

.cm-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  cursor: pointer;
  transition: background .15s;
}

.cm-lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
.cm-lightbox__nav--prev { left: 24px; }
.cm-lightbox__nav--next { right: 24px; }

.cm-lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: var(--cm-radius-pill);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 13px;
  z-index: 3;
}

/* ---------- Reviews ---------- */

.cm-reviews {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 24px 28px;
}

.cm-reviews__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cm-border);
  margin-bottom: 20px;
}

.cm-reviews__summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 280px;
  flex: 1;
}

.cm-reviews__avg {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cm-reviews__avg-num {
  font-size: 42px;
  font-weight: 800;
  color: var(--cm-text);
  line-height: 1;
}

/* Заполняемые звёзды на основе data-cm-stars-fill (1-5) */
.cm-reviews__avg-stars,
.cm-review__rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  position: relative;
}

.cm-reviews__avg-stars svg,
.cm-review__rating svg {
  fill: var(--cm-border-strong);
}

.cm-reviews__avg-stars[data-cm-stars-fill] svg:nth-child(-n+5),
.cm-review__rating[data-cm-stars-fill] svg:nth-child(-n+5) {
  /* default greyed out */
}

/* Подсветка через CSS — использует CSS-переменную, JS ставит --cm-stars-pct */
.cm-reviews__avg-stars { isolation: isolate; }

.cm-reviews__avg-count {
  font-size: 13px;
  color: var(--cm-text-muted);
}

.cm-reviews__bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
}

.cm-reviews__bars li {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.cm-reviews__bar-stars {
  color: var(--cm-text-muted);
  font-weight: 600;
}

.cm-reviews__bar-track {
  height: 6px;
  background: var(--cm-bg);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.cm-reviews__bar-fill {
  display: block;
  height: 100%;
  background: var(--cm-accent);
  border-radius: 3px;
  transition: width .25s;
}

.cm-reviews__bar-count {
  text-align: right;
  color: var(--cm-text-muted);
  font-weight: 600;
}

.cm-reviews__write {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Review form ---------- */

.cm-review-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius);
  margin-bottom: 20px;
}

.cm-review-form[hidden] { display: none; }

.cm-review-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .cm-review-form__row { grid-template-columns: 1fr; }
}

.cm-review-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-review-form__field--full { width: 100%; }

.cm-review-form__field span,
.cm-review-form__rating > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--cm-text);
}

.cm-review-form__field em,
.cm-review-form__rating em {
  color: var(--cm-danger);
  font-style: normal;
  margin-left: 2px;
}

.cm-review-form__field input,
.cm-review-form__field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--cm-border-strong);
  border-radius: var(--cm-radius-sm);
  background: var(--cm-surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--cm-text);
  outline: none;
  transition: border-color .15s;
  resize: vertical;
}

.cm-review-form__field input:focus,
.cm-review-form__field textarea:focus {
  border-color: var(--cm-accent);
}

.cm-review-form__rating {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-review-rate {
  display: inline-flex;
  gap: 4px;
}

.cm-review-rate__star {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--cm-border-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .12s, transform .12s;
}

.cm-review-rate__star:hover { transform: scale(1.1); }
.cm-review-rate__star.is-active { color: #f5b400; }

.cm-review-form__actions {
  display: flex;
  gap: 12px;
}

/* ---------- Review list ---------- */

.cm-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cm-review {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius);
}

.cm-review__avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cm-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  /* Покажем первую букву через CSS */
  overflow: hidden;
  position: relative;
  text-indent: -9999px;
}

.cm-review__avatar::before {
  content: attr(data-letter);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-indent: 0;
}

.cm-review__body {
  flex: 1;
  min-width: 0;
}

.cm-review__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.cm-review__name {
  font-weight: 700;
  color: var(--cm-text);
}

.cm-review__date {
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-review__rating {
  margin-bottom: 8px;
}

.cm-review__content {
  font-size: 14px;
  line-height: 1.55;
  color: var(--cm-text);
  margin: 0;
  white-space: pre-line;
}

/* =========================================================
   Cart page (страница корзины) — рендерится JS из localStorage
   ========================================================= */

.cm-cart-page { padding-top: 16px; }

.cm-cart-page__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 16px 0 24px;
}

.cm-cart-page__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-cart-page__count {
  font-size: 13px;
  color: var(--cm-text-muted);
}

.cm-cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cm-cart-layout { grid-template-columns: 1fr; }
}

/* ---------- List ---------- */

.cm-cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cm-cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
}

.cm-cart-item__img {
  width: 100px;
  height: 100px;
  border-radius: var(--cm-radius-sm);
  background: var(--cm-surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-cart-item__body { min-width: 0; }

.cm-cart-item__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
  text-decoration: none;
  margin-bottom: 4px;
}

.cm-cart-item__title:hover { color: var(--cm-accent); }

.cm-cart-item__variation {
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-cart-item__sku {
  font-size: 11px;
  color: var(--cm-text-soft);
  margin-top: 4px;
}

.cm-cart-item__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--cm-border-strong);
  border-radius: var(--cm-radius-pill);
  background: var(--cm-bg);
  padding: 2px;
}

.cm-cart-item__qty button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--cm-text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s, color .15s;
}

.cm-cart-item__qty button:hover {
  background: var(--cm-accent);
  color: #fff;
}

.cm-cart-item__qty button:disabled {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

.cm-cart-item__qty input {
  width: 44px;
  height: 32px;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

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

.cm-cart-item__price {
  text-align: right;
  min-width: 110px;
}

.cm-cart-item__price-now {
  font-size: 18px;
  font-weight: 800;
  color: var(--cm-text);
}

.cm-cart-item__price-each {
  display: block;
  font-size: 11px;
  color: var(--cm-text-muted);
  margin-top: 2px;
}

.cm-cart-item__remove {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--cm-bg);
  color: var(--cm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.cm-cart-item__remove:hover {
  background: var(--cm-danger);
  color: #fff;
}

@media (max-width: 720px) {
  .cm-cart-item {
    grid-template-columns: 80px 1fr auto;
    grid-template-areas:
      "img body remove"
      "img qty price";
  }
  .cm-cart-item__img { grid-area: img; width: 80px; height: 80px; }
  .cm-cart-item__body { grid-area: body; }
  .cm-cart-item__qty { grid-area: qty; }
  .cm-cart-item__price { grid-area: price; }
  .cm-cart-item__remove { grid-area: remove; align-self: start; }
}

/* ---------- Summary (sticky) ---------- */

.cm-cart-summary {
  position: sticky;
  top: 84px;
  align-self: start;
}

.cm-cart-summary__inner {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cm-cart-summary__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--cm-text);
}

.cm-cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--cm-text);
}

.cm-cart-summary__row span:first-child { color: var(--cm-text-muted); }

.cm-cart-summary__free { color: var(--cm-accent); font-weight: 600; }

.cm-cart-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--cm-border);
  font-size: 16px;
  font-weight: 700;
  color: var(--cm-text);
}

.cm-cart-summary__total span:last-child {
  font-size: 22px;
  font-weight: 800;
}

.cm-cart-summary__continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--cm-text-muted);
  text-decoration: none;
  padding: 6px 0;
}

.cm-cart-summary__continue:hover { color: var(--cm-accent); }

.cm-cart-summary__perks {
  list-style: none;
  margin: 8px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--cm-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-cart-summary__perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-cart-summary__perks svg { color: var(--cm-accent); flex-shrink: 0; }

/* ---------- Empty ---------- */

.cm-cart-empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cm-cart-empty__ico { color: var(--cm-text-soft); }

.cm-cart-empty h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-cart-empty p {
  color: var(--cm-text-muted);
  font-size: 14px;
  margin: 0 0 16px;
}

/* =========================================================
   Checkout page (страница оформления заказа)
   ========================================================= */

.cm-checkout { padding-top: 16px; }

.cm-checkout__head { margin: 16px 0 24px; }

.cm-checkout__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cm-checkout-layout { grid-template-columns: 1fr; }
}

.cm-checkout-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cm-checkout-step {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 24px;
}

.cm-checkout-step__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cm-checkout-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cm-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.cm-checkout-step__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--cm-text);
}

.cm-checkout-step__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Form fields */

.cm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .cm-form-row { grid-template-columns: 1fr; }
}

.cm-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-form-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--cm-text);
}

.cm-form-field em {
  color: var(--cm-danger);
  font-style: normal;
  margin-left: 2px;
}

.cm-form-field input,
.cm-form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cm-border-strong);
  border-radius: var(--cm-radius-sm);
  background: var(--cm-surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--cm-text);
  outline: none;
  transition: border-color .15s, background .15s;
  resize: vertical;
}

.cm-form-field input:focus,
.cm-form-field textarea:focus {
  border-color: var(--cm-accent);
  background: var(--cm-accent-soft);
}

.cm-form-field.is-error input,
.cm-form-field.is-error textarea {
  border-color: var(--cm-danger);
  background: rgba(224, 32, 32, .04);
}

.cm-form-field__error {
  font-size: 12px;
  color: var(--cm-danger);
  font-weight: 500;
  margin-top: 4px;
}

/* Radio group */

.cm-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cm-checkout-empty {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px dashed var(--cm-border, #d1d5db);
  border-radius: 8px;
  color: var(--cm-muted, #6b7280);
  font-size: 14px;
}
.cm-checkout-empty a { color: var(--cm-accent); }
.cm-checkout-promo { display: flex; flex-direction: column; gap: 8px; }
.cm-checkout-promo__row { display: flex; gap: 8px; align-items: stretch; }
.cm-checkout-promo__row > input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--cm-border, #d1d5db);
  border-radius: 8px; background: var(--cm-bg, #fff); color: var(--cm-text);
  font-size: 14px; font-family: inherit; box-sizing: border-box;
}
.cm-checkout-promo__row > input:focus { outline: 2px solid var(--cm-accent); outline-offset: -1px; }
.cm-checkout-promo__row > .cm-btn { padding-left: 22px; padding-right: 22px; }
.cm-checkout-promo__status { font-size: 13px; padding: 8px 12px; border-radius: 8px; }
.cm-checkout-promo__status--ok  { background: rgba(34,197,94,.12); color: #166534; }
.cm-checkout-promo__status--err { background: rgba(239,68,68,.12); color: #991b1b; }
@keyframes cm-checkout-total-bump {
  0%   { transform: scale(1);   color: var(--cm-text); }
  35%  { transform: scale(1.08); color: var(--cm-accent); }
  100% { transform: scale(1);   color: var(--cm-text); }
}
.cm-checkout-total--bump { animation: cm-checkout-total-bump .45s ease; display: inline-block; }

.cm-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--cm-bg);
  border: 1.5px solid transparent;
  border-radius: var(--cm-radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.cm-radio:hover { background: var(--cm-accent-soft); }

.cm-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cm-radio__check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--cm-border-strong);
  border-radius: 50%;
  background: var(--cm-surface);
  position: relative;
  transition: border-color .15s;
}

.cm-radio input[type="radio"]:checked + .cm-radio__check {
  border-color: var(--cm-accent);
}

.cm-radio input[type="radio"]:checked + .cm-radio__check::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--cm-accent);
  border-radius: 50%;
}

.cm-radio:has(input[type="radio"]:checked) {
  background: var(--cm-accent-soft);
  border-color: var(--cm-accent);
}

.cm-radio__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cm-radio__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-text);
}

.cm-radio__desc {
  font-size: 12px;
  color: var(--cm-text-muted);
}

.cm-radio__price {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
}

.cm-radio__icons {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Aside */

.cm-checkout-aside {
  position: sticky;
  top: 84px;
  align-self: start;
}

.cm-checkout-summary {
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cm-checkout-summary__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.cm-checkout-items {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
}

.cm-checkout-items::-webkit-scrollbar { width: 4px; }
.cm-checkout-items::-webkit-scrollbar-thumb { background: var(--cm-border); border-radius: 2px; }

.cm-checkout-loading {
  text-align: center;
  color: var(--cm-text-muted);
  font-size: 13px;
  margin: 0;
}

.cm-checkout-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.cm-checkout-line__title {
  flex: 1;
  min-width: 0;
  color: var(--cm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-checkout-line__qty { color: var(--cm-text-muted); flex-shrink: 0; }
.cm-checkout-line__sub { font-weight: 700; color: var(--cm-text); flex-shrink: 0; }

.cm-checkout-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
}

/* Alerts */

.cm-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--cm-radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.cm-alert--error {
  background: rgba(224, 32, 32, .08);
  color: var(--cm-danger);
  border: 1px solid rgba(224, 32, 32, .25);
}

.cm-alert--success {
  background: var(--cm-accent-soft);
  color: var(--cm-accent);
}

.cm-alert a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

/* =========================================================
   Thanks page
   ========================================================= */

.cm-thanks {
  padding: 48px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-thanks__card {
  max-width: 580px;
  text-align: center;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  padding: 56px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cm-thanks__ico {
  color: var(--cm-accent);
  background: var(--cm-accent-soft);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cm-thanks__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-thanks__lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--cm-text);
  margin: 0;
}

.cm-thanks__lead b { color: var(--cm-accent); }

.cm-thanks__total {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px;
  background: var(--cm-bg);
  border-radius: var(--cm-radius-sm);
  margin: 8px 0;
}

.cm-thanks__total span {
  font-size: 12px;
  color: var(--cm-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cm-thanks__total b {
  font-size: 28px;
  font-weight: 800;
  color: var(--cm-text);
}

.cm-thanks__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Empty state ---------- */

.cm-empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--cm-surface);
  border-radius: var(--cm-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cm-empty__ico {
  color: var(--cm-text-soft);
}

.cm-empty h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--cm-text);
  margin: 0;
}

.cm-empty p {
  color: var(--cm-text-muted);
  font-size: 14px;
  margin: 0 0 8px;
}

/* ───── 404 ───── */
.cm-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--cm-surface);
  border-radius: var(--cm-radius-lg);
  box-shadow: var(--cm-shadow);
  padding: 56px 24px 64px;
  margin: 8px 0 40px;
}
.cm-404__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
/* мягкое акцентное пятно за цифрой */
.cm-404__art::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  max-width: 80vw;
  max-height: 80vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cm-accent-soft) 0%, transparent 70%);
  z-index: 0;
}
.cm-404__code {
  position: relative;
  z-index: 1;
  font-size: clamp(104px, 24vw, 200px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--cm-accent);
}
.cm-404__title {
  margin: 0 0 10px;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  color: var(--cm-text);
}
.cm-404__text {
  max-width: 480px;
  margin: 0 0 26px;
  color: var(--cm-text-muted);
  font-size: 15px;
}
.cm-404__search {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 24px;
}
.cm-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.cm-404__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin-top: 26px;
  font-size: 14px;
}
.cm-404__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cm-text-muted);
  font-weight: 500;
  transition: color .15s;
}
.cm-404__links a:hover { color: var(--cm-accent); }

/* =========================================================
   Static page  (/p/{slug})  — page.tpl
   Карточка-документ + типографика «prose» для произвольного
   HTML из редактора (тема сбрасывает ul/h1-4/p/a — здесь
   восстанавливаем оформление в рамках .cm-prose).
   ========================================================= */

.cm-page {
  max-width: 940px;
  margin: 22px auto 8px;
}

.cm-page__card {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-lg);
  box-shadow: var(--cm-shadow);
  padding: 40px 48px;
}

.cm-page__head {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--cm-border);
}

.cm-page__title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cm-text);
}

.cm-page__empty {
  color: var(--cm-text-muted);
  font-size: 15px;
}

/* ---------- Prose ---------- */

.cm-prose {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--cm-text);
  overflow-wrap: break-word;
}

.cm-prose > :first-child { margin-top: 0; }
.cm-prose > :last-child  { margin-bottom: 0; }

.cm-prose p { margin: 0 0 1.1em; }

.cm-prose h2,
.cm-prose h3,
.cm-prose h4,
.cm-prose h5,
.cm-prose h6 {
  color: var(--cm-text);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}

.cm-prose h2 { font-size: 25px; margin: 1.8em 0 .7em; }
.cm-prose h3 { font-size: 20px; margin: 1.6em 0 .6em; }
.cm-prose h4 { font-size: 17px; margin: 1.4em 0 .5em; }
.cm-prose h5,
.cm-prose h6 {
  font-size: 14px;
  margin: 1.3em 0 .5em;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cm-text-muted);
}

.cm-prose a {
  color: var(--cm-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color .15s;
}
.cm-prose a:hover { color: var(--cm-accent-hover); }

.cm-prose strong,
.cm-prose b { font-weight: 700; color: var(--cm-text); }
.cm-prose em,
.cm-prose i { font-style: italic; }
.cm-prose mark { background: var(--cm-yellow); color: var(--cm-text); padding: 0 .15em; border-radius: 3px; }

.cm-prose ul,
.cm-prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.5em;
}
.cm-prose ul { list-style: disc; }
.cm-prose ol { list-style: decimal; }
.cm-prose li { margin: .4em 0; padding-left: .2em; }
.cm-prose li::marker { color: var(--cm-accent); }
.cm-prose ul ul,
.cm-prose ol ol,
.cm-prose ul ol,
.cm-prose ol ul { margin: .4em 0 .2em; }

.cm-prose blockquote {
  margin: 1.5em 0;
  padding: 14px 22px;
  border-left: 4px solid var(--cm-accent);
  background: var(--cm-accent-soft);
  border-radius: 0 var(--cm-radius-sm) var(--cm-radius-sm) 0;
  color: var(--cm-text);
}
.cm-prose blockquote p { margin: 0; }
.cm-prose blockquote p + p { margin-top: .6em; }

.cm-prose img {
  height: auto;
  border-radius: var(--cm-radius);
  margin: 1.3em 0;
}

.cm-prose figure { margin: 1.5em 0; }
.cm-prose figure img { margin: 0; }
.cm-prose figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--cm-text-muted);
  text-align: center;
}

.cm-prose hr {
  border: 0;
  border-top: 1px solid var(--cm-border);
  margin: 2em 0;
}

.cm-prose code {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: .88em;
  background: var(--cm-bg);
  border: 1px solid var(--cm-border);
  border-radius: 6px;
  padding: .12em .4em;
}
.cm-prose pre {
  margin: 1.5em 0;
  padding: 16px 18px;
  background: #1d1d1f;
  color: #f4f4f4;
  border-radius: var(--cm-radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.cm-prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.cm-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}
.cm-prose th,
.cm-prose td {
  border: 1px solid var(--cm-border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.cm-prose th {
  background: var(--cm-surface-alt);
  font-weight: 700;
}
.cm-prose tbody tr:nth-child(even) { background: var(--cm-surface-alt); }

.cm-prose iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: var(--cm-radius);
  margin: 1.5em 0;
}

@media (max-width: 768px) {
  .cm-page { margin-top: 14px; }
  .cm-page__card { padding: 24px 20px; border-radius: var(--cm-radius); }
  .cm-page__title { font-size: 26px; }
  .cm-prose { font-size: 15px; }
  .cm-prose h2 { font-size: 21px; }
  .cm-prose h3 { font-size: 18px; }
}
