/* Страница «Мебель по дизайн-проектам» (dz_proekty.tpl.html, классы pj-*).
   Раскладка - по ширине самого блока (container queries): страница
   выводится рядом с левой колонкой сайта. Окно «Смотреть проект» (.pj-ov)
   строит js/proekty.js в body - его стили в конце файла. */

.pj, .pj *, .pj-ov, .pj-ov * { box-sizing: border-box; }
.pj {
	--pj-blue: #1a6cf0;
	--pj-blue-d: #1557c4;
	--pj-navy: #0f2a55;
	--pj-text: #1f2a37;
	--pj-muted: #5f6b7a;
	--pj-line: #dbe5f1;
	--pj-soft: #f1f7fe;
	container-type: inline-size;
	color: var(--pj-text);
	font-size: 14px;
	line-height: 1.45;
	margin-bottom: 26px;
}
.pj [hidden] { display: none !important; }
.pj button, .pj input { font-family: inherit; }

.pj-crumbs { margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--pj-muted); }
.pj-crumbs a { color: var(--pj-text); text-decoration: none; }
.pj-crumbs a:hover { color: var(--pj-blue); }

.pj-eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #3c5a85; }
.pj .pj-h1 { margin: 0 0 12px; padding: 0; font-size: 44px; line-height: 1.08; font-weight: 800; color: var(--pj-navy); letter-spacing: -.015em; text-align: left !important; }
@container (max-width: 560px) { .pj .pj-h1 { font-size: 29px; } }
.pj .pj-h2 { margin: 0 0 8px; padding: 0; font-size: 26px; line-height: 1.2; font-weight: 800; color: var(--pj-navy); text-align: left; }
.pj .pj-h2--big { font-size: 30px; }
@container (max-width: 560px) { .pj .pj-h2, .pj .pj-h2--big { font-size: 23px; } }
.pj-intro { margin: 0; max-width: 640px; font-size: 16px; line-height: 1.55; color: #33465e; }

/* ---------- кнопки ---------- */
.pj-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid var(--pj-blue); border-radius: 10px; background: var(--pj-blue); color: #fff !important; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none !important; cursor: pointer; box-shadow: 0 6px 16px rgba(26,108,240,.22); transition: background .15s, border-color .15s, box-shadow .15s; }
.pj-btn:hover { background: var(--pj-blue-d); border-color: var(--pj-blue-d); }
.pj-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.pj-btn--line { background: #fff; color: var(--pj-blue) !important; border-color: #a9c7f7; box-shadow: none; }
.pj-btn--line:hover { background: #eef5ff; border-color: var(--pj-blue); }
.pj-btn--sm { min-height: 40px; padding: 0 16px; font-size: 13.5px; border-radius: 8px; gap: 8px; }
.pj-btn--sm svg { width: 15px; height: 15px; }
.pj-btn--wide { width: 100%; min-height: 54px; white-space: nowrap; }
.pj-btn:disabled { opacity: .7; cursor: default; }

/* ---------- шапка: текст слева, кнопки справа ---------- */
.pj-head { display: grid; gap: 18px; margin-bottom: 22px; }
.pj-head__btns { display: flex; flex-wrap: wrap; gap: 10px; }
@container (min-width: 820px) {
	.pj-head { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 28px; }
	.pj-head__btns { flex-direction: column; min-width: 220px; padding-top: 6px; }
}

/* ---------- сравнение «проект / после сборки» ---------- */
.pj-cmp { --pos: 50%; position: relative; overflow: hidden; border-radius: 14px; background: #e9eef5; aspect-ratio: 9 / 4; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
@container (max-width: 700px) { .pj-cmp--hero { aspect-ratio: 4 / 3; } }
.pj-cmp__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pj-cmp__top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.pj-cmp__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(15,42,85,.08); pointer-events: none; }
.pj-cmp__knob { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--pj-navy); box-shadow: 0 4px 14px rgba(15,42,85,.25); transition: transform .15s; }
.pj-cmp__knob svg { width: 20px; height: 20px; }
.pj-cmp:hover .pj-cmp__knob, .pj-cmp.is-drag .pj-cmp__knob { transform: scale(1.08); }
.pj-cmp__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent; }
.pj-cmp__range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; cursor: ew-resize; }
.pj-cmp__range::-moz-range-thumb { width: 44px; height: 100%; border: 0; cursor: ew-resize; }
.pj-cmp__range:focus-visible { opacity: 0; }
.pj-cmp:has(.pj-cmp__range:focus-visible) .pj-cmp__knob { box-shadow: 0 0 0 3px var(--pj-blue), 0 4px 14px rgba(15,42,85,.25); }

