/* =====================================================================
   Исследования: каталог с фильтрами и страница исследования.
   Дополняет css/blog.css (общая шапка страницы, кнопки, типографика).
   ===================================================================== */

.rs { --b-line: #e4e4e2; }
.rs-body { padding: 52px 0 110px; }
.rs [hidden] { display: none !important; }

/* ---------- панель над списком ---------- */
.rs-bar { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; padding-bottom: 22px; border-bottom: 2px solid var(--b-gray); }
.rs-count { margin: 0 auto 0 0; font: 600 16px/1 'GilroyRad', Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--b-muted); }
.rs-count b { margin-left: 6px; font: 700 36px/1 'Fatal', Arial, sans-serif; letter-spacing: 0; color: var(--b-ink); vertical-align: -3px; }
.rs-sort { display: flex; align-items: center; gap: 12px; font: 600 14px/1 'GilroyRad', Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--b-muted); }
.rs-sort select {
  appearance: none; -webkit-appearance: none; height: 48px; padding: 0 46px 0 16px; border: 2px solid var(--b-ink); border-radius: 0; cursor: pointer;
  font: 600 16px/1 'GilroyRad', Arial, sans-serif; color: var(--b-ink); background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%231e1e1e' stroke-width='2'><path d='M1 1l5 5 5-5'/></svg>") right 16px center / 12px 8px no-repeat;
  transition: border-color .25s;
}
.rs-sort select:hover, .rs-sort select:focus-visible { border-color: var(--b-red); outline: none; }
.rs-filterbtn {
  display: none; align-items: center; gap: 12px; height: 48px; padding: 0 18px; border: 0; cursor: pointer;
  background: var(--b-black); color: #fff; font: 700 15px/1 'GilroyRad', Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase;
}
.rs-filterbtn i { width: 16px; height: 16px; background: linear-gradient(#fff, #fff) 0 2px / 16px 2px no-repeat, linear-gradient(#fff, #fff) 0 7px / 16px 2px no-repeat, linear-gradient(#fff, #fff) 0 12px / 16px 2px no-repeat; }
.rs-filterbtn em { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--b-red); font: 700 13px/22px 'GilroyRad', Arial, sans-serif; font-style: normal; text-align: center; }

/* ---------- раскладка ---------- */
.rs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
.rs-filters { background: #fff; border: 2px solid var(--b-ink); box-shadow: 10px 10px 0 -2px var(--b-red); }
.rf__head { display: none; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 2px solid var(--b-ink); font: 700 30px/1 'Fatal', Arial, sans-serif; text-transform: uppercase; }
.rf__x { position: relative; width: 40px; height: 40px; border: 0; background: var(--b-red); cursor: pointer; }
.rf__x::before, .rf__x::after { content: ''; position: absolute; left: 10px; top: 19px; width: 20px; height: 2px; background: #fff; transform: rotate(45deg); }
.rf__x::after { transform: rotate(-45deg); }
.rf { margin: 0; padding: 22px 22px 20px; border: 0; border-bottom: 2px solid var(--b-gray); min-width: 0; }
.rf__t { float: left; width: 100%; margin: 0 0 16px; padding: 0; font: 700 25px/1 'Fatal', Arial, sans-serif; text-transform: uppercase; color: var(--b-ink); }
.rf__t::after { content: ''; display: block; width: 34px; height: 4px; margin-top: 9px; background: var(--b-red); }
.rf__t + * { clear: both; }
.rf__in {
  width: 100%; height: 48px; padding: 0 14px; border: 2px solid var(--b-ink); border-radius: 0; background: #fff; box-sizing: border-box;
  font: 500 17px/1 'GilroyRad', Arial, sans-serif; color: var(--b-ink); outline: none; transition: border-color .25s, box-shadow .3s var(--b-ease);
}
.rf__in:focus { border-color: var(--b-red); box-shadow: 4px 4px 0 rgba(205, 18, 19, .16); }
.rf__in::placeholder { color: #8f8f8d; }
.rf__price { display: flex; align-items: center; gap: 10px; }
.rf__price span { flex: none; width: 10px; height: 2px; background: var(--b-ink); }


.chk { position: relative; display: flex; align-items: center; gap: 13px; padding: 8px 0; cursor: pointer; font: 500 17px/1.25 'GilroyRad', Arial, sans-serif; color: var(--b-ink); -webkit-tap-highlight-color: transparent; }
.chk input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.chk i { position: relative; flex: none; width: 22px; height: 22px; border: 2px solid var(--b-ink); background: #fff; transition: background-color .2s, border-color .2s, transform .3s var(--b-ease); }
.chk i::after { content: ''; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .25s var(--b-ease); }
.chk:hover i { border-color: var(--b-red); }
.chk input:checked + i { background: var(--b-red); border-color: var(--b-red); }
.chk input:checked + i::after { transform: rotate(45deg) scale(1); }
.chk input:focus-visible + i { outline: 3px solid var(--b-yellow); outline-offset: 2px; }
.chk span { flex: 1; min-width: 0; }
.chk em { flex: none; font: 600 14px/1 'GilroyRad', Arial, sans-serif; font-style: normal; color: var(--b-muted); }
.chk input:checked ~ em { color: var(--b-red); }

.rf__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; }
.rf__reset { border: 0; background: none; padding: 0; cursor: pointer; font: 700 14px/1 'GilroyRad', Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--b-red); text-decoration: underline; text-underline-offset: 4px; }
.rf__apply { display: none; }

/* ---------- выбранные условия ---------- */
.rs-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.rs-chips:empty { display: none; }
.rs-chip { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 0 0 14px; background: var(--b-black); color: #fff; font: 600 15px/1 'GilroyRad', Arial, sans-serif; }
.rs-chip button { position: relative; width: 38px; height: 38px; border: 0; background: var(--b-red); cursor: pointer; transition: background-color .25s; }
.rs-chip button:hover { background: #fff; }
.rs-chip button::before, .rs-chip button::after { content: ''; position: absolute; left: 12px; top: 18px; width: 14px; height: 2px; background: #fff; transform: rotate(45deg); transition: background-color .25s; }
.rs-chip button::after { transform: rotate(-45deg); }
.rs-chip button:hover::before, .rs-chip button:hover::after { background: var(--b-red); }
.rs-chip--clear { padding: 0 14px; background: none; color: var(--b-ink); border: 2px solid var(--b-ink); cursor: pointer; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.rs-chip--clear:hover { border-color: var(--b-red); color: var(--b-red); }

/* ---------- карточка исследования ---------- */
.rs-list { display: grid; gap: 26px; }
.rcard { display: grid; grid-template-columns: 170px minmax(0, 1fr) 236px; gap: 30px; padding: 26px; background: #fff; border: 2px solid var(--b-line); transition: border-color .3s, box-shadow .45s var(--b-ease), transform .45s var(--b-ease); }
.rcard:hover { border-color: var(--b-ink); box-shadow: 10px 10px 0 -2px var(--b-red); transform: translate(-3px, -3px); }
.rcard__cover { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--b-gray); align-self: start; }
.rcard__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--b-ease); }
.rcard:hover .rcard__cover img { transform: scale(1.05); }
.rph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; background: var(--b-black); color: #fff; }
.rph::before { content: ''; position: absolute; right: 0; top: 18%; width: 46%; aspect-ratio: 1; background: var(--b-red); opacity: .92; }
.rph__sq { position: relative; display: flex; gap: 4px; }
.rph__sq i { width: 9px; height: 9px; background: #efefef; }
.rph__sq i.r { background: var(--b-red); }
.rph__t { position: relative; font: 700 21px/1.05 'Fatal', Arial, sans-serif; text-transform: uppercase; overflow-wrap: anywhere; }
.rcard__body { min-width: 0; }
.rcard__title { margin: 0; font: 700 clamp(26px, 2.5vw, 34px)/1.04 'Fatal', Arial, sans-serif; text-transform: uppercase; color: var(--b-ink); }
.rcard__title a { color: inherit; text-decoration: none; transition: color .3s; }
.rcard__title a:hover { color: var(--b-red); }
.rmeta { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 7px; }
.rmeta li { display: block; font: 500 16px/1.4 'GilroyRad', Arial, sans-serif; color: var(--b-ink); }
.rmeta span { color: var(--b-muted); }
.rmeta span::after { content: ':'; }
.rmeta b { margin-left: 7px; font-weight: 600; }
.rcard__text { margin: 16px 0 0; font: 500 16px/1.5 'GilroyRad', Arial, sans-serif; color: #4a4a48; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rcard__buy { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding-left: 30px; border-left: 2px solid var(--b-gray); }
.rcard__price { font: 700 44px/1 'Fatal', Arial, sans-serif; color: var(--b-ink); white-space: nowrap; margin-bottom: 4px; }

.bbtn--sm { height: 54px; padding: 0 70px 0 18px; font-size: 27px; justify-content: flex-start; }
.bbtn--sm::after { width: 54px; background-size: 24px 15px; }
.rbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 8px 16px; border: 2px solid var(--b-ink); background: #fff;
  font: 700 15px/1.1 'GilroyRad', Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; color: var(--b-ink); text-align: center;
  transition: background-color .3s var(--b-ease), color .3s var(--b-ease), border-color .3s;
}
.rbtn small { display: block; margin-top: 3px; font: 500 11px/1 'GilroyRad', Arial, sans-serif; letter-spacing: .04em; color: var(--b-muted); text-transform: none; transition: color .3s; }
.rbtn__ic { flex: none; width: 16px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'><path d='M7 0h2v10.2l3.3-3.3 1.4 1.4L8 14 2.3 8.3l1.4-1.4L7 10.2zM0 16h16v2H0z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'><path d='M7 0h2v10.2l3.3-3.3 1.4 1.4L8 14 2.3 8.3l1.4-1.4L7 10.2zM0 16h16v2H0z'/></svg>") center / contain no-repeat; }
.rbtn:hover, .rbtn:focus-visible { background: var(--b-ink); color: #fff; }
.rbtn:hover small, .rbtn:focus-visible small { color: #cfcfcd; }
.rbtn--wide { min-width: 220px; }
.rlink { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: 2px; font: 700 14px/1 'GilroyRad', Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--b-ink); text-decoration: none; }
.rlink i { width: 24px; height: 14px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24' fill='none' stroke='%23cd1213' stroke-width='3'><path d='M1 12h36M27 2l10 10-10 10'/></svg>") center / contain no-repeat; transition: transform .4s var(--b-ease); }
.rlink:hover i { transform: translateX(6px); }
.rlink:hover { color: var(--b-red); }

.rs-empty { margin: 40px 0; font: 500 20px/1.4 'GilroyRad', Arial, sans-serif; color: var(--b-muted); }
.rs-empty .linkbtn { border: 0; background: none; padding: 0; font: 700 16px/1 'GilroyRad', Arial, sans-serif; color: var(--b-red); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.rs-more { margin: 40px auto 0; }
.rs-scrim { position: fixed; inset: 0; z-index: 1999; background: rgba(15, 15, 14, .62); opacity: 0; visibility: hidden; transition: opacity .35s var(--b-ease), visibility 0s linear .35s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rs-scrim.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
html.rs-lock, html.rs-lock body { overflow: hidden; }

/* ---------- страница исследования ---------- */
.rprod { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 52px; align-items: start; }
.rprod__cover { position: relative; aspect-ratio: 3 / 4; background: var(--b-gray); overflow: hidden; box-shadow: 14px 14px 0 -2px var(--b-red); }
.rprod__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rprod__cover .rph__t { font-size: 34px; }
.rprod .post-title--sm { font-size: clamp(34px, 4.6vw, 62px); }
.rprod__lead { margin: 22px 0 0; font: 500 20px/1.55 'GilroyRad', Arial, sans-serif; color: #444; max-width: 720px; }
.rprod .rmeta { margin-top: 26px; max-width: 520px; }
.rprod .rmeta li { font-size: 18px; padding: 9px 0; border-bottom: 1px solid var(--b-line); }
.rprod .rmeta li span { display: inline-block; min-width: 190px; }
.rprod .rmeta b { margin-left: 0; }
.rprod__buy { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 30px; padding-top: 26px; border-top: 2px solid var(--b-gray); }
.rprod__price { font: 700 58px/1 'Fatal', Arial, sans-serif; color: var(--b-ink); white-space: nowrap; margin-right: 6px; }
.rs .post-head { padding-bottom: 56px; }
.rs .post-body { margin-top: 0; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1199px) {
  .rcard { grid-template-columns: 150px minmax(0, 1fr) 210px; gap: 24px; }
  .rprod { grid-template-columns: 260px minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 959px) {
  .rs-body { padding: 36px 0 80px; }
  .rs-layout { grid-template-columns: 1fr; }
  .rs-filterbtn { display: inline-flex; }
  .rs-filters {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 2000; width: min(92vw, 400px); max-height: none; overflow-y: auto; border: 0; box-shadow: none;
    transform: translateX(-104%); transition: transform .5s var(--b-ease), visibility 0s linear .5s; visibility: hidden;
  }
  .rs-filters.is-open { transform: none; visibility: visible; transition-delay: 0s; box-shadow: 14px 0 0 -2px var(--b-red); }
  .rf__head { display: flex; position: sticky; top: 0; z-index: 2; background: #fff; }
  .rf__foot { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--b-ink); padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); }
  .rf__apply { display: inline-flex; }
  .rs-bar { flex-wrap: wrap; gap: 14px; }
  .rs-count { flex: 1 1 100%; order: -1; }
  .rs-sort span { display: none; }
  .rs-sort { margin-left: auto; }
  .rcard { grid-template-columns: 128px minmax(0, 1fr); gap: 20px; padding: 20px; }
  .rcard__buy { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 18px 0 0; border-left: 0; border-top: 2px solid var(--b-gray); gap: 12px 16px; }
  .rcard__price { flex: 1 1 100%; margin: 0; font-size: 40px; }
  .rcard__buy .bbtn, .rcard__buy .rbtn { flex: 1 1 200px; }
  .rprod { grid-template-columns: 1fr; gap: 34px; }
  .rprod__cover { width: min(260px, 70%); }
}
@media (max-width: 639px) {
  .rs-sort select { height: 48px; padding-right: 40px; font-size: 15px; }
  .rcard { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .rph { padding: 9px; } .rph__t { font-size: 14px; } .rph__sq i { width: 6px; height: 6px; }
  .rcard__title { font-size: 24px; }
  .rmeta { margin-top: 12px; gap: 4px; } .rmeta li { font-size: 14px; }
  .rcard__text { display: none; }
  .rprod__price { font-size: 46px; }
  .rprod .rmeta li span { min-width: 140px; }
  .rprod__buy .bbtn, .rprod__buy .rbtn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rcard, .rcard__cover img, .rs-filters, .rs-scrim, .chk i, .chk i::after, .rlink i { transition: none; }
}

.chk--sub { padding-left: 33px; }
.chk--sub span { font-size: 16px; color: #4a4a48; }
