/* Каталог на механизмите — като „Материалите на проекта“ */
#rdHwCat{position:fixed;inset:0;z-index:7000;background:rgba(16,27,45,.62);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:18px}
#rdHwCat .mwBody{grid-template-columns:300px 1fr}
.hcSel{border:1px solid #e8b978;background:#fdf6e7;border-radius:12px;padding:10px 12px;display:grid;gap:5px;margin-bottom:6px}
.hcSel b{font-size:13px;color:#1c2c44}
.hcRow{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#5c6a7d}
.hcRow em{font-style:normal;font-weight:700;color:#1c2c44;text-align:right}
.hcEx{display:grid;grid-template-columns:1fr 54px 24px;gap:6px;align-items:center;font-size:11.5px;color:#1c2c44}
.hcEx input{width:54px;padding:3px 5px;border:1px solid #d9dee6;border-radius:6px;font:inherit}
.hcEx button{border:1px solid #d9dee6;background:#fff;border-radius:6px;cursor:pointer;color:#5c6a7d}
.hcSlotIco{width:46px;height:46px;border-radius:9px;background:#eef1f6;color:#1c2c44;display:flex;align-items:center;justify-content:center;flex:none}
.hcSlotIco .hcIco{width:26px;height:26px}
.hcPic{position:relative;height:96px;background:linear-gradient(135deg,#f4ede0,#e9dcc4);color:#1c2c44;display:flex;align-items:center;justify-content:center}
.hcPic .hcIco{width:60px;height:60px}
.hcAuto{position:absolute;left:6px;top:6px;font-style:normal;font-size:10px;font-weight:800;background:#1c2c44;color:#e8b978;padding:3px 7px;border-radius:999px}
.hcCard b{white-space:normal !important;line-height:1.25}
.hcCard .hcArt{font-family:"JetBrains Mono",ui-monospace,monospace;color:#5c6a7d !important;padding-top:0 !important}
.hcCard .hcSpec{white-space:normal !important;color:#1a2233 !important;font-size:11.5px !important;line-height:1.35}
.hcCard .hcPrice{font-weight:800;color:#1c2c44 !important;font-size:12.5px !important;white-space:normal !important}
.hcCard .hcPrice small{display:block;font-weight:500;color:#8a97ab;font-size:10.5px}
.hcCard em{display:block;font-style:normal;font-size:11.5px;font-weight:800;padding:6px 9px 9px;color:#2e8b57}
.hcCard em.add{color:#b98a3e}
.hcGrid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr)) !important}
.hcEmpty{padding:30px;color:#8a97ab}
html.dark .hcSel{background:#2a2418;border-color:#6b5836}
html.dark .hcRow em, html.dark .hcSel b, html.dark .hcCard .hcPrice{color:#e8edf5 !important}
html.dark .hcPic{background:linear-gradient(135deg,#2b2a26,#3a3226);color:#e8b978}
html.dark .hcCard .hcSpec{color:#c9d3e3 !important}
.frHwBtn{display:flex;gap:8px;align-items:center;background:#e8b978 !important;color:#1c2c44 !important;font-weight:800 !important;font-size:13px !important}
.frHwBtn small{font-weight:600;opacity:.8}
.hcPhoto{background:#fff center/contain no-repeat;height:130px}
/* v0.2 — целият каталог на GTV: подвидове, варианти, страница на модела */
.hcSubs{margin-top:6px}
.hcSubs .mwChip{font-size:11.5px}
.hcMore{display:block;margin:14px auto 4px;border:1px solid #e8b978;background:#fdf6e7;color:#1c2c44;font-weight:800;border-radius:10px;padding:10px 18px;cursor:pointer}
.hcLoad{font-size:12px;color:#8a97ab;padding:8px 4px}
.hcDet{display:grid;grid-template-columns:minmax(220px,340px) 1fr;gap:18px;align-items:start;margin-bottom:14px}
.hcBack{grid-column:1/-1;justify-self:start;border:1px solid #d9dee6;background:#fff;border-radius:8px;padding:6px 12px;font-weight:700;color:#1c2c44;cursor:pointer}
.hcDetTop .hcPic{border-radius:12px;border:1px solid #e3e7ee}
.hcPic.hcBig{height:260px}
.hcPic.hcBig .hcIco{width:120px;height:120px}
.hcDetTxt{display:grid;gap:8px;color:#1a2233}
.hcDetTxt h3{margin:0;font-size:20px;color:#1c2c44}
.hcDetM{margin:0;font-weight:700;color:#5c6a7d}
.hcDetD{margin:0;font-size:13px;line-height:1.5;color:#3d4a5c}
.hcUse{justify-self:start;background:#1c2c44;color:#e8b978;border:0;border-radius:10px;padding:10px 14px;font-weight:800;cursor:pointer;text-align:left}
.hcUse.on{background:#2e8b57;color:#fff}
.hcSrc{font-size:12px;color:#b98a3e;font-weight:700;text-decoration:none}
.hcVar{width:100%;border-collapse:collapse;font-size:12.5px;color:#1a2233}
.hcVar th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#8a97ab;padding:6px 8px;border-bottom:1px solid #e3e7ee}
.hcVar td{padding:7px 8px;border-bottom:1px solid #eef1f6;vertical-align:top}
.hcVar td small{display:block;color:#8a97ab;font-size:11px;margin-top:2px}
.hcVar td.mono{font-family:"JetBrains Mono",ui-monospace,monospace;white-space:nowrap}
.hcVar button{border:1px solid #e8b978;background:#fdf6e7;color:#1c2c44;font-weight:800;border-radius:8px;padding:5px 10px;cursor:pointer;white-space:nowrap}
@media (max-width:760px){ .hcDet{grid-template-columns:1fr} #rdHwCat .mwBody{grid-template-columns:1fr} }
html.dark .hcDetTxt, html.dark .hcVar{color:#e8edf5} html.dark .hcDetTxt h3{color:#e8edf5} html.dark .hcDetD{color:#c9d3e3}
html.dark .hcBack{background:#1b2740;color:#e8edf5;border-color:#2a3850}
.hcLinks{display:flex;flex-wrap:wrap;gap:14px}
.hcVpic{display:block;width:44px;height:44px;border-radius:6px;border:1px solid #e3e7ee;background:#fff center/contain no-repeat}
.hcVar tr[data-hvpic]:hover td{background:#fdf6e7}
/* ТЕЛЕФОН: видовете са хоризонтална лента горе, механизмите — 2 в ред, всичко скролва заедно */
@media (max-width:900px){
  #rdHwCat{padding:0}
  #rdHwCat .mwBox{height:100dvh;width:100%;border-radius:0}
  #rdHwCat .mwHead{padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px;align-items:center}
  #rdHwCat .mwHead h2{font-size:17px;line-height:1.2}
  #rdHwCat .mwHead .mwK{font-size:10px}
  #rdHwCat .mwSub{display:none}
  #rdHwCat .mwClose{width:38px;height:38px;flex:none}
  #rdHwCat .mwBody{display:flex;flex-direction:column;overflow:hidden}
  #rdHwCat .mwLeft{flex:none;flex-direction:row;align-items:stretch;overflow-x:auto;overflow-y:hidden;padding:8px 10px;gap:6px;border-right:0;border-bottom:1px solid #dfe3ea;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  #rdHwCat .mwLeft::-webkit-scrollbar{display:none}
  #rdHwCat .hcSel{flex:none;width:230px;margin:0;padding:6px 10px;gap:2px;font-size:11px}
  #rdHwCat .hcSel .hcEx{display:none}
  #rdHwCat .mwSlot{flex:none;padding:6px 12px 6px 6px;gap:6px;border-radius:999px}
  #rdHwCat .mwSlot.on{background:#1c2c44;border-color:#1c2c44}
  #rdHwCat .mwSlot.on .t b{color:#e8b978}
  #rdHwCat .hcSlotIco{width:30px;height:30px;border-radius:999px}
  #rdHwCat .hcSlotIco .hcIco{width:20px;height:20px}
  #rdHwCat .mwSlot .t b{font-size:13px;white-space:nowrap}
  #rdHwCat .mwSlot .t small{display:none}
  #rdHwCat .hcLoad{display:none}
  #rdHwCat .mwRight{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
  #rdHwCat .mwTools{position:sticky;top:0;z-index:3;padding:8px 10px;gap:6px}
  #rdHwCat .mwTools input{font-size:16px;padding:8px 12px}
  #rdHwCat .mwChips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
  #rdHwCat .mwChips::-webkit-scrollbar{display:none}
  #rdHwCat .mwChip{flex:none;font-size:12.5px}
  #rdHwCat .hcGrid{flex:none;overflow:visible;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px;padding:10px}
  #rdHwCat .hcPhoto{height:120px}
  #rdHwCat .hcCard b{font-size:13px}
  #rdHwCat .mwCnt{display:none}
  #rdHwCat .hcMore{margin:6px auto calc(24px + env(safe-area-inset-bottom,0px));width:calc(100% - 20px)}
  #rdHwCat .hcDet{grid-template-columns:1fr;gap:10px;padding:10px;margin:0}
  #rdHwCat .hcPic.hcBig{height:220px}
  #rdHwCat .hcDetTxt h3{font-size:18px}
  #rdHwCat .hcDetD{font-size:12.5px;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
  #rdHwCat .hcUse{width:100%;text-align:center}
  #rdHwCat .hcVar{font-size:12.5px;margin-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  #rdHwCat .hcVar td small{display:none}
  #rdHwCat .hcVar td{padding:6px 5px}
  #rdHwCat .hcVpic{width:52px;height:52px}
}
@media (max-width:900px){
  #rdHwCat .mwLeft{align-items:center}
  #rdHwCat .hcSel{order:99;width:210px;padding:5px 9px}
  #rdHwCat .hcSel b{font-size:11px}
  #rdHwCat .mwSlot{height:42px}
}
@media (max-width:900px){
  #rdHwCat .mwRight{overflow-x:hidden}
  #rdHwCat .hcDet, #rdHwCat .hcDet > *, #rdHwCat .hcDetTxt > *{min-width:0}
  #rdHwCat .hcDetM, #rdHwCat .hcDetD, #rdHwCat .hcDetTxt h3{overflow-wrap:anywhere}
  #rdHwCat .hcVar{table-layout:fixed;width:calc(100% - 20px);margin-left:10px;margin-right:10px}
  #rdHwCat .hcVar th:nth-child(1), #rdHwCat .hcVar td:nth-child(1){width:60px}
  #rdHwCat .hcVar th:nth-child(4), #rdHwCat .hcVar td:nth-child(4){width:84px}
  #rdHwCat .hcVar td{overflow-wrap:anywhere;word-break:break-word}
  #rdHwCat .hcVar td.mono{white-space:normal;font-size:11.5px}
  #rdHwCat .hcVar button{padding:6px 8px;font-size:12px}
}
/* „Механизмите на проекта“ в Цени → Ценоразпис */
#rdHwProj{padding:16px 18px;display:grid;gap:12px}
#rdHwProj .hpHead{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
#rdHwProj .hpK{font:800 10.5px/1 sans-serif;letter-spacing:.14em;color:#b98a3e}
#rdHwProj h3{margin:4px 0 2px;font-size:18px;color:#1c2c44}
#rdHwProj p{margin:0;font-size:12.5px;color:#5c6a7d;max-width:560px}
#rdHwProj .hpAll{background:#1c2c44;color:#e8b978;border:0;border-radius:10px;padding:9px 14px;font-weight:800;cursor:pointer}
#rdHwProj .hpSlots{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}
#rdHwProj .hpSlot{display:grid;grid-template-columns:76px 1fr auto;gap:12px;align-items:center;border:1px solid #dfe3ea;border-radius:12px;padding:10px;background:#fff}
#rdHwProj .hpPic{width:76px;height:64px;border-radius:9px;background:#fff center/contain no-repeat;border:1px solid #eef1f6;display:flex;align-items:center;justify-content:center;color:#b9c0ca}
#rdHwProj .hpT{min-width:0;display:grid;gap:2px}
#rdHwProj .hpT small{font:800 10px/1 sans-serif;letter-spacing:.12em;color:#8a97ab}
#rdHwProj .hpT b{font-size:14px;color:#1c2c44;overflow-wrap:anywhere}
#rdHwProj .hpT span{font-size:11.5px;color:#5c6a7d}
#rdHwProj .hpBtn{border:1px solid #e8b978;background:#fdf6e7;color:#1c2c44;font-weight:800;border-radius:9px;padding:8px 12px;cursor:pointer}
#rdHwProj .hpReset{justify-self:start;border:0;background:none;color:#8a97ab;text-decoration:underline;cursor:pointer;font-size:12px}
html.dark #rdHwProj h3, html.dark #rdHwProj .hpT b{color:#e8edf5}
html.dark #rdHwProj .hpSlot{background:#1b2740;border-color:#2b3a52}
@media (max-width:600px){ #rdHwProj .hpSlot{grid-template-columns:60px 1fr} #rdHwProj .hpBtn{grid-column:1/-1} #rdHwProj .hpPic{width:60px;height:52px} }
/* №16 · шкаф по шкаф: нивото и плавното затваряне — за целия проект (излязоха от менюто на шкафа) */
#rdHwProj .hpLvl{display:grid;gap:8px;border-top:1px solid #eef1f6;padding-top:10px}
#rdHwProj .hpLvlR{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#rdHwProj .hpLvlR small{font:800 10px/1 sans-serif;letter-spacing:.12em;color:#8a97ab;text-transform:uppercase;min-width:150px}
#rdHwProj .hpSeg .rdSeg2Btn{font-size:11.5px;padding:6px 10px}
#rdHwProj .hpLvlN{font-size:11.5px}
html.dark #rdHwProj .hpLvl{border-color:#2b3a52}
@media (max-width:600px){ #rdHwProj .hpLvlR small{min-width:0;flex:1 1 100%} #rdHwProj .hpSeg{display:flex;width:100%} #rdHwProj .hpSeg .rdSeg2Btn{flex:1 1 0;white-space:normal;min-height:36px} }
/* v0.3 — страницата на модела: въздух, две ясни колони, нищо не опира в ръба */
.hcDetWrap{flex:1;min-height:0;overflow:auto;background:#fff;padding:18px 24px 28px}
.hcDetBar{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.hcDetBar .hcBack{grid-column:auto;padding:8px 14px;border-radius:10px;font-size:13px}
.hcDetBar .hcBack:hover{border-color:#e8b978}
.hcDetCrumb{font:800 11px/1 sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#b98a3e}
.hcDetGrid{display:grid;grid-template-columns:minmax(260px,380px) minmax(0,1fr);gap:28px;align-items:start}
.hcDetL{display:grid;gap:16px;position:sticky;top:0}
.hcDetL .hcPic.hcBig{height:280px;border-radius:14px;border:1px solid #e3e7ee}
.hcDetTxt{gap:10px}
.hcDetTxt h3{font-size:21px;line-height:1.2}
.hcDetM{font-size:14px}
.hcUse{width:100%;padding:12px 14px;text-align:center;border-radius:12px}
.hcLinks{gap:16px;padding-top:2px}
.hcDetR{min-width:0;border:1px solid #e3e7ee;border-radius:14px;overflow:hidden;background:#fff}
.hcDetRH{padding:12px 16px;font:800 11px/1 sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#8a97ab;background:#f7f9fc;border-bottom:1px solid #e3e7ee}
.hcDetR .hcVar{width:100%;margin:0}
.hcDetR .hcVar th{padding:10px 12px;background:#fff}
.hcDetR .hcVar td{padding:12px}
.hcDetR .hcVar tr:last-child td{border-bottom:0}
.hcDetR .hcVar td:first-child, .hcDetR .hcVar th:first-child{width:64px;padding-left:16px}
.hcVarBtn{width:1%;white-space:nowrap;text-align:right;padding-right:16px !important}
.hcDetR .hcVar button{padding:7px 12px;border-radius:9px}
/* „Мебелта сега“ — всеки артикул на свой ред, бройката под него */
.hcEx{grid-template-columns:1fr auto auto;background:#fff;border:1px solid #f0e2c4;border-radius:9px;padding:6px 8px;gap:8px}
.hcEx span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35}
html.dark .hcDetWrap, html.dark .hcDetR, html.dark .hcDetR .hcVar th{background:#16223a} html.dark .hcDetRH{background:#1b2740;border-color:#2b3a52} html.dark .hcDetR{border-color:#2b3a52}
@media (max-width:900px){
  #rdHwCat .hcDetWrap{padding:12px 12px calc(28px + env(safe-area-inset-bottom,0px))}
  #rdHwCat .hcDetGrid{grid-template-columns:1fr;gap:14px}
  #rdHwCat .hcDetL{position:static}
  #rdHwCat .hcDetL .hcPic.hcBig{height:220px}
  #rdHwCat .hcDetR .hcVar{table-layout:fixed;width:100%;margin:0}
  #rdHwCat .hcDetR .hcVar td:first-child, #rdHwCat .hcDetR .hcVar th:first-child{width:58px;padding-left:8px}
  #rdHwCat .hcDetR .hcVar td{padding:8px 6px}
  #rdHwCat .hcVarBtn{width:84px;padding-right:8px !important}
}
/* v0.3.1 — горе снимка + описание една до друга, отдолу таблицата на цялата ширина */
.hcDetGrid{display:block}
.hcDetL{display:grid;grid-template-columns:minmax(220px,320px) minmax(0,1fr);gap:26px;align-items:start;position:static;margin-bottom:22px}
.hcDetL .hcPic.hcBig{height:260px}
.hcDetR{width:100%}
.hcDetR .hcVar td small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hcDetR .hcVar td.mono{white-space:nowrap}
@media (max-width:900px){
  #rdHwCat .hcDetL{grid-template-columns:1fr;gap:12px;margin-bottom:14px}
  #rdHwCat .hcDetR .hcVar td.mono{white-space:normal}
}