.pj-tag { position: absolute; top: 12px; z-index: 1; padding: 5px 11px; border-radius: 7px; background: rgba(255,255,255,.94); color: var(--pj-text); font-size: 13px; font-weight: 600; line-height: 1.2; box-shadow: 0 2px 8px rgba(15,42,85,.12); pointer-events: none; white-space: nowrap; }
.pj-tag--l { left: 12px; }
.pj-tag--r { right: 12px; }
.pj-tag--sm { top: 7px; padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.pj-tag--sm.pj-tag--l { left: 7px; }
.pj-tag--sm.pj-tag--r { right: 7px; }

.pj-note { margin: 0; padding: 7px 12px 8px; border-radius: 0 0 12px 12px; background: var(--pj-soft); color: var(--pj-muted); font-size: 12.5px; text-align: center; }
.pj-cmp--hero + .pj-note { margin-top: -8px; padding-top: 15px; }

/* ---------- вкладки ---------- */
.pj-tabs { display: flex; gap: 8px; margin: 26px 0 16px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
.pj-tabs::-webkit-scrollbar { display: none; }
.pj-tab { flex: 0 0 auto; min-height: 38px; padding: 0 20px; border: 0; border-radius: 19px; background: #eef3f9; color: var(--pj-text); font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.pj-tab:hover { background: #e1ebf7; }
.pj-tab.is-on { background: var(--pj-blue); color: #fff; box-shadow: 0 4px 12px rgba(26,108,240,.25); }

/* ---------- карточки проектов ---------- */
.pj-grid { display: grid; gap: 16px; margin-top: 18px; }
.pj-tabs + .pj-grid { margin-top: 0; }
@container (min-width: 600px) { .pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 960px) { .pj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pj-card { display: flex; flex-direction: column; padding: 8px; border: 1px solid #e6edf6; border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgba(15,42,85,.05); transition: box-shadow .2s; }
.pj-card:hover { box-shadow: 0 10px 28px rgba(15,42,85,.1); }
.pj-card.is-hidden { display: none; }
.pj-card__pics { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border-radius: 9px; overflow: hidden; aspect-ratio: 3 / 2; background: #eef2f7; cursor: zoom-in; }
.pj-card__pics--one { grid-template-columns: 1fr; }
.pj-card__pics:focus-visible { outline: 3px solid var(--pj-blue); outline-offset: 2px; }
.pj-card__half { position: relative; display: block; overflow: hidden; }
.pj-card__half img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.pj-card__pics:hover img { transform: scale(1.03); }
.pj-card__body { display: flex; flex-direction: column; flex: 1; padding: 12px 6px 6px; }
.pj .pj-card__t { margin: 0 0 8px; padding: 0; font-size: 17px; line-height: 1.25; font-weight: 800; color: var(--pj-navy); text-align: left; }
.pj .pj-card__body p { margin: 0 0 6px; padding: 0; font-size: 13.5px; line-height: 1.45; color: #3b4756; }
.pj .pj-card__body p b { color: var(--pj-text); }
.pj-card__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.pj-card__btns .pj-btn { flex: 1 1 auto; }

/* ---------- как мы работаем ---------- */
.pj-how { display: grid; gap: 22px; margin-top: 28px; padding: 26px 28px; border-radius: 16px; background: linear-gradient(135deg, #eef5ff, #f7faff); }
@container (min-width: 900px) { .pj-how { grid-template-columns: minmax(220px, .8fr) minmax(0, 2fr); align-items: center; } }
.pj .pj-how__txt p { margin: 0; padding: 0; color: #3b4756; font-size: 14px; }
.pj-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@container (min-width: 520px) { .pj-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 900px) { .pj-steps { grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; } }
.pj-step { position: relative; text-align: center; }
.pj-step__ico { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; margin: 0 auto 10px; border: 1px solid #b9d2f5; border-radius: 12px; background: #fff; color: var(--pj-blue); }
.pj-step__ico svg { width: 26px; height: 26px; }
.pj-step b { display: block; margin-bottom: 3px; font-size: 15px; color: var(--pj-navy); }
.pj .pj-step p { margin: 0 auto; padding: 0; max-width: 170px; font-size: 12.5px; color: #4a5767; }
@container (min-width: 900px) {
	.pj-step:not(:last-child)::after { content: ""; position: absolute; top: 25px; right: -14%; width: 18%; height: 10px; margin-top: -5px;
		background: linear-gradient(currentColor, currentColor) left center / calc(100% - 6px) 1.5px no-repeat; color: #6f86a6; }
	.pj-step:not(:last-child)::before { content: ""; position: absolute; top: 25px; right: calc(-14% + 1px); width: 7px; height: 7px; margin-top: -4px; border-top: 1.5px solid #6f86a6; border-right: 1.5px solid #6f86a6; transform: rotate(45deg); }
}

/* ---------- заявка ---------- */
.pj-form { position: relative; display: grid; gap: 18px; margin-top: 22px; padding: 28px 30px; border-radius: 16px; overflow: hidden; scroll-margin-top: 90px;
	background:
		linear-gradient(90deg, rgba(26,108,240,.06) 1px, transparent 1px) 0 0 / 26px 26px,
		linear-gradient(rgba(26,108,240,.06) 1px, transparent 1px) 0 0 / 26px 26px,
		linear-gradient(135deg, #f3f8ff, #fafcff); }
@container (min-width: 960px) {
	.pj-form { grid-template-columns: minmax(250px, .9fr) minmax(0, 1.4fr) minmax(220px, .6fr); align-items: center; gap: 22px 26px; }
	.pj-form__send { align-self: start; padding-top: 2px; }
}
@container (min-width: 600px) and (max-width: 959px) { .pj-form { grid-template-columns: 1fr 220px; } .pj-form__txt { grid-column: 1 / -1; } }
.pj .pj-form__txt p { margin: 6px 0 0; padding: 0; color: #3b4756; font-size: 14px; }
.pj-form__row { display: grid; gap: 10px; margin-bottom: 10px; }
@container (min-width: 480px) { .pj-form__row { grid-template-columns: 1fr 1fr; } }
.pj-fld { position: relative; display: block; }
.pj-fld svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: #8a97a8; pointer-events: none; }
.pj-fld input { width: 100%; height: 48px; margin: 0; padding: 0 12px 0 40px; border: 1px solid #d3deeb; border-radius: 9px; background: #fff; font-size: 14px; color: var(--pj-text); outline: none; transition: border-color .15s, box-shadow .15s; }
.pj-fld input:focus { border-color: var(--pj-blue); box-shadow: 0 0 0 3px rgba(26,108,240,.12); }
.pj-fld input.is-bad { border-color: #e03131; box-shadow: 0 0 0 3px rgba(224,49,49,.12); }
.pj-file { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px 10px 18px; border: 1.5px dashed #b6c8e0; border-radius: 10px; background: rgba(255,255,255,.85); cursor: pointer; transition: border-color .15s, background .15s; }
.pj-file:hover, .pj-file.is-over { border-color: var(--pj-blue); background: #f2f7ff; }
.pj-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pj-file:focus-within { border-color: var(--pj-blue); box-shadow: 0 0 0 3px rgba(26,108,240,.12); }
.pj-file > svg { flex: 0 0 auto; width: 24px; height: 24px; color: #6a7c94; }
.pj-file__txt b { display: block; font-size: 14px; font-weight: 600; color: var(--pj-text); }
.pj-file__txt small { display: block; margin-top: 2px; font-size: 12px; color: var(--pj-muted); }
.pj-files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pj-files li { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 8px; background: #fff; border: 1px solid #e3ecf7; font-size: 13px; }
.pj-files li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-files li small { color: var(--pj-muted); white-space: nowrap; }
.pj-files li button, .pj-like button { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: #eef2f7; color: #5f6b7a; font-size: 17px; line-height: 1; cursor: pointer; }
.pj-files li button:hover, .pj-like button:hover { background: #ffe3e3; color: #c92a2a; }
.pj-like { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 7px 8px 7px 12px; border-radius: 9px; background: #e7f0ff; color: #24406b; font-size: 13.5px; }
.pj-like b { flex: 1; min-width: 0; }
.pj-agree { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 12.5px; color: #4a5767; cursor: pointer; }
.pj-agree input { margin: 1px 0 0; width: 15px; height: 15px; flex: 0 0 auto; }
.pj-agree a { color: inherit; }
.pj-err { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: #fff0f0; color: #c92a2a; font-size: 13px; }
.pj-done { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 20px; background: rgba(248,251,255,.97); }
.pj-done svg { flex: 0 0 auto; width: 56px; height: 56px; }
.pj-done b { display: block; font-size: 20px; color: var(--pj-navy); }
.pj-done p { margin: 2px 0 0; color: #3b4756; }

/* ---------- окно «Смотреть проект» (в body) ---------- */
.pj-ov { --pj-blue: #1a6cf0; --pj-blue-d: #1557c4; --pj-navy: #0f2a55; position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10,22,44,.62); opacity: 0; transition: opacity .2s; font-size: 14px; line-height: 1.45; color: #1f2a37; }
.pj-ov.is-open { opacity: 1; }
.pj-ov__box { position: relative; display: grid; width: 100%; max-width: 1180px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.3); transform: translateY(10px); transition: transform .2s; scrollbar-width: thin; }
.pj-ov.is-open .pj-ov__box { transform: none; }
@media (min-width: 900px) { .pj-ov__box { grid-template-columns: minmax(0, 1fr) 320px; overflow: hidden; } }
.pj-ov__box--text { max-width: 560px; }
@media (min-width: 900px) { .pj-ov__box.pj-ov__box--text { grid-template-columns: 1fr; } .pj-ov__box--text .pj-ov__info { border-left: 0; } }
.pj-ov__media { position: relative; padding: 14px; min-width: 0; }
.pj-ov__stage { position: relative; border-radius: 12px; overflow: hidden; background: #eef2f7; aspect-ratio: 4 / 3; }
@media (min-width: 900px) { .pj-ov__stage { aspect-ratio: auto; height: calc(100vh - 170px); height: calc(100dvh - 170px); max-height: 640px; } }
.pj-ov__stage .pj-cmp { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.pj-ov__stage .pj-cmp__img { object-fit: contain; background: #eef2f7; }
.pj-ov__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pj-ov__nav { position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--pj-navy); cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.pj-ov__nav svg { width: 20px; height: 20px; }
.pj-ov__nav--p { left: 10px; }
.pj-ov__nav--n { right: 10px; }
.pj-ov__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.pj-ov__th { position: relative; flex: 0 0 auto; width: 84px; height: 62px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #eef2f7; cursor: pointer; }
.pj-ov__th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pj-ov__th.is-on { border-color: var(--pj-blue); }
.pj-ov__th--cmp img { width: 50%; float: left; }
.pj-ov__info { padding: 22px 22px 20px; border-left: 1px solid #edf1f6; overflow: auto; }
@media (max-width: 899px) { .pj-ov__info { border-left: 0; padding-top: 4px; } }
.pj-ov__cat { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #3c5a85; }
.pj-ov__t { margin: 0 0 12px; padding: 0 30px 0 0; font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--pj-navy); text-align: left; }
.pj-ov .pj-ov__info p { margin: 0 0 10px; padding: 0; color: #3b4756; }
.pj-ov .pj-ov__info p b { color: #1f2a37; }
.pj-ov__descr { padding-top: 10px; border-top: 1px solid #edf1f6; }
.pj-ov__info .pj-btn { width: 100%; margin-top: 8px; }
.pj-ov__x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #1f2a37; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.pj-ov__x svg { width: 18px; height: 18px; }
.pj-ov__x:hover { background: #fff; color: #c92a2a; }
@media (max-width: 600px) { .pj-ov { padding: 0; } .pj-ov__box { max-height: 100vh; max-height: 100dvh; height: 100%; border-radius: 0; align-content: start; } }
