/* Каталог: карточки, фильтры, страница товара, ТТХ, сравнение, корзина.
   Цвета берутся из Настроек (переменные --c-primary, --c-accent, --c-dark). */
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cat-hero{padding:clamp(28px,5vw,56px) 0 clamp(18px,3vw,28px);background:var(--c-dark,#111315);color:#fff}
.cat-hero .breadcrumbs,.cat-hero .breadcrumbs a{color:rgba(255,255,255,.72)}
.cat-hero__title{margin:.4rem 0 .5rem;font-size:clamp(30px,4.4vw,52px);line-height:1.08;color:#fff}
.cat-hero__lead{max-width:760px;margin:0;font-size:17px;line-height:1.6;color:rgba(255,255,255,.82)}
.cat-section{padding-top:clamp(24px,4vw,40px)}
.cat-breadcrumbs{display:flex;flex-wrap:wrap;gap:6px;font-size:14px}
.cat-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.cat-chip{padding:9px 16px;border:1px solid #d7dadf;border-radius:999px;color:inherit;text-decoration:none;font-size:15px;min-height:40px;display:inline-flex;align-items:center}
.cat-chip:hover{border-color:var(--c-primary)}
.cat-chip.is-active{background:var(--c-primary);border-color:var(--c-primary);color:#fff}
.cat-filters{display:flex;flex-wrap:wrap;gap:14px 18px;align-items:flex-end;padding:16px;border:1px solid #e3e5e8;border-radius:8px;background:#fafaf8}
.cat-filters__group{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;font-size:14px;min-width:0}
.cat-filters__group legend,.cat-filters__group>span{font-weight:600;padding:0;margin-bottom:6px}
fieldset.cat-filters__group{flex-direction:row;flex-wrap:wrap}
.cat-filters input,.cat-filters select{height:42px;padding:0 10px;border:1px solid #cfd3d8;border-radius:6px;font:inherit;font-size:16px;background:#fff;max-width:150px}
.cat-filters select{max-width:230px}
.cat-filters__actions{display:flex;gap:8px}
.cat-count{margin:14px 0;color:#5b6168;font-size:15px}
.cat-empty{padding:40px 16px;text-align:center;border:1px dashed #cfd3d8;border-radius:8px}
.cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:22px}
.cat-card{display:flex;flex-direction:column;border:1px solid #e3e5e8;border-radius:8px;background:#fff;overflow:hidden;transition:border-color .2s}
.cat-card:hover{border-color:#b9bec5}
.cat-card__media{display:block;aspect-ratio:3/2;background:#f3f3f1}
.cat-card__media img{width:100%;height:100%;object-fit:contain;display:block}
.cat-card__body{display:flex;flex-direction:column;flex:1;padding:16px 18px 18px;gap:8px}
.cat-card__cat{margin:0;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--c-primary);font-weight:700}
.cat-card__title{margin:0;font-size:20px;line-height:1.25}
.cat-card__title a{color:inherit;text-decoration:none}
.cat-card__sub{margin:0;color:#5b6168;font-size:14px}
.cat-card__keys{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;margin:4px 0;font-size:13px}
.cat-card__keys dt{color:#6b7280}.cat-card__keys dd{margin:0;font-weight:600}
.cat-card__price{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin-top:auto;padding-top:8px}
.cat-card__price strong{font-size:20px}
.cat-card__actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cat-avail{font-size:13px;color:#4b5563}.cat-avail--in_stock{color:#15803d}.cat-avail--unavailable{color:#9ca3af}
.cat-compare-toggle{display:inline-flex;gap:6px;align-items:center;font-size:14px;cursor:pointer;min-height:40px}
.cat-compare-toggle input{width:18px;height:18px}
.cat-comparebar{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:900;display:flex;gap:12px;align-items:center;padding:10px 14px;border-radius:10px;background:var(--c-dark,#111315);color:#fff;box-shadow:0 8px 28px rgba(0,0,0,.25);max-width:calc(100vw - 24px)}
.cat-comparebar[hidden]{display:none}
.cat-comparebar .is-disabled{opacity:.5;pointer-events:none}
.cat-comparebar__clear{background:none;border:0;color:rgba(255,255,255,.75);cursor:pointer;font:inherit;min-height:40px}
.cat-toast{position:fixed;left:50%;top:calc(80px + env(safe-area-inset-top,0px));transform:translate(-50%,-10px);z-index:1000;display:flex;gap:12px;align-items:center;padding:12px 16px;border-radius:8px;background:var(--c-dark,#111315);color:#fff;font-size:15px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:calc(100vw - 24px)}
.cat-toast.is-visible{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.cat-toast a{color:#fff;font-weight:700}
.header-cart{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;color:inherit}
.header-cart__count{position:absolute;top:2px;right:0;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--c-primary);color:#fff;font-size:12px;line-height:19px;text-align:center;font-weight:700}
.header-cart__count[hidden]{display:none}

/* Страница товара */
.cat-product{padding:clamp(18px,3vw,32px) 0 clamp(28px,4vw,48px)}
.cat-product__top{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:clamp(20px,4vw,48px);align-items:start;margin-top:14px}
.cat-gallery__main{display:block;background:#f3f3f1;border-radius:8px;overflow:hidden}
.cat-gallery__main.c-gallery{display:block}
.cat-gallery__slide{display:block;aspect-ratio:3/2;border-radius:0!important}
.cat-gallery__slide[hidden]{display:none}
.cat-gallery__slide img{width:100%;height:100%;object-fit:contain;display:block}
.cat-gallery__thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding-bottom:4px}
.cat-gallery__thumb{flex:0 0 88px;height:60px;padding:0;border:2px solid transparent;border-radius:6px;background:#f3f3f1;cursor:pointer;overflow:hidden}
.cat-gallery__thumb img{width:100%;height:100%;object-fit:contain}
.cat-gallery__thumb.is-active{border-color:var(--c-primary)}
.cat-gallery__thumb[hidden]{display:none}
.cat-gallery__empty{aspect-ratio:3/2;background:#f3f3f1;border-radius:8px}
.cat-buy__cat{margin:0;font-size:13px;letter-spacing:.1em;text-transform:uppercase;color:var(--c-primary);font-weight:700}
.cat-buy__title{margin:.3rem 0 .3rem;font-size:clamp(28px,3.4vw,44px);line-height:1.1}
.cat-buy__sub{margin:0 0 14px;color:#5b6168}
.cat-buy__price{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 14px;margin:10px 0 4px}
.cat-buy__price strong{font-size:clamp(24px,2.6vw,32px)}
.cat-buy__note{margin:0;font-size:13px;color:#6b7280}
.cat-variants{border:0;margin:18px 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.cat-variants legend{width:100%;margin-bottom:8px;font-weight:600}
.cat-swatch{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;border:1px solid #d7dadf;border-radius:999px;cursor:pointer;min-height:44px}
.cat-swatch input{position:absolute;opacity:0;pointer-events:none}
.cat-swatch__dot{width:28px;height:28px;border-radius:50%;background:var(--sw);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}
.cat-swatch:has(input:checked){border-color:var(--c-primary);box-shadow:0 0 0 1px var(--c-primary)}
.cat-swatch:has(input:focus-visible){outline:2px solid var(--c-primary);outline-offset:2px}
.cat-swatch.is-off{opacity:.45;cursor:not-allowed}
.cat-keys{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0;padding:16px;border:1px solid #e3e5e8;border-radius:8px}
.cat-keys dt{font-size:13px;color:#6b7280}.cat-keys dd{margin:2px 0 0;font-size:18px;font-weight:700}
.cat-buy__actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:16px 0}
.cat-buy__add{min-height:50px;padding-inline:26px}
.cat-btn-wa{background:#25D366;border-color:#25D366;color:#fff}
.cat-btn-wa:hover{background:#1ebe5a;color:#fff}
.cat-buy__lead{font-size:16px;line-height:1.65;color:#374151}
.cat-narrow{max-width:900px}
.cat-specs h2,.cat-videos h2,.cat-related h2{margin:0 0 18px}
.cat-specs__group{border:1px solid #e3e5e8;border-radius:8px;margin-bottom:12px;background:#fff}
.cat-specs__group summary{cursor:pointer;padding:14px 18px;font-weight:700;font-size:17px;list-style:none;position:relative}
.cat-specs__group summary::-webkit-details-marker{display:none}
.cat-specs__group summary::after{content:"+";position:absolute;right:18px;top:10px;font-size:22px;color:var(--c-primary)}
.cat-specs__group[open] summary::after{content:"−"}
.cat-specs__list{margin:0;padding:0 18px 12px}
.cat-specs__row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:16px;padding:10px 12px;border-radius:4px}
.cat-specs__row:nth-child(odd){background:#f6f6f4}
.cat-specs__row dt{color:#4b5563}.cat-specs__row dd{margin:0;font-weight:600}
.cat-specs__row.is-pending dd{color:#9a6b00;font-weight:500;font-style:italic}
.cat-specs__note{font-size:14px;color:#6b7280}
.cat-videos__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:18px}
.cat-video{margin:0}
.cat-video iframe,.cat-video video,.cat-video__facade{display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:8px;background:#000}
.cat-video__facade{position:relative;padding:0;cursor:pointer;overflow:hidden}
.cat-video__facade img{width:100%;height:100%;object-fit:cover;opacity:.9}
.cat-video__play{position:absolute;left:50%;top:50%;width:68px;height:48px;margin:-24px 0 0 -34px;border-radius:12px;background:var(--c-primary)}
.cat-video__play::after{content:"";position:absolute;left:27px;top:14px;border-style:solid;border-width:10px 0 10px 17px;border-color:transparent transparent transparent #fff}
.cat-video figcaption{margin-top:6px;font-size:14px;color:#4b5563}

/* Сравнение */
.cat-compare-wrap{overflow-x:auto;border:1px solid #e3e5e8;border-radius:8px}
.cat-compare{width:100%;border-collapse:collapse;min-width:620px;font-size:15px}
.cat-compare th,.cat-compare td{padding:10px 12px;border-bottom:1px solid #eceef1;text-align:left;vertical-align:top}
.cat-compare thead th{background:#fafaf8;vertical-align:bottom}
.cat-compare thead img{display:block;width:100%;max-width:240px;aspect-ratio:3/2;object-fit:contain;margin-bottom:8px}
.cat-compare thead a{display:block;font-weight:700;font-size:17px;color:inherit}
.cat-compare__price{display:block;margin:4px 0}
.cat-compare__remove{background:none;border:0;padding:0;color:#6b7280;cursor:pointer;text-decoration:underline;font:inherit;font-size:13px}
.cat-compare tbody th{font-weight:500;color:#4b5563;width:26%}
.cat-compare__group th{background:#f1f1ee;font-weight:700;color:var(--c-dark,#111)}
.cat-compare tr.is-diff td{background:color-mix(in srgb,var(--c-primary) 7%,#fff);font-weight:600}
.only-diff .cat-compare tr.is-same{display:none}
.cat-compare-diff{display:inline-flex;gap:8px;align-items:center;margin-bottom:12px;min-height:40px}

/* Корзина */
.cat-cart__grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:clamp(18px,4vw,40px);align-items:start}
.cat-cart__lines{list-style:none;margin:0;padding:0}
.cat-line{display:grid;grid-template-columns:96px minmax(0,1fr) auto auto 40px;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid #eceef1}
.cat-line img,.cat-line__noimg{width:96px;height:64px;object-fit:contain;background:#f3f3f1;border-radius:6px}
.cat-line__info{display:flex;flex-direction:column;gap:3px;min-width:0}
.cat-line__name{font-weight:700;color:inherit}
.cat-line__variant{display:inline-flex;gap:6px;align-items:center;font-size:14px;color:#4b5563}
.cat-line__variant i{width:14px;height:14px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2)}
.cat-line__price{font-size:14px;color:#4b5563}
.cat-line__warn{font-size:13px;color:#b45309}
.cat-line.is-problem{opacity:.85}
.cat-line__qty{display:flex;align-items:center}
.cat-line__qty button{width:40px;height:40px;border:1px solid #cfd3d8;background:#fff;font-size:18px;cursor:pointer}
.cat-line__qty input{width:48px;height:40px;border:1px solid #cfd3d8;border-left:0;border-right:0;text-align:center;font-size:16px;-moz-appearance:textfield}
.cat-line__sum{font-weight:700;white-space:nowrap;min-width:90px;text-align:right}
.cat-line__remove{width:40px;height:40px;border:0;background:none;font-size:24px;color:#6b7280;cursor:pointer}
.cat-cart__totals{padding:16px 0}
.cat-cart__totals strong{font-size:22px}
.cat-cart__req,.cat-cart__small{font-size:14px;color:#5b6168}
.cat-cart__notice{padding:12px 14px;border-radius:6px;background:#fff7e6;color:#7c4a03;margin-bottom:10px}
.cat-checkout{padding:20px;border:1px solid #e3e5e8;border-radius:8px;background:#fafaf8;position:sticky;top:90px}
.cat-checkout h2{margin:0 0 6px;font-size:22px}
.cat-field{display:flex;flex-direction:column;gap:6px;margin:12px 0;border:0;padding:0}
.cat-field label,.cat-field legend{font-weight:600;font-size:15px;padding:0}
.cat-field input,.cat-field textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid #cfd3d8;border-radius:6px;font:inherit;font-size:16px;background:#fff}
.cat-field input[aria-invalid],.cat-field textarea[aria-invalid]{border-color:#c62828}
.cat-field__err{margin:0;color:#c62828;font-size:14px;min-height:0}
.cat-field__err:empty{display:none}
.cat-radio{display:flex;gap:8px;align-items:center;font-weight:400!important;min-height:40px}
.cat-radio input{width:20px;height:20px;min-height:0}
.cat-consent{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.5;margin-top:8px}
.cat-consent input{width:20px;height:20px;flex:0 0 auto;margin-top:2px}
.cat-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.cat-checkout__submit{width:100%;min-height:52px;margin-top:12px;font-size:17px}
.cat-done{padding:28px;border:1px solid #e3e5e8;border-radius:8px;background:#f6fbf7}
.cat-done h2{margin-top:0}
.cat-done textarea{width:100%;font:inherit;font-size:14px;margin:8px 0}
.cat-done .btn{margin:6px 8px 6px 0}

@media (max-width:900px){
  .cat-product__top,.cat-cart__grid{grid-template-columns:1fr}
  .cat-checkout{position:static}
}
@media (max-width:640px){
  .cat-grid{grid-template-columns:1fr}
  .cat-filters{padding:12px}
  .cat-filters input,.cat-filters select{max-width:none;width:100%}
  fieldset.cat-filters__group{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .cat-filters__group{width:100%}
  .cat-specs__row{grid-template-columns:1fr;gap:2px}
  .cat-keys{grid-template-columns:1fr 1fr}
  .cat-line{grid-template-columns:72px minmax(0,1fr) 40px;grid-template-areas:"img info rm" "qty qty sum"}
  .cat-line img,.cat-line__noimg{width:72px;height:50px;grid-area:img}
  .cat-line__info{grid-area:info}.cat-line__remove{grid-area:rm}.cat-line__qty{grid-area:qty}.cat-line__sum{grid-area:sum}
  .cat-buy__actions .btn{flex:1 1 100%}
}
@media (prefers-reduced-motion:reduce){.cat-toast,.cat-card{transition:none}}
.cat-product .cat-breadcrumbs,.cat-product .cat-breadcrumbs a,.cat-product .cat-breadcrumbs span{color:#5b6168}
.cat-product .cat-breadcrumbs a:hover{color:var(--c-primary)}
.cat-desc .page-content,.cat-equipment .page-content,.cat-terms .page-content{margin:0}
.cat-comparebar{white-space:nowrap;font-size:14px}
@media (max-width:420px){.cat-comparebar{gap:8px;padding:8px 10px}}
.cat-card{padding:0!important}
.cat-card__media{padding:0!important;margin:0!important}
.cat-card__media img{max-width:none}

/* Главная: плитки категорий и модели */
.cat-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));gap:16px}
.cat-tile{display:flex;gap:8px;min-height:220px;border:1px solid #e3e5e8;border-radius:6px;background:#fff;color:inherit;text-decoration:none;overflow:hidden;transition:border-color .2s}
.cat-tile:hover{border-color:var(--c-primary)}
.cat-tile__body{flex:1 1 58%;min-width:0;display:flex;flex-direction:column;gap:10px;padding:22px 0 20px 22px}
.cat-tile__head{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px}
.cat-tile__name{font-size:26px;font-weight:700;line-height:1;text-transform:uppercase}
.cat-tile__count{font-size:13px;font-weight:600;color:var(--c-primary)}
.cat-tile__text{font-size:14px;line-height:1.45;opacity:.8}
.cat-tile__list{font-size:13px;line-height:1.5}
.cat-tile__meta{margin-top:auto;display:flex;flex-wrap:wrap;gap:6px 16px;padding-top:10px;border-top:1px solid rgba(127,127,127,.25);font-size:13px;opacity:.85}
.cat-tile__media{flex:1 1 42%;min-width:0;display:flex;align-items:center;justify-content:center;padding:12px 12px 12px 0}
.cat-tile__media img{width:100%;max-height:170px;object-fit:contain;transition:transform .4s}
.cat-tile:hover .cat-tile__media img{transform:scale(1.04)}
.cat-grid__cell{display:flex}.cat-grid__cell>.cat-card{flex:1}
.cat-grid__cell[hidden]{display:none}
.cat-home-lineup .cat-chips button.cat-chip{background:transparent;cursor:pointer;font:inherit}
.cat-home-lineup .cat-chips button.cat-chip.is-active{background:var(--c-dark,#111315);border-color:var(--c-dark,#111315);color:#fff}
.cat-home-lineup__more{margin-top:28px;text-align:center}
@media (max-width:520px){.cat-tiles{grid-template-columns:1fr}.cat-tile{flex-direction:column-reverse}.cat-tile__body{padding:0 18px 18px}.cat-tile__media{padding:14px}}
@media (prefers-reduced-motion:reduce){.cat-tile__media img,.cat-tile{transition:none}}
.cat-product__top>*,.cat-cart__grid>*{min-width:0}
