/* Карлсон, страница «Обрамления лифтовых порталов и облицовка нержавейкой» (/obramleniya-liftovyh-portalov/).
   Дополняет home.css и page.css, те же токены и сетка. */

/* ---------- первый экран ---------- */
.lift-hero .hero-main { height: auto; min-height: 880px; }
.lift-hero .hero-l { padding-bottom: 64px; }
.lift-hero .crumbs { margin-bottom: 22px; }
.h1lift { font-size: min(4.7cqi, 68px); line-height: .92; }
.lift-hero .hero-sub { margin: 24px 0 28px; max-width: 520px; font-size: 18px; }
.lift-hero .dz { margin-top: 24px; }
.lift-hero .hero-r .hs img { object-position: 50% 40%; }
.lift-hero .fact .num { white-space: nowrap; }

/* ---------- кнопка «Добавить в расчёт» ---------- */
.item .btn.added { background: var(--steel); border-color: var(--steel); }
.kw .item .btn.added { color: var(--white); }
.item .ph img.top { object-position: 50% 30%; }

/* ---------- конфигуратор портала ---------- */
.cfg { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 0; align-items: start;
  grid-template-areas: "st st st st st st st cr cr cr cr cr" "ou ou ou ou ou ou ou cr cr cr cr cr"; }
