/* Отдельные страницы: под заказ, дизайнерам, работы, статьи, контакты, SEO-тексты */
.ftr__in { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.hero--page { padding: 28px 0 56px; }
.split--top { align-items: start; margin-top: 8px; }
.sec--tight { padding: 40px 0; }
.mt { margin-top: 48px; }
.chips--mb { margin-bottom: 24px; flex-wrap: wrap; overflow: visible; }

.seo-text { font-size: 16px; line-height: 1.7; color: #2a2926; }
.seo-text h2 { font-size: 26px; margin: 1.6em 0 .5em; }
.seo-text h3 { font-size: 19px; margin: 1.4em 0 .4em; }
.seo-text > :first-child { margin-top: 0; }
.seo-text p, .seo-text ul, .seo-text ol { margin: 0 0 1em; }
.seo-text ul, .seo-text ol { padding-left: 1.3em; }
.seo-text li { margin-bottom: .35em; }
.seo-text a { color: var(--ink); text-decoration-color: var(--stone); text-underline-offset: 3px; }
.seo-text img { border-radius: var(--r); margin: 1em 0; }
.seo-text table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15px; }
.seo-text th, .seo-text td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

.faq { display: grid; gap: 10px; margin-top: 20px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 28px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 22px; font-weight: 400; color: var(--stone); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 14px; color: var(--muted); }
.faq details > div p { margin: 0; }

.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.work { display: flex; flex-direction: column; text-decoration: none; }
.work__img { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--tint); }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.work:hover .work__img img { transform: scale(1.03); }
.work__title { font-weight: 700; margin-top: 10px; }
.work__place { font-size: 13px; color: var(--muted); }
.empty-works { background: var(--tint); border-radius: var(--r); padding: 32px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.empty-works p { margin: 0; max-width: 60ch; }
.empty-works .btn svg { width: 18px; height: 18px; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.gallery a { border-radius: var(--r); overflow: hidden; aspect-ratio: 1; background: var(--tint); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery__big { grid-column: span 2; grid-row: span 2; }

.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.post-card__img { aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--tint); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__date { font-size: 12px; color: var(--muted); margin-top: 6px; }
.post-card__title { font-weight: 700; font-size: 18px; line-height: 1.3; }
.post-card__ex { color: var(--muted); font-size: 14px; }
.article__img { margin: 20px 0 28px; border-radius: var(--r); overflow: hidden; }

.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 40px; }
.contacts__card { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.contacts__card h3 { margin-bottom: 8px; }
.contacts__card .big { font-size: 24px; font-weight: 800; text-decoration: none; }
.contacts__card .btn svg { width: 18px; height: 18px; }

.item__model { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.item__model a { color: var(--ink); font-weight: 600; }

@media (max-width: 960px) {
  .ftr__in { grid-template-columns: 1fr 1fr; }
  .contacts { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ftr__in { grid-template-columns: 1fr; }
}

/* фильтры каталога: строка с поиском и выпадающими списками */
.fbar { position: sticky; top: 77px; z-index: 6; background: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.fbar .cat-search { margin: 0; flex: 1 1 300px; max-width: 380px; height: 44px; }
.fdd { position: relative; }
.fdd summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 14px; white-space: nowrap; background: #fff; user-select: none; }
.fdd summary::-webkit-details-marker { display: none; }
.fdd summary:hover, .fdd[open] summary { border-color: var(--ink); }
.fdd__l { color: var(--muted); }
.fdd b { font-weight: 600; }
.fdd.is-set summary { border-color: var(--ink); background: var(--ink); color: #fff; }
.fdd.is-set .fdd__l { color: #c9c4bb; }
.fdd .caret { margin-left: 4px; }
.fdd[open] .caret { transform: rotate(-135deg) translateY(-1px); }
.fdd__list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 240px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.1); display: grid; gap: 2px; }
.fdd__list a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.fdd__list a:hover { background: var(--tint); }
.fdd__list a.is-on { font-weight: 700; background: var(--tint); }
.fdd__list small { color: var(--muted); }
.fbar__reset { font-size: 14px; color: var(--muted); padding: 0 6px; }
.fbar__reset:hover { color: var(--ink); }
.cat-head { margin-bottom: 8px; }
@media (max-width: 960px) { .fbar { top: 64px; } }
@media (max-width: 640px) {
  .fbar { position: static; gap: 8px; }
  .fbar .cat-search { flex-basis: 100%; max-width: none; }
  .fdd { flex: 1 1 0; min-width: 0; }
  .fdd summary { width: 100%; padding: 0 10px; font-size: 13px; justify-content: space-between; }
  .fdd__l { display: none; }
  .fdd b { overflow: hidden; text-overflow: ellipsis; }
  .fdd:last-of-type .fdd__list { left: auto; right: 0; }
}

/* первый экран: настоящие фото работ вместо карточек */
.hero__photos { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 560px; }
.hero__photos picture { border-radius: 14px; overflow: hidden; background: var(--tint); }
.hero__photos picture.is-big { grid-row: span 2; }
.hero__photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 960px) { .hero__photos { height: 420px; } }
@media (max-width: 640px) { .hero__photos { height: 300px; gap: 8px; } }

/* фото изделия: не растягиваем больше родного размера, чтобы не было «мыла» */
.item__main { padding: 24px; }
.item__main img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.card__img img { image-rendering: auto; }

/* фото в шапке страниц «Под заказ» и «Дизайнерам» */
.page-photo { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--tint); }
.page-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ticks--hero { margin-top: 28px; font-size: 15px; gap: 10px; }

/* лаконичнее: карточки без кнопок, вся карточка кликабельна */
.card { position: relative; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__body { padding-bottom: 16px; }
.cta2__alt { font-size: 15px; color: var(--muted); margin-top: 20px; }
.cta2__alt a { color: var(--ink); font-weight: 600; }

/* карточка: реакция на наведение и подсказка «Подробнее» */
.card { transition: border-color .2s, box-shadow .2s, transform .2s; }
.card__img { position: relative; overflow: hidden; }
.card__img img { transition: transform .45s ease; }
.card__peek { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px); opacity: 0; padding: 8px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .02em; transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.card__more .arr { font-style: normal; transition: transform .2s; }
@media (hover: hover) {
  .card__more { opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
  .card:hover { border-color: #cfc9be; box-shadow: 0 14px 36px rgba(0,0,0,.08); transform: translateY(-3px); }
  .card:hover .card__img img { transform: scale(1.05); }
  .card:hover .card__peek { opacity: 1; transform: translate(-50%, 0); }
  .card:hover .card__more { opacity: 1; transform: none; }
  .card:hover .card__more .arr { transform: translateX(3px); }
}
/* на телефоне наведения нет: подсказка «Подробнее →» видна всегда, а значок на фото не нужен */
@media (hover: none) { .card__peek { display: none; } }
@media (hover: hover) { .card__more { display: none; } }

/* разделы каталога на главной: в один ряд и с той же реакцией на наведение, что у карточек */
.cats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cat { transition: border-color .2s, box-shadow .2s, transform .2s; }
.cat__img { position: relative; overflow: hidden; }
.cat__img img { transition: transform .45s ease; }
.cat--custom { justify-content: flex-end; padding: 18px 4px; }
.cat--custom .cat__name { font-size: 18px; }
.cat--custom::after { content: "→"; position: absolute; top: 18px; right: 18px; font-size: 22px; transition: transform .2s; }
@media (hover: hover) {
  .cat:hover { border-color: #cfc9be; box-shadow: 0 14px 36px rgba(0,0,0,.08); transform: translateY(-3px); }
  .cat:hover .cat__img img { transform: scale(1.05); }
  .cat:hover .card__peek { opacity: 1; transform: translate(-50%, 0); }
  .cat--custom:hover { background: #000; border-color: #000; }
  .cat--custom:hover::after { transform: translateX(4px); }
}
@media (max-width: 1100px) { .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* карточки работ: эффект при наведении, описание */
.work { position: relative; border-radius: 14px; transition: transform .2s; }
.work__img { position: relative; display: block; }
.work__img img { transition: transform .5s ease; }
.work__place { margin-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--stone); }
.work__title { margin-top: 4px; font-size: 18px; line-height: 1.3; }
.work__ex { margin-top: 6px; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) {
  .work:hover .work__img { box-shadow: 0 16px 40px rgba(0,0,0,.12); }
  .work:hover .work__img img { transform: scale(1.06); }
  .work:hover .card__peek { opacity: 1; transform: translate(-50%, 0); }
  .work:hover .work__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
}
.work__img { transition: box-shadow .2s; }

/* страница работы */
.work-page__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.work-page__head h1 { margin: 0; max-width: 22ch; }
.work-page__meta { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.work-page__meta li { display: flex; flex-direction: column; font-weight: 600; }
.work-page__meta span { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.work-page__meta a { text-decoration: none; }
.gallery { margin-top: 24px; }
.gallery a { position: relative; cursor: zoom-in; }
.gallery a img { transition: transform .4s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery--1 { grid-template-columns: 1fr; }
.gallery--1 .gallery__big { grid-column: auto; grid-row: auto; aspect-ratio: 16 / 9; }
.gallery--2 { grid-template-columns: 1fr 1fr; }
.gallery--2 .gallery__big { grid-column: auto; grid-row: auto; }
.gallery__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-weight: 700; font-size: 18px; }
.gallery a:nth-child(n+6) { display: none; }
.work-page__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; margin-top: 48px; align-items: start; }
.work-page__side { position: sticky; top: 100px; background: var(--tint); border-radius: 14px; padding: 24px; }
.work-page__side h3 { margin-bottom: 6px; }
.work-page__side p { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.work-page__side .btn { width: 100%; }
@media (max-width: 960px) { .work-page__body { grid-template-columns: 1fr; gap: 28px; } .work-page__side { position: static; } }

/* просмотр фото на весь экран */
.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12,12,12,.94); }
.lb[open] { display: grid; place-items: center; }
.lb::backdrop { background: rgba(0,0,0,.6); }
.lb__img { max-width: calc(100vw - 140px); max-height: calc(100vh - 100px); object-fit: contain; border-radius: 6px; }
.lb__x, .lb__nav { position: absolute; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; border-radius: 50%; width: 52px; height: 52px; font-size: 30px; line-height: 1; display: grid; place-items: center; }
.lb__x:hover, .lb__nav:hover { background: rgba(255,255,255,.22); }
.lb__x { top: 18px; right: 18px; }
.lb__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb__count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #ddd; font-size: 14px; }
@media (max-width: 640px) { .lb__img { max-width: 100vw; } .lb__nav { width: 44px; height: 44px; background: rgba(0,0,0,.35); } }
.works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
@media (max-width: 960px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .works { grid-template-columns: 1fr; } }
/* раскладка галереи без пустых клеток при 3 и 4 фото */
.gallery--3 { grid-template-columns: 2fr 1fr; }
.gallery--3 .gallery__big { grid-column: auto; grid-row: span 2; aspect-ratio: auto; }
.gallery--4 a:last-child { grid-column: span 2; aspect-ratio: 2 / 1; }
@media (max-width: 960px) { .gallery--4 a:last-child { grid-column: auto; aspect-ratio: 1; } .gallery--3 { grid-template-columns: 1fr 1fr; } .gallery--3 .gallery__big { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; } }

/* текст работы и плашка «Хотите так же?» на той же сетке, что галерея: края совпадают */
.work-page__body { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 40px; }
.work-page__body .seo-text { grid-column: 1 / span 3; padding-right: 48px; max-width: 760px; }
.work-page__side { grid-column: 4; }
@media (max-width: 960px) {
  .work-page__body { grid-template-columns: 1fr; gap: 28px; }
  .work-page__body .seo-text, .work-page__side { grid-column: auto; padding-right: 0; }
}

/* шапка страницы работы: заголовок и под ним одна тихая строка с данными */
.work-page__head { display: block; margin-bottom: 0; }
.work-page__head h1 { font-size: clamp(28px, 3vw, 42px); font-weight: 800; line-height: 1.15; max-width: 26ch; margin: 0 0 14px; }
.work-page__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--muted); }
.work-page__meta li { display: inline-flex; align-items: center; font-weight: 500; }
.work-page__meta li + li::before { content: ""; width: 1px; height: 14px; background: var(--line); margin: 0 14px; }
.work-page__meta a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.work-page__meta a:hover { border-color: var(--ink); }
.work-page__meta li { flex-direction: row; }
.work-page__head h1 { max-width: 36ch; text-wrap: balance; }

/* без «нейросетевых» приёмов: никаких мелких подписей капсом с разрядкой и нумерации 01/02 */
.card__code { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.work__place { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.feat { padding-top: 20px; }
.feat h3 { margin-top: 0; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
