/* cw-objects.css — Objects list + object card, gated under body.cwnew (preview ?cwnew).
   Ported from macket objects.html / object.html. Namespaced; relies on cw-home/cw-header tokens. */

/* hide the default Diafan inner content on the objects page under the flag */
body.cwnew.cw-obekty .all-article{display:none;}
body.cwnew .cw-obj-main{display:block;}
body.cwnew .cw-obj-main .container{max-width:1720px;margin:0 auto;padding:0 clamp(24px,5vw,80px);}
@media (min-width:1680px){body.cwnew .cw-obj-main .container{max-width:1860px;}}

/* breadcrumbs + page head (page-scoped copy; same values as macket) */
body.cwnew .cw-obj-main .crumbs{font-family:"PT Mono",monospace;font-size:12px;color:var(--ink-60);display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding-top:26px;}
body.cwnew .cw-obj-main .crumbs a{color:var(--violet);text-decoration:none;}
body.cwnew .cw-obj-main .crumbs a:hover{text-decoration:underline;}
body.cwnew .cw-obj-main .crumbs .sep{color:var(--ink-40);}
body.cwnew .cw-obj-main .crumbs .cur{color:var(--ink-60);}
body.cwnew .cw-obj-main .page-head{padding-top:22px;padding-bottom:10px;}
body.cwnew .cw-obj-main .page-head .eyebrow{font-family:"PT Mono",monospace;font-size:12px;letter-spacing:0.06em;text-transform:uppercase;color:var(--violet);margin-bottom:14px;display:flex;align-items:center;gap:10px;}
body.cwnew .cw-obj-main .page-head .eyebrow::before{content:"";width:40px;height:2px;background:var(--violet);}
body.cwnew .cw-obj-main .page-head h1{font-family:"Inter Tight",sans-serif;font-weight:800;font-size:clamp(27px,3.6vw,42px);line-height:1.05;letter-spacing:-0.02em;max-width:26ch;color:var(--ink);}
body.cwnew .cw-obj-main .page-head .sub{margin-top:15px;font-size:17px;line-height:1.5;color:var(--ink-60);max-width:64ch;}

/* placeholder image tile */
body.cwnew .cw-obj-main .ph-img{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--paper);border:1px solid var(--line);color:var(--ink-40);overflow:hidden;min-height:0;}
body.cwnew .cw-obj-main .ph-img img{width:100%;height:100%;object-fit:cover;display:block;}
body.cwnew .cw-obj-main .ph-img .cap{font-family:"PT Mono",monospace;font-size:11px;letter-spacing:0.04em;}

