/* Каталог концепции E: корень с группами и сериями, список товаров с фильтром справа, виды плитка/список/таблица */

/* ===== Корень каталога ===== */
.cg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cg { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 20px; padding: 24px 24px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.cg-img { display: block; aspect-ratio: 1; background: var(--soft); border-radius: var(--r); overflow: hidden; }
.cg-img img { width: 100%; height: 100%; object-fit: contain; padding: 10%; transition: transform .25s ease; }
@media (hover: hover) and (pointer: fine) { .cg:hover .cg-img img { transform: translateY(-4px); } }
.cg-b { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.cg-b h2 { font-size: 20px; font-weight: 400; }
.cg-b h2 a:hover { color: var(--olive); }
.cg-n { font-size: 13px; color: var(--muted); }
.cg-subs { margin-top: 10px; gap: 6px; }
.cg-subs .chip { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }

.cs-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cs { display: grid; align-content: start; gap: 3px; padding: 14px 14px 18px; border-radius: var(--r); transition: background-color .2s; }
.cs:hover { background: var(--soft); }
.cs-img { display: block; aspect-ratio: 4 / 3; margin-bottom: 8px; }
.cs-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
@media (hover: hover) and (pointer: fine) { .cs:hover .cs-img img { transform: translateY(-3px); } }
.cs b { font: 500 15px/1.25 var(--f-disp); color: var(--ink); }
.cs small { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.cs-n { margin-top: 4px; font-size: 12.5px; color: var(--text); }

@media (max-width: 1279px) { .cg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .cg-grid { grid-template-columns: 1fr; }
  .cg { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .cg-b h2 { font-size: 18px; }
  .cg-subs .chip { height: auto; min-height: 30px; padding-block: 5px; white-space: normal; line-height: 1.3; }
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .cs { padding: 10px 8px 14px; }
}

/* ===== Шапка списка ===== */
.cl-head-acts { display: flex; gap: 8px; }
.cg-img img, .cs-img img, .cr-img img, .ct-p img { mix-blend-mode: multiply; }

/* ===== Список: колонка товаров и фильтр справа ===== */
.cl { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.cl-main { min-width: 0; }
.cl-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cl-fbtn { display: none; }
.cl-sort { margin-right: auto; }
.cl-sort .sel { height: 38px; width: auto; min-width: 210px; font-size: 14px; }
.cl-views { display: flex; gap: 4px; }
.cl-views .ib { width: 38px; height: 38px; }
.cl-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.cl-act[hidden] { display: none; }
.cl-chip { height: 32px; padding: 0 10px 0 12px; gap: 6px; font-size: 13px; }
.cl-chip i { font-size: 13px; color: var(--muted); transition: color .15s; }
.cl-chip:hover i { color: var(--ink); }
.cl-reset { height: 32px; padding: 0 6px; font: 600 11px/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .15s; }
.cl-reset:hover { color: var(--ink); }
.cl-res { outline: none; transition: opacity .15s; }
.cl-res.is-loading { opacity: .45; }
.cl-res:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
#h1:focus { outline: none; }
.cl-pager { display: grid; justify-items: center; gap: 18px; margin-top: 28px; }
.cl-pager #more[hidden] { display: none; }
.pgn { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.pgn:empty { display: none; }
.pgn-b { min-width: 38px; height: 38px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; transition: border-color .15s, background-color .15s, color .15s; }
.pgn-b:hover { border-color: var(--ink); }
.pgn-b[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pgn-b[disabled] { opacity: .35; pointer-events: none; }
.pgn-gap { min-width: 22px; text-align: center; color: var(--muted); }

/* ===== Фильтр ===== */
.cf { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.cf-h, .cf-f { display: none; }
.cf-g { border-bottom: 1px solid var(--line); }
.cf-g:last-child { border-bottom: 0; }
.cf-g summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; cursor: pointer; list-style: none; font: 600 12px/1.2 var(--f-text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.cf-g summary::-webkit-details-marker { display: none; }
.cf-g summary::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease); }
.cf-g[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.cf-g summary:hover { color: var(--olive); }
.cf-gb { padding: 0 18px 16px; }
.cf-g--flat { padding: 14px 18px; }
.cf-opts { display: grid; gap: 9px; }
.cf-o { align-items: center; font-size: 14px; }
.cf-o span { flex: 1; min-width: 0; color: var(--ink); }
.cf-o small, .cf-fc small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cf-o input { margin: 0; }
.cf-o.is-zero span, .cf-o.is-zero small { color: #b9bbc0; }
.cf-opts:not(.is-all) .cf-extra:not(.is-on) { display: none; }
.cf-all { margin: 0 18px 16px; font: 600 11px/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--olive); }
.cf-all:hover { color: var(--ink); }
.cf-fins { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-fc { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 9px 0 6px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; color: var(--ink); background: var(--bg); transition: border-color .15s; }
.cf-fc:hover { border-color: var(--ink); }
.cf-fc[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cf-fc.is-zero { color: #b9bbc0; }
.cf-fc.is-zero .cf-dot { opacity: .45; }
.cf-dot { flex: none; width: 18px; height: 18px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); }
.cf-pin { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cf-pf { position: relative; display: block; }
.cf-pf span { position: absolute; left: 10px; top: 50%; translate: 0 -50%; font-size: 12px; color: var(--muted); pointer-events: none; }
.cf-pf .in { height: 40px; padding: 0 8px 0 28px; font-size: 14px; font-variant-numeric: tabular-nums; }
.cf-range { position: relative; height: 30px; margin: 10px 2px 0; }
.cf-track { position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: var(--line-2); border-radius: 1px; }
.cf-track i { position: absolute; top: 0; bottom: 0; background: var(--ink); }
.cf-range input { position: absolute; inset: 0; width: 100%; height: 30px; margin: 0; background: none; pointer-events: none; appearance: none; -webkit-appearance: none; }
.cf-range input::-webkit-slider-runnable-track { background: none; height: 30px; }
.cf-range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); cursor: grab; transition: transform .15s; }
.cf-range input::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); cursor: grab; }
.cf-range input::-moz-range-track { background: none; }
.cf-range input:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.cf-range input:focus-visible { outline: none; }
.cf-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgb(42 134 200 / .35); }
.cf-range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px rgb(42 134 200 / .35); }

/* ===== Над списком: подразделы, поиск, подсказки ===== */
.cl-subs { margin-bottom: 26px; }
.cl-q { display: flex; gap: 8px; max-width: 720px; margin-bottom: 26px; }
.cl-q .in { flex: 1; min-width: 0; }
.cl-qempty { padding-block: 40px 28px; }
.cl-hints { display: grid; gap: 12px; justify-items: start; padding: 24px 0 8px; }
.cl-hints b { font: 600 12px/1.2 var(--f-text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-top: 8px; }

/* ===== Вид «список» ===== */
.cr-list { border-top: 1px solid var(--line); }
.cr { display: grid; grid-template-columns: 180px minmax(0, 1fr) 230px; gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cr-img { display: block; aspect-ratio: 1; }
.cr-img img { width: 100%; height: 100%; object-fit: contain; }
.cr-b { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.cr-b .lbs { margin-bottom: 6px; }
.cr-t { font: 500 18px/1.3 var(--f-disp); color: var(--ink); }
.cr-t:hover { color: var(--olive); }
.cr-type { font-size: 13.5px; color: var(--muted); }
.cr-b .pc-meta { margin-top: 6px; }
.cr-fins { display: inline-flex; align-items: center; gap: 3px; }
.cr-fins i { width: 12px; height: 12px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); }
.cr-fins i:last-of-type { margin-right: 4px; }
.cr-specs { display: grid; gap: 4px; width: 100%; max-width: 520px; margin: 12px 0 0; font-size: 13px; }
.cr-specs div { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 12px; }
.cr-specs dt { color: var(--muted); }
.cr-specs dd { margin: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.cr-price .price { font-size: 21px; }
.cr-price .price-old { display: block; margin: 4px 0 0; }
.cr-acts { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; }
.cr-acts .ib { width: 42px; height: 42px; }
.cr-cart { width: auto; gap: 8px; padding: 0 16px; background: var(--btn); border-color: var(--btn); color: #fff; font: 500 11px/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; }
.cr-cart:hover { background: var(--btn-h); border-color: var(--btn-h); }
.cr-cart i { font-size: 18px; }
.cr-cart .t-in, .cr-cart.is-in .t-add { display: none; }
.cr-cart.is-in .t-in { display: inline; }
.cr-cart.is-in { background: var(--olive); border-color: var(--olive); }
.cr-ask { height: 42px; }

/* ===== Вид «таблица» ===== */
.ct { width: 100%; border-collapse: collapse; font-size: 14px; }
.ct th { padding: 10px 12px; text-align: left; font: 600 11px/1.2 var(--f-text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.ct td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ct th:first-child, .ct td:first-child { padding-left: 0; }
.ct th:last-child, .ct td:last-child { padding-right: 0; }
.ct tbody tr { transition: background-color .15s; }
.ct tbody tr:hover { background: var(--soft); }
.ct-p { display: flex; align-items: center; gap: 14px; }
.ct-p img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.ct-p b { display: block; font-weight: 500; color: var(--ink); }
.ct-p:hover b { color: var(--olive); }
.ct-p small { font-size: 12.5px; color: var(--muted); }
.ct-s { color: var(--text); white-space: nowrap; }
.ct-st .av { white-space: nowrap; }
.ct-r { text-align: right !important; }
.ct-pr .price { font-size: 16px; }
.ct-pr .price-old { display: block; margin: 3px 0 0; }
.ct-pr .disc { margin-top: 4px; }
.ct-pr .price-req { font-size: 14px; white-space: nowrap; }
.ct-a div { display: flex; justify-content: flex-end; gap: 4px; }
.ct-a .pc-cart, .ct-a .ib { width: 36px; height: 36px; font-size: 17px; }

/* ===== Планшет и телефон ===== */
@media (max-width: 1279px) {
  .cr { grid-template-columns: 140px minmax(0, 1fr) 200px; gap: 20px; }
  .ct .ct-s { display: none; }
}
@media (max-width: 1023px) {
  .cl { grid-template-columns: minmax(0, 1fr); }
  .cl-fbtn { display: inline-flex; }
  .cl-sort { margin-right: 0; flex: 1; min-width: 0; }
  .cl-sort .sel { width: 100%; min-width: 0; }
  .cf { position: fixed; z-index: 66; left: 0; right: 0; bottom: 0; max-height: 88dvh; display: flex; flex-direction: column; border: 0; border-radius: 10px 10px 0 0; box-shadow: 0 -20px 50px -20px rgb(0 0 0 / .35); transform: translateY(100%); visibility: hidden; transition: transform .32s var(--ease), visibility 0s linear .32s; }
  .cf.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .cf-h { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 10px 20px; border-bottom: 1px solid var(--line); }
  .cf-h b { font: 500 19px/1.2 var(--f-disp); color: var(--ink); }
  .cf-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .cf-f { flex: none; display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
  .cf-f .btn { padding: 0 16px; }
  .cf-back { position: fixed; inset: 0; z-index: 65; background: rgb(18 20 19 / .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
  .cf-back.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
}
@media (min-width: 1024px) { .cf-back { display: none; } }
@media (max-width: 767px) {
  .phd-t { flex-wrap: wrap; }
  .cl-head-acts { margin-left: 0; flex-basis: 100%; }
  .cl-subs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1) 18px; padding: 0 var(--gut); }
  .cl-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .cl-fbtn { justify-content: flex-start; }
  .cl-sort { grid-column: 1 / -1; order: 3; }
  .cl-q .btn { padding: 0 16px; }
  .cl-q .btn i { display: none; }
  .cr { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
  .cr-t { font-size: 15.5px; }
  .cr-specs { display: none; }
  .cr-buy { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; gap: 8px 12px; }
  .cr-price .price { font-size: 18px; }
  .cr-buy .pc-chips { order: 3; flex-basis: 100%; }
  .cr-acts { margin: 0; padding: 0; }
  .cr-cart { padding: 0 12px; }
  .ct thead { display: none; }
  .ct, .ct tbody { display: block; }
  .ct tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ct td { display: block; padding: 0 !important; border: 0; }
  .ct td.ct-s { display: none; }
  .ct-m { grid-column: 1 / -1; }
  .ct-st { grid-column: 1; }
  .ct-pr { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .ct-a { grid-column: 1; }
  .ct-a div { justify-content: flex-start; }
  .ct-p img { width: 48px; height: 48px; }
}

/* ===== Под списком ===== */
.cl-seo { border-top: 1px solid var(--line); margin-top: 56px; }
.cl-seo h2 { margin-bottom: 18px; }
.cl-seo-txt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 48px; max-width: 1080px; }
.cl-seo-txt p { margin: 0; color: var(--text); }
/* Неполный ряд «Вы смотрели»: верхняя линия только над карточками */
.cl-seen { border-top: 0; }
.cl-seen .pc { border-top: 1px solid var(--line); }
@media (max-width: 1279px) { .cl-seen .pc:nth-child(n+5) { display: none; } }
@media (max-width: 1023px) and (min-width: 768px) { .cl-seen .pc:nth-child(n+4) { display: none; } }
@media (max-width: 767px) { .cl-seen .pc:nth-child(n+3) { border-top: 0; } }
.cl-posts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cl-post { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); grid-template-rows: none; }
.cl-post .post-img { aspect-ratio: 4 / 3; height: auto; }
@media (max-width: 1023px) { .cl-seo-txt { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .cl-posts { grid-template-columns: 1fr; }
  .cl-post { grid-template-columns: 120px minmax(0, 1fr); }
  .cl-post .post-txt { padding: 14px 16px; }
  .cl-post .post-txt b { font-size: 14.5px; }
  .cl-seen .pc:nth-child(n+5) { display: none; }
}