.cfg-stage { grid-area: st; position: relative; aspect-ratio: 640 / 540; overflow: hidden; background: #EEE9E5; }
.cfg-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cfg-tag { position: absolute; left: 16px; top: 16px; z-index: 2; background: var(--white); padding: 7px 10px; max-width: calc(100% - 32px); }
.cfg-dim { font-size: 13px; font-weight: 600; fill: #1D1D1B; font-family: 'Commissioner', sans-serif; }
.cfg-out { grid-area: ou; background: var(--steel); color: var(--white); }
.cfg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 26px 30px 22px; }
.cfg-stats .st { padding-right: 14px; min-width: 0; }
.cfg-stats .st + .st { border-left: 1px solid rgba(255,255,255,.18); padding-left: 18px; }
.cfg-stats .st b { display: block; font-variation-settings: "FLAR" 100; font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.cfg-stats .st b small { font-size: 15px; margin-left: 4px; letter-spacing: 0; }
.cfg-stats .st > span { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.35; color: #B9C6CC; }
.cfg-warn { margin: 0 30px; padding: 12px 14px; background: #14323E; color: #FFD9D3; font-size: 14px; line-height: 1.45; }
.cfg-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 18px 30px 28px; }
.cfg-cta .note { color: #B9C6CC; max-width: 300px; }
.cfg-cta .btn-line { color: var(--white); }
.cfg-r { grid-area: cr; background: var(--white); padding: 30px; display: flex; flex-direction: column; gap: 26px; }
.tcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tcard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; min-height: 116px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 13px; line-height: 1.25; text-align: center; transition: border-color .2s, background .2s; }
.tcard svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.tcard:hover { border-color: var(--ink); }
.tcard.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--pink); }
.fins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fopt { display: flex; flex-direction: column; gap: 8px; padding: 5px 5px 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 12.5px; line-height: 1.25; text-align: left; transition: border-color .2s; }
.fopt img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.fopt span { padding: 0 3px; }
.fopt:hover { border-color: var(--ink); }
.fopt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ral { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); cursor: pointer; font-size: 13px; }
.ral i { width: 26px; height: 26px; border-radius: 999px; border: 1px solid rgba(11,35,45,.2); flex: none; }
.ral.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.rng { display: flex; flex-direction: column; gap: 6px; }
.rng-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rng-h label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.rng-h b { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rng input[type=range] { width: 100%; height: 30px; margin: 0; accent-color: var(--red); cursor: pointer; }
.cnt2 { display: flex; flex-direction: column; gap: 8px; }
.cnt2 .flab { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.stp { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); padding: 3px; }
.stp button { width: 44px; height: 44px; border: 0; background: var(--pink); cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.stp button:hover { background: var(--pink2); }
.stp button[disabled] { opacity: .35; cursor: not-allowed; }
.stp b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- образцы отделок ---------- */
.smp { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.smp-grid { grid-column: 1 / 9; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.swc { background: var(--pink); display: flex; flex-direction: column; transition: box-shadow .25s; }
.swc.on { box-shadow: inset 0 0 0 2px var(--ink); }
.swc-ph { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--ti); cursor: zoom-in; }
.swc-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.swc-ph .lbl { position: absolute; left: 12px; top: 12px; background: var(--white); padding: 6px 9px; font-size: 11px; pointer-events: none; }
.swc-bd { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.swc-bd .disp { font-size: 22px; line-height: 1; }
.swc-bd .p { font-size: 14px; line-height: 1.45; }
.swc-bd .chip { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: var(--white); }
.swc-bd .chip .ico { width: 16px; height: 16px; }
.swc.alt { background: var(--steel); color: var(--white); }
.swc.alt .swc-bd { padding: 26px 22px; justify-content: space-between; }
.swc.alt .p { color: #C3CED3; }
.swc.alt .disp { font-size: 30px; }
.smp-form { grid-column: 9 / 13; background: var(--pink2); padding: 28px; position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.smp-form .disp { font-size: 28px; line-height: 1; }
.smp-sel { display: flex; flex-wrap: wrap; gap: 8px; }
.smp-sel button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 6px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 13px; }
.smp-sel img { width: 28px; height: 28px; object-fit: cover; }
.smp-sel .ico { width: 14px; height: 14px; }
.smp-empty { font-size: 14px; color: var(--muted); margin: 0; }
.smp-form .fgrid { grid-template-columns: 1fr; gap: 16px; }

/* ---------- объекты ---------- */
.ofil { display: flex; flex-wrap: wrap; gap: 8px; }
.ofil .chip b { font-weight: 500; margin-left: 6px; opacity: .6; }
.ogrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.otile { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; padding: 0; border: 0; background: var(--ti); cursor: zoom-in; text-align: left; }
.otile.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.otile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.otile:hover img { transform: scale(1.05); }
.otile .lbl { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); background: var(--white); padding: 8px 10px; letter-spacing: .1em; font-size: 11px; }
.omore { margin-top: 32px; display: flex; justify-content: center; }

/* ---------- как работаем: фото ---------- */
.how-ph { position: relative; margin: 40px 0 0; aspect-ratio: 4 / 3; overflow: hidden; max-width: 460px; }
.how-ph img { width: 100%; height: 100%; object-fit: cover; }
.how-ph figcaption { position: absolute; left: 12px; bottom: 12px; background: var(--white); padding: 7px 10px; }

/* ---------- тендер: карточка с вкладками ---------- */
.req .seg { margin: 0 0 20px; display: flex; }
.req .seg button { flex: 1; }
.tform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tform .full { grid-column: 1 / -1; }
.tsent { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 12px 0; }

/* корзина расчёта в форме */
.cart { display: flex; flex-direction: column; gap: 8px; }
.cart .calc-chip { align-items: center; }
.cart .calc-chip span { flex: 1; }
.cart .calc-chip button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; flex: none; color: var(--muted); }
.cart .calc-chip button:hover { color: var(--ink); }

/* ---------- средние ширины ---------- */
@container k (min-width: 821px) and (max-width: 1200px) {
  .h1lift { font-size: 4.3cqi; } /* «ИЗ НЕРЖАВЕЙКИ» не заходит на фото на ширине 1024 */
  .cfg { grid-template-areas: "st st st st st st cr cr cr cr cr cr" "ou ou ou ou ou ou cr cr cr cr cr cr"; }
  .cfg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .cfg-stats .st:nth-child(3) { border-left: 0; padding-left: 0; }
  .fins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fopt img { aspect-ratio: 2 / 1; }
  .smp-grid { grid-column: 1 / 8; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smp-form { grid-column: 8 / 13; }
  .ogrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- телефон ---------- */
@container k (max-width: 820px) {
  .lift-hero .hero-main { min-height: 0; }
  .lift-hero .hero-l { padding-bottom: 40px; }
  .h1lift { font-size: 9.4cqi; }
  .lift-hero .hero-sub { font-size: 16px; margin: 18px 0 22px; }

  .cfg { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  .cfg-stage { order: 1; }
  .cfg-r { order: 2; padding: 22px 18px; gap: 22px; }
  .cfg-out { order: 3; }
  .cfg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; padding: 22px 18px 18px; }
  .cfg-stats .st:nth-child(3) { border-left: 0; padding-left: 0; }
  .cfg-stats .st b { font-size: 24px; }
  .cfg-warn { margin: 0 18px; }
  .cfg-cta { padding: 16px 18px 24px; }
  .cfg-cta .btn { flex: 1 1 100%; min-width: 0; white-space: normal; text-align: center; padding: 10px 16px; gap: 10px; }
  .tcard { min-height: 104px; font-size: 12px; }
  .tcard svg { width: 44px; height: 44px; }
  .fins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fopt img { aspect-ratio: 2 / 1; }
  .cfg-tag { left: 10px; top: 10px; font-size: 10px; }

  .smp { display: block; }
  .smp-grid { grid-template-columns: 1fr; gap: 12px; }
  .swc { display: grid; grid-template-columns: 128px 1fr; }
  .swc-ph { aspect-ratio: auto; min-height: 168px; }
  .swc-ph .lbl { display: none; }
  .swc-bd { padding: 14px 14px 16px; gap: 8px; }
  .swc-bd .disp { font-size: 18px; }
  .swc-bd .p { font-size: 13px; }
  .swc.alt { display: flex; }
  .swc.alt .swc-bd { padding: 22px 18px; gap: 14px; }
  .swc.alt .disp { font-size: 24px; }
  .smp-form { position: relative; top: 0; margin-top: 24px; padding: 22px 18px; }

  .ogrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
  .otile.big { grid-row: span 1; aspect-ratio: 4 / 3; }
  .otile .lbl { left: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: 9.5px; padding: 6px 7px; letter-spacing: .06em; }
  .omore .btn { flex: 1; }

  .how-ph { max-width: none; margin-top: 28px; }
  .tform { grid-template-columns: 1fr; }
  .req .seg button { padding: 0 10px; font-size: 13px; }
}

/* сайт: у фото есть атрибуты width и height, высоту миниатюры отделки задаёт aspect-ratio */
.fopt img { height: auto; }

/* служебное: счётчики и выбранный образец */
.to24 { --to: 24; } .to5 { --to: 5; }
.swc-bd .chip.on { background: var(--steel); border-color: var(--steel); color: var(--white); }
