/* The project page's look (Vladimir 19.10.2026: «берем основным v4 у обекта»; the looks before it -
   docs/variants/2026-10-19_varianty-vida.md, git tag novostroyki-looks-2026-10-19). Over nb.css, three layers in their
   order, one file since the choice:
   1. the catalogue's (Airbnb) pieces: the photo mosaic and the price card (15.10: «Сделай пробный вариант страницы
      объекта … в стиле каталога»);
   2. the mix (.nb--v3, 15.10: «Микс между первым и вторым дизайном»): rounded photos and boxes, hairlines between the
      sections, the price and the button in the tabs once the card is scrolled past;
   3. variant 4 (.nb--v4, 19.10: «Возьмем за основу вариант смесь … как у варианта Airbnb первая часть страницы. Первый и
      второй экраны» → «Давай вариант В. Есть правки»): the second's first two screens - the name and its line, the
      mosaic, the card (a phone - under the photos; a computer - beside the tabs and «О доме»), the first's type
      everywhere («Шрифт везде должен быть как в основном варианте»), the flats' filter - the words with a green line.
   The corporate green for whatever is pressed, never a black fill. */

/* 1. The mosaic: the gallery (its first is the render) - big and four more; a phone - a strip to swipe with its counter */
.ab-mosaic { position: relative; margin: 16px -24px 0; }
.ab-mosaic__list { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; }
.ab-mosaic__list::-webkit-scrollbar { display: none; }
.ab-mosaic__list li { scroll-snap-align: start; }
.ab-mosaic__list a { display: block; height: 100%; }
.ab-mosaic__list img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.nb .ab-mosaic__count { position: absolute; right: 16px; bottom: 14px; padding: 4px 10px; border-radius: 30px; background: rgba(0, 0, 0, .55);
  color: #fff; font-size: 12px; letter-spacing: .04em; }
.ab-mosaic__all { display: none; }
.nb .ab-mosaic__note { margin-top: 10px; }

/* The price card: under the photos on a phone, beside the tabs and «О доме» on a computer */
.ab-book { margin: 20px 0 8px; padding: 22px; border: 1px solid #dddddd; border-radius: 16px; box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.nb .ab-book__price { font-size: 15px; color: var(--muted); }
.ab-book__price b { font-size: 28px; font-weight: 300; letter-spacing: -.01em; color: var(--ink); }
.nb .ab-book__keys { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; border: 1px solid #b0b0b0; border-radius: 10px; }
.ab-book__keys div { padding: 10px 12px; }
.ab-book__keys div + div { border-left: 1px solid #b0b0b0; }
.ab-book__keys dt { font-size: 11px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.nb .ab-book__keys dd { margin-top: 4px; font-size: 16px; font-weight: 400; }
.nb .ab-book__mark { margin-top: 8px; font-size: 12px; line-height: 1.45; color: var(--deep); }   /* a delivery without a date (01_Bloki §1) */
.nb .ab-book__note { margin-top: 12px; text-align: center; font-size: 14px; color: var(--deep); }
.nb .ab-book__lead { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 14px; line-height: 1.5; color: #444; }
.nb .ab-book__date { margin-top: 8px; font-size: 12px; color: var(--muted); }   /* right under the data it dates (Vladimir 15.10) */

@media (min-width: 1024px) {
  .ab-mosaic { margin: 20px 0 0; border-radius: 16px; overflow: hidden; }
  .ab-mosaic__list { grid-auto-flow: row; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 8px; overflow: visible; }
  .ab-mosaic__list li:first-child { grid-row: 1 / 3; }
  /* fewer than five pictures (a house being built - its renders only, Porta Barcelona II 16.11): no empty cells */
  .ab-mosaic--n0 .ab-mosaic__list, .ab-mosaic--n1 .ab-mosaic__list { grid-template-columns: 1fr; }   /* n0 - the hero alone (Abrera Park) */
  .ab-mosaic--n2 .ab-mosaic__list, .ab-mosaic--n3 .ab-mosaic__list { grid-template-columns: 2fr 1fr; }
  .ab-mosaic--n2 .ab-mosaic__list li:nth-child(2) { grid-row: 1 / 3; }
  .ab-mosaic--n4 .ab-mosaic__list li:nth-child(4) { grid-column: 3; grid-row: 1 / 3; }   /* in its place, not second (the review 16.11) */
  .ab-mosaic__list img { aspect-ratio: auto; transition: filter .2s; }
  .ab-mosaic__list a:hover img { filter: brightness(.9); }
  .ab-mosaic__more, .nb .ab-mosaic__count { display: none; }
  .ab-mosaic__all { display: block; position: absolute; right: 20px; bottom: 20px; padding: 8px 16px; border: 1px solid #b0b0b0; border-radius: 10px;
    background: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
}

/* 2. The mix: hairlines between the sections, rounded photos and boxes, the price in the tabs after the card */
.nb--v3 { --hair: #ebebeb; --pale: #e9f4f0; --deep: #17604e; }
.nb--v3 .ab-book { margin: 24px 0 0; }
.nb--v3 .ab-book__btn { width: 100%; margin-top: 16px; }
.nb--v3 .nb-tabs { border-bottom-color: var(--hair); }
.nb--v3 .nb-tabs a:hover { color: var(--deep); border-color: var(--accent); }
.v3-buy { display: none; }
.nb--v3 .nb-sec { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--hair); }
.nb--v3 .nb-tabs + .nb-sec { margin-top: 0; border-top: 0; }
.nb--v3 .nb-h2, .nb--v3 .nb-serv__title { font-weight: 300; letter-spacing: -.005em; text-transform: none; }
.nb--v3 .nb-serv__box { padding-top: 0; padding-bottom: 0; border-top: 0; border-bottom: 0; }
.nb--v3 .nb-hc__pic, .nb--v3 .nb-proj img, .nb--v3 .nb-map, .nb--v3 .nb-map img { border-radius: 12px; overflow: hidden; }
.nb--v3 .nb-ask__card, .nb--v3 .nb-band { border-radius: 16px; }
.nb--v3 .nb-story > div, .nb--v3 .nb-addr, .nb--v3 .nb-lot { border-radius: 12px; }
/* the phone's tiles only: from 768 px the filter is words with a green line under the chosen one (nb.css) - the round
   pale fill on a word looked like a half of each (20.10, the independent layout review, 3) */
@media (max-width: 767px) {
  .nb--v3 .nb-sum__filter button { border-radius: 30px; }
  .nb--v3 .nb-sum__filter button[aria-pressed="true"] { background: var(--pale); }
}
.nb--v3 .nb-lots { border-top-color: var(--hair); }
.nb--v3 .nb-link { border-bottom-color: currentColor; }

@media (min-width: 768px) {
  .nb--v3 .nb-sec { margin-top: 64px; padding-top: 64px; }
  .nb--v3 .nb-tabs { align-items: center; }
  .v3-buy { display: flex; align-items: center; gap: 18px; margin-left: auto; opacity: 0; visibility: hidden;
    transition: opacity .2s, visibility .2s; }
  .v3-buy--on { opacity: 1; visibility: visible; }
  .v3-buy__price { font-size: 14px; color: var(--muted); white-space: nowrap; }
  .v3-buy__price b { font-size: 18px; font-weight: 400; color: var(--ink); }
  .nb--v3 .nb-tabs .v3-buy__btn { min-height: 40px; padding: 0 22px; border: 0; margin: 0; font-size: 14px; letter-spacing: 0;
    text-transform: none; color: #fff; }
  .nb--v3 .nb-tabs .v3-buy__btn:hover { color: #fff; }
  .nb--v3 .nb-serv__box { padding: 32px; border: 1px solid #dddddd; border-radius: 16px; }
}

/* 3. Variant 4. The first screen: the name, the line under it, the mosaic */
.nb--v4 .ab-top { padding-top: 22px; padding-bottom: 0; }
.nb--v4 .ab-top .nb-title { margin: 0 !important; }
.nb--v4 .ab-sub { margin-top: 10px !important; font-size: 15px; font-weight: 300; color: var(--muted); }

/* The price card: two of it - a phone's under the photos, a computer's beside the tabs */
.nb--v4 .ab-book { margin: 20px 0 8px; }
.nb--v4 .ab-book__btn { border-radius: 10px; }
.v4-book--desk { display: none; }

/* The headings as the first's: thin, in capitals (the mix had them in sentence case) */
.nb--v4 .nb-h2 { font-weight: 200; letter-spacing: .01em; text-transform: uppercase; }
.nb--v4 .nb-serv__title { font-weight: 300; letter-spacing: 0; }
.nb--v4 .v4-top, .nb--v4 .v4-tabs { display: contents; }   /* a phone: the tabs stick to the top as everywhere */
.nb--v4 #about { margin-top: 0; border-top: 0; }   /* the tabs' own line is enough (the mix's .nb-tabs + .nb-sec) */

/* The flats' filter stays the approved tiles (2 × 2 on a phone, a green frame with the pale fill on the chosen one - nb.css
   and .nb--v3 above): the fourth look's words with a green line under them and the sideways scroll are gone (Vladimir
   20.10: «Я же выбрал другой вид выделения»; «Эта строка гуляет вверх и вниз если ее тянуть пальцем на телефоне»). */

@media (max-width: 1023px) {   /* a tablet: no room for the price in the tabs - the card is under the photos */
  .nb--v4 .v3-buy { display: none; }
}
@media (min-width: 768px) {
  .nb--v4 .nb-sum__filter { flex-wrap: wrap; gap: 0 40px; margin: 12px 0 0; padding: 0; overflow: visible; }
}

/* A computer: the second's mosaic; the card on the right beside the tabs and «О доме», in view while they are; the
   tabs come over the page the whole width once scrolled past (static/nb.js), the price coming into them after the card */
@media (min-width: 1024px) {
  .nb--v4 .ab-top { padding-top: 28px; }
  .v4-book--phone { display: none; }
  .nb--v4 .v4-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; column-gap: 72px;
    align-items: start; }
  .nb--v4 .v4-top > .v4-tabs { display: block; box-sizing: border-box; grid-row: 1; grid-column: 1; padding-top: 24px; }
  .nb--v4 .v4-top > #about { grid-row: 2; grid-column: 1; margin-top: 0; padding-top: 48px; border-top: 0; }
  .nb--v4 .v4-top > .v4-book--desk { display: block; grid-row: 1 / span 2; grid-column: 2; position: sticky; top: 76px; margin: 24px 0 0; }
  .nb--v4 .v4-tabs .nb-tabs { margin-top: 0; }
  /* over the page: its words where the page's are (the wrap - 1160 px with 48 px each side) */
  .nb--v4 .v4-tabs--fixed .nb-tabs { position: fixed; top: 0; left: 0; right: 0; z-index: 20; margin: 0;
    padding: 0 max(48px, calc((100% - 1064px) / 2)); box-shadow: 0 1px 8px rgba(20, 20, 20, .06); }
}
/* The heart in the price card (Vladimir 20.10, «2. В карточке цены»): the top right corner beside the price, the
   catalogue card's heart - grey glass, green once hearted (static/nb.js) */
.ab-book { position: relative; }
.ab-book__fav { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.ab-book__fav svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; transition: transform .15s; }
.ab-book__fav[aria-pressed="true"] svg { fill: var(--accent); }
.ab-book__fav:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 50%; }
@media (hover: hover) { .ab-book__fav:hover svg { transform: scale(1.12); } }
.nb .ab-book__price { padding-right: 44px; }
/* 20.10, the independent layout review, 8: at 1024-1279 the price card narrower, so «О доме» is not a column of two words */
@media (min-width: 1024px) and (max-width: 1279px) { .nb--v4 .v4-top { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 40px; } }
