/* Каталог: главная каталога, раздел, карточка модели. Токены берутся из styles.css. */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 22px; font-size: 14.5px; color: var(--on-navy-2); }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs a::after { content: "/"; margin-left: 10px; color: var(--on-navy-2); }
.crumbs--ink { color: var(--ink-2); }
.crumbs--ink a { color: var(--ink); }
.crumbs--ink a::after { color: var(--ink-2); }

.cat { background: var(--steel); padding-block: clamp(40px, 6vw, 80px) clamp(64px, 9vw, 120px); }
.cat--related { background: var(--paper); padding-top: 0; }
.cat__note { margin-top: 28px; color: var(--ink-2); }

/* ── группы разделов ── */
.secgroup + .secgroup { margin-top: clamp(36px, 5vw, 64px); }
.secgroup__title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); font: 800 clamp(34px, 3.6vw, 52px)/.95 var(--display); text-transform: uppercase; }
.secgroup__title span { font: 400 15px/1 var(--text); text-transform: none; color: var(--ink-2); }

/* ── разделы ── */
.secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sec a { display: grid; gap: 4px; height: 100%; padding: 14px 16px 18px; background: var(--paper); border-radius: 6px; text-decoration: none;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base); }
.sec a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(13, 23, 48, .14); }
.sec__pic, .pc__pic { display: grid; place-items: center; aspect-ratio: 4 / 3; margin-bottom: 10px; border-radius: 4px; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 40%, #FFFFFF 0%, #EEF1F6 70%, #E3E8F0 100%); }
.sec__pic img, .pc__pic img { width: 74%; height: auto; mix-blend-mode: multiply; transition: transform var(--t-slow) var(--ease-out); }
.sec a:hover img, .pc a:hover img { transform: scale(1.07); }
.sec__name { font: 700 30px/1 var(--display); text-transform: uppercase; }
.sec__count { color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.sec__ext { font-size: 13px; color: var(--ink-2); }

/* ── поиск по всем моделям ── */
.allsearch { max-width: 720px; margin-bottom: clamp(24px, 3vw, 40px); }
.allsearch .cat__count { margin: 8px 0 0; }
.hits { margin-top: 8px; background: var(--paper); border-radius: 6px; overflow: hidden; }
.hits a { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2px 16px; padding: 11px 16px; text-decoration: none; border-bottom: 1px solid var(--hair); transition: background var(--t-fast); }
.hits li:last-child a { border-bottom: 0; }
.hits a:hover, .hits a:focus-visible { background: #F4F6FA; }
.hits strong { font: 700 24px/1.05 var(--display); overflow-wrap: anywhere; }
.hits span { color: var(--ink-2); font-size: 14px; align-self: center; }

/* ── инструменты раздела ── */
.cat__tools { position: sticky; top: var(--nav-h); z-index: 20; display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 10px clamp(18px, 2.4vw, 32px); align-items: center;
  margin: 0 calc(-1 * var(--gutter)) 12px; padding: 12px var(--gutter); background: rgba(236, 239, 243, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hair); }
.fgroups { display: grid; gap: 8px; min-width: 0; }
.fgroup { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; }
.fgroup__name { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat__search { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.cat__tools .cat__search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cat__search input { font: 400 17px/1.3 var(--text); color: var(--ink); background: var(--paper); border: 1px solid var(--hair); border-radius: 4px; padding: 12px 14px; width: 100%; }
.cat__search input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(27, 69, 201, .16); }
.fchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 28px 2px 2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; white-space: nowrap; padding: 8px 12px; font: 500 15px/1 var(--text); color: var(--ink); background: var(--paper); border: 1px solid var(--hair); border-radius: 4px; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.fchip span { margin-left: 6px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fchip:hover { border-color: var(--ink); }
.fchip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip.is-on span { color: #B9C6EA; }
.cat__count { min-height: 1.5em; margin-bottom: 14px; color: var(--ink-2); font-size: 15px; }
.cat__more { display: flex; margin: 28px auto 0; min-width: 240px; }
.cat__more[hidden] { display: none; }
.cat__empty { padding: 48px 0; font-size: 19px; color: var(--ink-2); }

/* ── карточка в списке ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pc[hidden] { display: none; }
.pc a { display: flex; flex-direction: column; height: 100%; padding: 14px 16px 16px; background: var(--paper); border-radius: 6px; text-decoration: none;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base); }
.pc a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(13, 23, 48, .14); }
.pc__kind { font-size: 13.5px; color: var(--ink-2); }
.pc__model { font: 700 30px/1 var(--display); margin: 2px 0 12px; overflow-wrap: anywhere; }
.pc__keys { display: grid; gap: 0; margin-top: auto; }
.pc__keys > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.pc__keys dt { color: var(--ink-2); }
.pc__keys dd { text-align: right; font-weight: 500; }
.cat--related .pc a { background: var(--steel); }

.pc__pic { position: relative; }
.pc__gone, .pd__gone { position: absolute; z-index: 2; left: 10px; top: 10px; padding: 5px 9px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; border-radius: 4px; }
.pc.is-gone img { opacity: .55; }
.pc__nophoto, .pd__nophoto { color: var(--ink-2); font-size: 13.5px; }
.pd__nophoto { position: relative; z-index: 1; font-size: 16px; }
.pd__gone { left: 16px; top: 16px; font-size: 13px; }
.pd__note { margin: -6px 0 18px; padding: 12px 14px; background: #FFF4E0; border-left: 4px solid var(--amber); border-radius: 4px; font-size: 15.5px; max-width: 36em; }
.pd__model.is-long { font-size: clamp(32px, 3.6vw, 54px); line-height: 1; }

/* ── карточка модели ── */
/* у карточки светлый верх: шапка сразу сплошная, иначе белое меню не видно */
body:has(.pd) .nav { background: rgba(10, 24, 64, .96); }
.pd { background: var(--paper); padding-block: calc(var(--nav-h) + clamp(20px, 3vw, 40px)) clamp(36px, 5vw, 64px); }
.pd__top { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.pd__stage { position: relative; display: grid; place-items: center; margin: 0; aspect-ratio: 4 / 3; max-height: 520px; width: 100%; border-radius: 6px; overflow: hidden;
  background: radial-gradient(70% 62% at 50% 44%, #FFFFFF 0%, #EEF1F6 62%, #DCE2EC 100%); }
.pd__stage::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 13%; height: 7%; border-radius: 50%; background: rgba(13, 23, 48, .2); filter: blur(16px); }
.pd__stage img { position: relative; z-index: 1; width: min(60%, 360px); height: auto; mix-blend-mode: multiply; view-transition-name: product-photo; transform: translate3d(var(--px, 0), var(--py, 0), 0); transition: transform .5s var(--ease-out); }
.js .pd__stage img { animation: pdIn 1s var(--ease-out) both; }
@keyframes pdIn { from { opacity: 0; scale: .92; } }
.pd__new { position: absolute; z-index: 2; left: 16px; top: 16px; padding: 6px 10px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; border-radius: 4px; }
.pd__kind { color: var(--ink-2); font-size: 17px; }
.pd__model { font: 800 clamp(48px, 6.2vw, 96px)/.9 var(--display); margin: 6px 0 clamp(18px, 2.4vw, 28px); overflow-wrap: anywhere; }
.pd__keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(16px, 2.4vw, 32px); }
.pd__keys > div { display: flex; flex-direction: column-reverse; padding: 12px 0 14px; border-top: 2px solid var(--ink); }
.pd__keys dd { font: 700 clamp(28px, 2.6vw, 38px)/1.02 var(--display); font-variant-numeric: tabular-nums; }
.pd__keys .is-long dd { font: 600 17px/1.3 var(--text); }
.pd__keys dt { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.js .pd__keys > div { opacity: 0; animation: fade var(--t-slow) var(--ease-out) forwards; }
.js .pd__keys > div:nth-child(1) { animation-delay: .15s; } .js .pd__keys > div:nth-child(2) { animation-delay: .2s; }
.js .pd__keys > div:nth-child(3) { animation-delay: .25s; } .js .pd__keys > div:nth-child(4) { animation-delay: .3s; }
.pd__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(18px, 2.4vw, 28px); }
.pd__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; font-size: 14px; color: var(--ink-2); }

.pd-body { background: var(--steel); padding-block: clamp(48px, 7vw, 96px); }
.pd-body__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.pd__h { font: 800 clamp(34px, 3.6vw, 52px)/.95 var(--display); text-transform: uppercase; margin-bottom: 16px; }
.pd__lead { font-size: 18px; max-width: 34em; }
.pd-body .ticks { margin-bottom: 8px; }
.pd-body .pd__lead + .pd__h { margin-top: clamp(28px, 4vw, 44px); }
.pd__nospecs p { color: var(--ink-2); max-width: 30em; }
#specs { scroll-margin-top: calc(var(--nav-h) + 16px); }
.specs { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 6px; overflow: hidden; }
.specs th, .specs td { padding: 13px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); font-size: 15.5px; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.specs th { width: 42%; font-weight: 400; color: var(--ink-2); }
.specs td { font-weight: 500; }
.specs tr { transition: background var(--t-fast); }
.specs tr:hover { background: #F4F6FA; }

.req__product { margin-top: -6px; padding: 10px 12px; background: rgba(255, 255, 255, .1); border-radius: 4px; font-weight: 600; }

/* плашка с кнопкой, когда первый экран карточки ушёл вверх */
.pd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 0; background: rgba(10, 24, 64, .94); color: #fff;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transform: translateY(110%); transition: transform var(--t-base) var(--ease-out); }
.pd-bar.is-on { transform: none; }
.pd-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pd-bar__name { display: grid; min-width: 0; }
.pd-bar__name strong { font: 700 26px/1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-bar__name span { font-size: 13px; color: var(--on-navy-2); }
.pd-bar .btn { min-height: 42px; flex: none; }

@media (max-width: 860px) {
  .cat__tools, .pd__top, .pd-body__grid { grid-template-columns: 1fr; }
  .secs, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sec__name, .pc__model { font-size: 25px; }
  .pc__keys > div { flex-direction: column; gap: 0; }
  .pc__keys dd { text-align: left; }
  .specs th, .specs td { padding: 11px 12px; font-size: 15px; }
}
@media (max-width: 420px) {
  .pd__keys { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .js .pd__keys > div { opacity: 1; }
  .pd__stage img { transform: none; }
}

/* ── соседние модели ── */
.pd__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: clamp(24px, 3vw, 40px); padding-top: 14px; border-top: 1px solid var(--hair); }
.pd__nav a { display: grid; gap: 2px; text-decoration: none; min-width: 0; }
.pd__nav a[rel="next"] { text-align: right; }
.pd__nav span { font-size: 13.5px; color: var(--ink-2); }
.pd__nav strong { font: 700 26px/1.05 var(--display); overflow-wrap: anywhere; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat; transition: background-size var(--t-base) var(--ease-out); justify-self: start; }
.pd__nav a[rel="next"] strong { justify-self: end; background-position: 100% 100%; }
.pd__nav a:hover strong { background-size: 100% 2px; }

/* ── переход между страницами: фото переезжает из списка в карточку ── */
::view-transition-group(product-photo) { animation-duration: .5s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
.vt .pd__stage img { animation: none; }
.vt.js .pd__keys > div { animation-delay: .25s; }

@media (max-width: 860px) {
  .cat__tools { position: static; margin-inline: 0; padding: 0 0 12px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; grid-template-columns: 1fr; }
  .fgroup { grid-template-columns: 1fr; gap: 4px; }
  .fchips { margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .pd__nav strong { font-size: 21px; }
}
