/* ── Каталог проектов ── */
.catalog { padding: 96px 0 110px; }
.cat-head { display: flex; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding: 0 8px; }
.cat-head .eyebrow { font: 700 13px var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.cat-head h2 { font-weight: 800; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin-top: 12px; max-width: 15em; }
.cat-head p { color: var(--muted); margin-top: 14px; max-width: 34em; }
.cat-head .btn { margin-left: auto; }

/* Панель: стиль + комплектация */
.cat-bar { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; margin: 40px 0 26px; padding: 0 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-f {
  height: 42px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: var(--ink); font: 700 14px var(--f-head);
  box-shadow: inset 0 0 0 1.5px rgba(26,26,26,.08); transition: background .2s, color .2s;
}
.chip-f:hover { box-shadow: inset 0 0 0 1.5px rgba(26,26,26,.25); }
.chip-f.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip-f sup { font-size: 11px; opacity: .55; margin-left: 3px; }

.kit { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.seg { display: flex; padding: 4px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(26,26,26,.06); }
.seg button {
  height: 36px; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer; background: none;
  font: 700 13.5px var(--f-head); color: var(--muted); transition: background .2s, color .2s;
}
.seg button.on { background: var(--cream); color: var(--ink); }
.kit-hint { font-size: 13px; color: var(--muted); }

/* Карточки */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.p-card {
  background: #fff; border-radius: 26px; overflow: hidden; display: flex; flex-direction: column;
  cursor: pointer; transition: transform .25s, box-shadow .25s;
}
.p-card:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -30px rgba(26,26,26,.35); }
.p-card[hidden] { display: none; }
.p-img { position: relative; aspect-ratio: 4 / 3; background: #e9e7e3; overflow: hidden; }
.p-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s; }
.p-img img.alt { opacity: 0; }
.p-img img.plan { object-fit: contain; background: #fff; padding: 10px; opacity: 0; }
.p-card:hover .p-img img.alt { opacity: 1; }
.p-card.show-plan .p-img img.plan { opacity: 1; }
.p-tag {
  position: absolute; z-index: 2; left: 14px; bottom: 14px; max-width: calc(100% - 28px);
  padding: 7px 12px; border-radius: 10px; background: var(--amber); color: #fff; font: 700 12.5px var(--f-head);
}
.p-view { position: absolute; z-index: 2; right: 12px; top: 12px; display: flex; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.92); }
.p-view button { border: 0; background: none; cursor: pointer; height: 30px; padding: 0 11px; border-radius: 9px; font: 700 12.5px var(--f-head); color: var(--muted); }
.p-view button.on { background: var(--ink); color: #fff; }
.p-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-name { font: 700 20px/1.2 var(--f-head); letter-spacing: -.01em; }
.p-meta { font-size: 15px; color: var(--muted); }
.p-price { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 16px; flex-wrap: wrap; }
.p-price b { font: 800 24px var(--f-head); letter-spacing: -.02em; transition: opacity .2s; }
.p-price span { font-size: 13px; color: var(--muted); }
.p-price.swap b { opacity: 0; }

/* Карточка «свой проект» */
.p-own {
  background: var(--forest); color: var(--cream); border-radius: 26px; padding: 34px 30px;
  display: flex; flex-direction: column; gap: 14px; min-height: 100%;
}
.p-own h3 { font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.p-own p { opacity: .85; }
.p-own .zero { font: 800 64px/1 var(--f-head); letter-spacing: -.04em; margin-top: auto; }
.p-own .zero small { display: block; font: 600 14px var(--f-text); letter-spacing: 0; opacity: .75; margin-top: 6px; }
.p-own .btn { align-self: flex-start; }

.more-row { display: flex; justify-content: center; margin-top: 34px; }
.more-row .btn small { font: 600 13px var(--f-text); opacity: .55; }

/* Окно проекта */
.modal { position: fixed; inset: 0; z-index: 2147483000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20,20,20,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal.open { display: flex; }
.m-box { position: relative; width: min(1120px, 100%); max-height: calc(100svh - 48px); overflow: auto; background: #fff; border-radius: 30px; display: grid; grid-template-columns: 1.35fr 1fr; }
.m-close { position: absolute; z-index: 3; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--paper); font-size: 22px; line-height: 1; }
.m-gal { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.m-main { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #f2f1ee; }
.m-main img { width: 100%; height: 100%; object-fit: cover; }
.m-main img.plan { object-fit: contain; background: #fff; }
.m-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.m-thumbs button { flex: none; width: 92px; height: 70px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 2px transparent; opacity: .6; transition: opacity .2s; position: relative; }
.m-thumbs button.on { opacity: 1; box-shadow: 0 0 0 2px var(--amber); }
.m-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.m-thumbs img.plan { object-fit: contain; }
.m-thumbs button span { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: var(--ink); color: #fff; font: 700 10px var(--f-head); }
.m-info { padding: 40px 34px 30px 18px; display: flex; flex-direction: column; }
.m-info .p-tag { position: static; align-self: flex-start; }
.m-info h3 { font-weight: 800; font-size: 32px; line-height: 1.1; letter-spacing: -.02em; margin-top: 16px; }
.m-info .p-meta { margin-top: 6px; font-size: 16px; }
.m-prices { margin: 24px 0 0; border-top: 1.5px solid rgba(26,26,26,.07); }
.m-prices div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 4px; border-bottom: 1.5px solid rgba(26,26,26,.07); }
.m-prices div span { color: var(--muted); font-size: 15px; }
.m-prices div b { font: 700 18px var(--f-head); white-space: nowrap; }
.m-prices div.on { background: var(--cream); border-radius: 12px; border-color: transparent; padding: 13px 12px; margin: 0 -8px; }
.m-prices div.on span { color: var(--ink); }
.m-perks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 15px; }
.m-perks li { display: flex; gap: 10px; }
.m-perks li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--forest); }
.m-cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.m-cta .btn { flex: 1; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit { margin-left: 0; align-items: flex-start; }
}
@media (max-width: 640px) {
  .catalog { padding: 64px 0 80px; }
  .cat-head .btn { margin-left: 0; width: 100%; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
  .chip-f { flex: none; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 6px; font-size: 12.5px; }
  .modal { padding: 0; align-items: flex-end; }
  .m-box { grid-template-columns: 1fr; border-radius: 26px 26px 0 0; max-height: 92svh; }
  .m-info { padding: 8px 20px 24px; }
  .m-info h3 { font-size: 26px; }
}
.catalog .btn-secondary, .m-cta .btn-secondary { background: #fff; }
.more-row[hidden] { display: none; }
body.modal-open { overflow: hidden; }
body.modal-open [data-vzhuh-edge] { display: none; }