/* ---- objects LIST ---- */
body.cwnew .cw-obj-main .ofilter{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 8px;}
body.cwnew .cw-obj-main .ofilter button{font-family:"Inter",sans-serif;font-size:13px;padding:9px 16px;border:1px solid var(--line);background:var(--paper);color:var(--ink);cursor:pointer;transition:all .12s;}
body.cwnew .cw-obj-main .ofilter button[aria-pressed=true]{background:var(--violet);border-color:var(--violet);color:#fff;}
body.cwnew .cw-obj-main .ofilter button:hover{border-color:var(--violet);}
body.cwnew .cw-obj-main .ofilter .cnt{opacity:.7;font-family:"PT Mono",monospace;font-size:11px;margin-left:5px;}
/* P31 Task2: компактнее + РАЗДЕЛЬНЫЕ блоки (заметный gap, своя граница/радиус/тень — не 1px-hairline,
   читавшийся как склейка). 4 в ряд (меньше карточка). Высоты ровные (фото 4/3 clamp из P30). */
body.cwnew .cw-obj-main .ogrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:18px 0 0;}
body.cwnew .cw-obj-main .ocard{background:var(--paper);text-decoration:none;color:inherit;display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:3px;overflow:hidden;transition:border-color .15s,transform .15s,box-shadow .15s;}
body.cwnew .cw-obj-main .ocard:hover{border-color:var(--violet);transform:translateY(-2px);box-shadow:0 10px 26px rgba(20,18,16,.08);}
body.cwnew .cw-obj-main .ocard .ph-img{aspect-ratio:4/3;border:0;border-bottom:1px solid var(--line);}
body.cwnew .cw-obj-main .ocard .ob{padding:14px;}
body.cwnew .cw-obj-main .ocard .loc{font-family:"PT Mono",monospace;font-size:11px;color:var(--ink-40);margin-bottom:6px;}
body.cwnew .cw-obj-main .ocard h3{font-family:"Inter Tight",sans-serif;font-size:15px;font-weight:700;line-height:1.22;margin:0;color:var(--ink);overflow-wrap:anywhere;}
body.cwnew .cw-obj-main .ocard .mat{margin-top:8px;font-family:"PT Mono",monospace;font-size:11px;color:var(--violet);line-height:1.4;}
body.cwnew .cw-obj-main .ocard[hidden]{display:none;}
body.cwnew .cw-obj-main .oempty{padding:40px 0;font-family:"PT Mono",monospace;font-size:13px;color:var(--ink-40);}
/* P33 Блок5: Я.Карта объектов + PDF-кнопка */
body.cwnew .cw-obj-main .obj-actions-top{margin-top:16px;}
body.cwnew .cw-obj-main .obj-actions-top .btn{display:inline-flex;align-items:center;gap:8px;font-family:"Inter Tight",sans-serif;font-weight:700;font-size:13px;padding:11px 18px;border:1px solid var(--violet);background:var(--violet);color:#fff;text-decoration:none;}
body.cwnew .cw-obj-main .obj-actions-top .btn:hover{background:#4a3b85;border-color:#4a3b85;}
body.cwnew .cw-obj-main .cw-objmap-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:40px 0 14px;}
body.cwnew .cw-obj-main .cw-objmap-head h2{font-family:"Inter Tight",sans-serif;font-weight:800;font-size:clamp(20px,2.2vw,28px);margin:0;color:var(--ink);}
body.cwnew .cw-obj-main .cw-objmap-cnt{font-family:"PT Mono",monospace;font-size:12px;color:var(--ink-40);}
body.cwnew .cw-obj-main .cw-objmap{width:100%;height:clamp(340px,28vw,420px);border:1px solid var(--line);margin-bottom:48px;}
body.cwnew .cw-obj-main .cw-objmap [class*="ground-pane"]{filter:saturate(.92);}
body.cwnew .cw-obj-main .mapph{margin:40px 0;aspect-ratio:21/7;}
@media (max-width:1200px){body.cwnew .cw-obj-main .ogrid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:860px){body.cwnew .cw-obj-main .ogrid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:560px){body.cwnew .cw-obj-main .ogrid{grid-template-columns:1fr;}body.cwnew .cw-obj-main .mapph{aspect-ratio:4/3;}}

/* ---- object CARD ---- */
body.cwnew .cw-obj-main .obj-actions{display:flex;gap:14px;flex-wrap:wrap;margin:20px 0 6px;}
body.cwnew .cw-obj-main .obj-meta-row{font-family:"PT Mono",monospace;font-size:13px;color:var(--ink-60);margin-top:12px;}
/* P33 Блок5.4: галерея объекта — ЕДИНЫЙ размер ячейки (фикс высота + object-fit:cover), без «винегрета»
   (было aspect-ratio:auto → ячейки под натуральный размер фото = разнобой 646x861 vs 323x431). */
body.cwnew .cw-obj-main .ogal{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px;background:transparent;border:0;margin:24px 0 0;}
body.cwnew .cw-obj-main .ogal .ph-img{border:1px solid var(--line);aspect-ratio:auto;height:320px;overflow:hidden;}
body.cwnew .cw-obj-main .ogal .ph-img img{width:100%;height:100%;object-fit:cover;display:block;}
body.cwnew .cw-obj-main .ogal .big{grid-row:auto;aspect-ratio:auto;height:320px;min-height:0;}
body.cwnew .cw-obj-main .ometa{border:1px solid var(--line);margin-top:0;border-collapse:collapse;width:100%;}
body.cwnew .cw-obj-main .ometa tr td{padding:13px 16px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:top;}
body.cwnew .cw-obj-main .ometa tr:last-child td{border-bottom:0;}
body.cwnew .cw-obj-main .ometa td:first-child{color:var(--ink-60);width:42%;font-family:"PT Mono",monospace;font-size:12px;}
body.cwnew .cw-obj-main .sec-head{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:end;column-gap:clamp(32px,5vw,80px);row-gap:18px;margin-bottom:30px;}
body.cwnew .cw-obj-main .sec-head .eyebrow{font-family:"PT Mono",monospace;font-size:13px;letter-spacing:0.06em;text-transform:uppercase;color:var(--violet);margin-bottom:16px;display:flex;align-items:center;gap:10px;}
body.cwnew .cw-obj-main .sec-head .eyebrow::before{content:"";width:40px;height:2px;background:var(--violet);}
body.cwnew .cw-obj-main .sec-head h2{font-family:"Inter Tight",sans-serif;font-weight:800;font-size:clamp(24px,2.4vw,32px);line-height:1.1;color:var(--ink);}
body.cwnew .cw-obj-main section.block{padding:56px 0;}
body.cwnew .cw-obj-main .matgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);}
body.cwnew .cw-obj-main .matgrid .pcard{background:var(--paper);padding:16px;display:flex;flex-direction:column;min-width:0;}
body.cwnew .cw-obj-main .matgrid .ph-img{aspect-ratio:4/3;}
body.cwnew .cw-obj-main .matgrid h3{font-family:"Inter Tight",sans-serif;font-size:15px;font-weight:700;margin:10px 0 0;overflow-wrap:anywhere;}
body.cwnew .cw-obj-main .matgrid h3 a{color:inherit;text-decoration:none;}
body.cwnew .cw-obj-main .matgrid h3 a:hover{color:var(--violet);}
body.cwnew .cw-obj-main .matgrid .mark{font-family:"PT Mono",monospace;font-size:11px;color:var(--violet);margin-top:7px;}
body.cwnew .cw-obj-main .sim-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);}
body.cwnew .cw-obj-main .sim-grid .ocard{background:var(--paper);}
body.cwnew .cw-obj-main .sim-grid .ph-img{aspect-ratio:4/3;border:0;border-bottom:1px solid var(--line);}
@media (max-width:860px){
  body.cwnew .cw-obj-main .ogal{grid-template-columns:1fr 1fr;}
  body.cwnew .cw-obj-main .ogal .ph-img,body.cwnew .cw-obj-main .ogal .big{height:220px;grid-row:auto;min-height:0;}
  body.cwnew .cw-obj-main .matgrid,body.cwnew .cw-obj-main .sim-grid{grid-template-columns:1fr;}
  body.cwnew .cw-obj-main .sec-head{grid-template-columns:1fr;align-items:start;}
}

/* object detail served via 404-hook (/obekty/<slug>/) — hide the 404-page catalog nav */
body.cwnew.cw-obekty .nav-catalog-media{display:none;}

/* П34 Блок6: карта-секция НАВЕРХУ + клиентская пагинация */
body.cwnew .cw-obj-main .cw-objmap-section{margin-top:6px;}
body.cwnew .cw-obj-main .cw-objmap-section .cw-objmap-head{margin:6px 0 12px;}
body.cwnew .cw-obj-main .cw-objmap-section .cw-objmap{margin-bottom:10px;}
body.cwnew .cw-obj-main .opager{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:32px 0 8px;}
body.cwnew .cw-obj-main .opg{min-width:40px;height:40px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:var(--paper);color:var(--ink);font-family:"PT Mono",monospace;font-size:13px;cursor:pointer;transition:border-color .12s,color .12s,background .12s;}
body.cwnew .cw-obj-main .opg:hover:not([disabled]):not(.is-active){border-color:var(--violet);color:var(--violet);}
body.cwnew .cw-obj-main .opg.is-active{background:var(--violet);border-color:var(--violet);color:#fff;}
body.cwnew .cw-obj-main .opg[disabled]{opacity:.4;cursor:default;}
