/* FSM — шапка и подвал по макету 2026-12-02 (fsm/design/home-2026-12-02-new, DESIGN-SITE.md: палитра Ford, отступы 24/12/16).
   Классы fh-* (шапка) и ff-* (подвал) — с префиксом: в теме есть общие .search, .logo, .seo, .car.
   Телефон и планшет — до 860 px (та же граница, что в fsm-ui.js и cart.js). */
:root{--fd-blue:#00095b;--fd-panel:#13227a;--fd-act:#066fef;--fd-act-h:#0057c8;--fd-or:#f28c28;--fd-ink:#0e1530;--fd-mut:#5a6380;--fd-line:#dce1ec;--fd-bg:#f4f6fa;--fd-soft:#c6cdf0}
body{background:var(--fd-bg)}

/* ===== Шапка ===== */
.fh{position:relative;z-index:60;background:var(--fd-blue);color:#fff;font-family:system-ui,'Segoe UI',Roboto,Arial,sans-serif}
.fh-bar{display:flex;align-items:center;gap:24px;height:64px}
.fh-logo{position:relative;display:block;flex:none;width:128px;height:40px;border-radius:8px;overflow:hidden;background:rgba(255,255,255,.08)}
.fh-logo span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#98a2d6;white-space:nowrap}
.fh-logo img{position:relative;display:block;width:100%;height:100%;object-fit:contain}
.fh-logo.is-ld{background:none}
.fh-logo.is-ld span{display:none} /* надпись — только скелетон до загрузки логотипа (PNG прозрачный, иначе просвечивает) */
.fh-city{flex-grow:1;font-size:13px;color:var(--fd-soft);white-space:nowrap}
.fh-catbtn{height:40px;padding:0 14px;border-radius:10px;background:var(--fd-panel);color:#fff;font-weight:600;font-size:15px;display:flex;align-items:center;gap:6px}
.fh-catbtn.open,.fh-catbtn:hover{background:#1b2b86}
.fh-tel{color:#fff;font-weight:700;font-size:15px;white-space:nowrap}
.fh-tel:hover{color:#ffb15c}
.fh-lang{display:flex;gap:4px}
.fh-lang a{min-width:32px;height:28px;padding:0 6px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--fd-soft)}
.fh-lang a.active{background:#fff;color:var(--fd-blue)}
.fh-lang a:not(.active):hover{color:#fff}
.fh-cart{position:relative;height:40px;padding:0 16px;border-radius:10px;background:#1b2b86;color:#fff;display:flex;align-items:center;gap:8px;font-weight:600;font-size:15px}
.fh-cart:hover{background:var(--fd-panel);color:#fff}
.fh .iconlink__badge,.fh-tabbar .iconlink__badge{position:absolute;top:-6px;right:-8px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--fd-or);color:var(--fd-blue);font-size:11px;font-weight:700;line-height:14px;align-items:center;justify-content:center;border:2px solid var(--fd-blue);box-sizing:border-box}
.fh-icon{width:40px;height:40px;border-radius:10px;display:none;align-items:center;justify-content:center;color:#fff}
.fh-call{background:var(--fd-act)}
.fh-call[aria-expanded="true"]{background:var(--fd-or)}

.fh-row{padding-bottom:24px}
.fh-search{display:flex;height:56px;background:#fff;border-radius:12px;overflow:hidden}
.fh-model{flex:none;max-width:240px;border-right:1px solid var(--fd-line);background:var(--fd-bg);padding:0 18px;font-weight:600;font-size:15px;color:var(--fd-ink);display:flex;align-items:center;gap:6px;white-space:nowrap}
.fh-model span:first-child{overflow:hidden;text-overflow:ellipsis}
.fh-model.open,.fh-model:hover{background:#e8f1fe}
.fh-search input{flex:1;min-width:0;border:0;outline:0;padding:0 18px;font:inherit;font-size:16px;color:var(--fd-ink);background:#fff;-webkit-appearance:none;appearance:none}
.fh-search input::placeholder{color:var(--fd-mut)}
.fh-search:focus-within{box-shadow:0 0 0 3px rgba(242,140,40,.55)}
.fh-go{flex:none;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--fd-or);color:var(--fd-blue);padding:0 32px;font-weight:700;font-size:16px}
.fh-go:hover{background:#ffa24a}
.fh-go svg{display:none}
.fh-carline{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:15px;line-height:20px;color:var(--fd-soft)}
.fh-carline b{color:#fff}
.fh-carline i{font-style:normal;color:#98a2d6}
.fh-carline button{margin-left:auto;min-height:40px;color:#ffb15c;font-weight:600;white-space:nowrap}
.fh-carline .fh-carline__x{margin-left:0;width:40px;color:#98a2d6}
.fh-carline button:hover{color:#fff}

/* меню звонка (телефон) */
.fh-callmenu{position:fixed;inset:60px 0 0;z-index:190;background:rgba(0,9,91,.45)}
.fh-callmenu[hidden]{display:none}
.fh-callmenu__in{margin:8px 12px 0;background:#fff;border-radius:14px;box-shadow:0 8px 24px rgba(0,9,91,.25);padding:8px}
.fh-callmenu a{height:52px;padding:0 12px;display:flex;align-items:center;gap:12px;color:var(--fd-ink)}
.fh-callmenu a+a{border-top:1px solid #eef0f6}
.fh-callmenu b{font-size:16px}
.fh-callmenu i{margin-left:auto;font-style:normal;font-size:13px;color:var(--fd-mut)}
.fh-ic{width:32px;height:32px;border-radius:8px;background:#e8f1fe;color:var(--fd-act);display:flex;align-items:center;justify-content:center;flex:none}
.fh-ic svg{width:16px;height:16px}
.fh-ic--vb{background:#efecfc}

/* панели «Каталог» и выбор авто (разметка прежняя, inc/fsm-catalog-menu.php, fsm-ui.js) */
.fh .dd{color:var(--fd-ink);z-index:70}

/* выбор авто (header.php #carPanel, fsm-ui.js): модель → год → «Показать N запчастей»; страница под панелью затемнена */
.fh-dim{display:none;position:fixed;inset:0;z-index:55;background:rgba(0,6,40,.45)}
.fh-dd-open .fh-dim{display:block}
.fcp [hidden]{display:none!important}
.fh .fcp{top:calc(100% - 8px);background:none;box-shadow:none;border:0}
.fcp__in{max-width:1280px;margin:0 auto;padding:0 16px}
.fcp__body{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px;max-height:calc(100vh - 170px);overflow-y:auto;padding:16px;background:#fff;border-radius:14px;box-shadow:0 12px 40px rgba(0,6,40,.28)}
.fcp__h,.fcp__fs,.fcp__hint{display:none}
.fcp__lb{margin:0 0 8px;font-size:11px;line-height:16px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--fd-mut)}
.fcp__g{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:12px}
.fcp__g:last-child{margin-bottom:0}
.fcp .carpick{display:flex;align-items:center;justify-content:space-between;gap:6px;height:40px;min-height:0;padding:0 12px;border:0;border-radius:10px;background:var(--fd-bg);color:var(--fd-ink);font-size:14px;font-weight:600;white-space:nowrap;text-align:left;cursor:pointer}
.fcp .carpick i,.fcp .caryear i,.fcp__any em{font-style:normal;font-weight:500;font-size:13px;color:#1f7a3a}
.fcp .carpick:hover,.fcp__yg .caryear:hover{background:#e8edf7}
.fcp .carpick.is-active,.fcp__yg .caryear.is-active{background:var(--fd-blue);color:#fff}
.fcp .carpick.is-active i,.fcp__yg .caryear.is-active i{color:var(--fd-soft)}
.fcp__y{display:flex;flex-direction:column;border-left:1px solid #e5e9f2;padding-left:24px}
.fcp__empty{margin:0;font-size:14px;line-height:20px;color:var(--fd-mut)}
.fcp.has-model .fcp__empty,.fcp:not(.has-model) .fcp__any,.fcp:not(.has-model) .fcp__yg,.fcp:not(.has-model) .fcp__ft{display:none}
.fcp .fcp__any{display:flex;align-items:center;gap:12px;width:100%;height:48px;min-height:0;margin-bottom:8px;padding:0 12px;border:1px solid var(--fd-line);border-radius:10px;background:#fff;color:var(--fd-ink);font-size:15px;font-weight:600;cursor:pointer}
.fcp__any em{margin-left:auto}
.fcp__r{flex:none;width:20px;height:20px;border-radius:50%;border:2px solid #b6bdd2;box-sizing:border-box}
.fcp .fcp__any.is-active{border-color:var(--fd-act);background:#f2f7ff}
.fcp__any.is-active .fcp__r{border:6px solid var(--fd-act)}
.fcp__yg{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.fcp__yg .caryear{display:flex;flex-direction:column;align-items:center;justify-content:center;height:44px;min-height:0;padding:0;border:0;border-radius:10px;background:var(--fd-bg);color:var(--fd-ink);font-size:14px;font-weight:700;line-height:16px;cursor:pointer}
.fcp__yg .caryear i{font-size:12px;line-height:16px}
.fcp__ft{margin-top:12px}
.fcp__go{width:100%;height:44px;border:0;border-radius:10px;background:var(--fd-or);color:var(--fd-blue);font-size:15px;font-weight:700;cursor:pointer}
.fcp__go:hover{background:#ffb15c}

/* липкий поиск телефона и нижняя панель — только до 860 px */
.sticky-search,.fh-tabbar{display:none}

@media (max-width:1100px){
  .fh-city{display:none}
  .fh-bar{gap:16px}
  .fh-bar .fh-catbtn{margin-right:auto}
}
@media (max-width:860px){
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}
  .fh-bar{height:60px;gap:8px}
  .fh-logo{width:115px;height:36px;margin-right:auto}
  .fh-catbtn,.fh-tel,.fh-cart__t{display:none}
  .fh-lang a{min-width:30px;font-size:12px}
  .fh-icon{display:flex}
  .fh-cart{width:40px;padding:0;justify-content:center}
  .fh-cart .iconlink__badge{top:-4px;right:-4px}
  .fh-row{padding-bottom:16px}
  .fh-search{height:48px}
  .fh-model{display:none}
  .fh-search input{padding:0 14px}
  .fh-go{width:56px;padding:0}
  .fh-go span{display:none}
  .fh-go svg{display:block}
  .fh-carline{font-size:14px}
  .fh-carline > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  .sticky-search{position:fixed;top:0;left:0;right:0;z-index:90;padding:8px 16px;background:var(--fd-blue);box-shadow:0 2px 10px rgba(0,9,91,.35)}
  .sticky-search.show{display:block}
  .sticky-search .fh-search{height:44px}

  .fh-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:95;height:calc(64px + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);background:#fff;border-top:1px solid var(--fd-line);display:grid;grid-template-columns:repeat(4,1fr);font-family:system-ui,'Segoe UI',Roboto,Arial,sans-serif}
  .fh-tabbar a,.fh-tabbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--fd-mut);font-size:10px;line-height:12px;font-weight:600;letter-spacing:.5px;text-transform:uppercase}
  .fh-tabbar .on,.fh-tabbar .open{color:var(--fd-act)}
  .fh-tabbar .has-car .fh-ti::after{content:'';position:absolute;top:-2px;right:-4px;width:8px;height:8px;border-radius:50%;background:#1f9d4a;border:2px solid #fff}
  .fh-ti{position:relative;display:flex}
  .fh-tabbar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .fh-tabbar .iconlink__badge{top:-6px;right:-10px;border-color:#fff;letter-spacing:0}

  /* панели — шторкой над нижней панелью */
  .fh .dd{position:fixed;top:auto;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom,0px));max-height:calc(100vh - 140px);max-height:calc(100dvh - 140px);overflow-y:auto;border-radius:16px 16px 0 0;box-shadow:0 -8px 24px rgba(0,9,91,.25)}
  .fh .dd .carlist,.fh .dd .catgrid{max-height:none}

  /* выбор авто — шторка в два шага: модель, затем год (класс is-years) */
  .fh .fcp{top:24px;max-height:none;overflow:hidden;background:#fff;border-radius:18px 18px 0 0}
  .fh .fcp.open{display:flex;flex-direction:column}
  .fcp__in{display:flex;flex-direction:column;flex:1;min-height:0;max-width:none;margin:0;padding:0}
  .fcp__h{display:flex;align-items:center;gap:8px;padding:12px 12px 12px 18px;border-bottom:1px solid #e5e9f2}
  .fcp__h b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;line-height:24px}
  .fcp__h span{flex:none;font-size:13px;color:var(--fd-mut)}
  .fcp__x,.fcp__bk{flex:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:0;border-radius:10px;background:#f0f2f8;color:var(--fd-ink);font-size:22px;cursor:pointer}
  .fcp__x{margin-left:auto}
  .fcp__bk{margin-left:-6px}
  .fcp:not(.is-years) .fcp__bk,.fcp:not(.is-years) .fcp__s2,.fcp.is-years .fcp__s1,.fcp:not(.is-years) .fcp__y,.fcp.is-years .fcp__m{display:none}
  .fcp__body{display:block;flex:1;min-height:0;max-height:none;padding:12px 18px 0;border-radius:0;box-shadow:none}
  .fcp__m{padding-bottom:16px}
  .fcp__fs{display:flex;align-items:center;gap:8px;height:44px;margin-bottom:12px;padding:0 12px;border:1px solid var(--fd-line);border-radius:10px;color:#8a92ad}
  .fcp__fs input{flex:1;min-width:0;height:100%;border:0;outline:0;background:none;color:var(--fd-ink);font-size:16px}
  .fcp__lb{margin:4px 0 8px}
  .fcp__g{grid-template-columns:1fr 1fr}
  .fcp .carpick{height:44px;font-size:15px}
  .fcp__y{display:block;border:0;padding:0}
  .fcp__y > .fcp__lb{display:none}
  .fcp__yg{grid-template-columns:repeat(4,1fr)}
  .fcp__yg .caryear{height:48px;font-size:15px;line-height:18px}
  .fcp__hint{display:block;margin:12px 0;font-size:13px;line-height:18px;color:var(--fd-mut)}
  .fcp__ft{position:sticky;bottom:0;margin:0 -18px;padding:12px 18px 16px;border-top:1px solid #e5e9f2;background:#fff}
  .fcp__go{height:48px;border-radius:12px;font-size:16px}
}

/* ===== Подвал ===== */
.ff{margin-top:24px;color:var(--fd-ink);font-family:system-ui,'Segoe UI',Roboto,Arial,sans-serif}
.ff-find{background:#fff;border-radius:14px;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 440px}
.ff-map{position:relative;min-height:300px;background:#e8ebf3}
.ff-map iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.ff-info{padding:16px;display:flex;flex-direction:column;gap:12px}
.ff-t{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ff-t h2{margin:0;font-size:20px;line-height:28px}
.ff-st{height:26px;padding:0 10px;border-radius:13px;background:#e7f4ea;color:#1f7a3a;font-size:13px;font-weight:600;display:flex;align-items:center;gap:6px;white-space:nowrap}
.ff-st::before{content:"";width:7px;height:7px;border-radius:50%;background:#1f9d4a}
.ff-st.is-closed{background:#f1f2f6;color:var(--fd-mut)}
.ff-st.is-closed::before{background:#9aa1ba}
.ff-st[hidden]{display:none}
.ff-adr{font-size:15px;line-height:22px}
.ff-adr small{display:block;font-size:13px;color:var(--fd-mut)}
.ff-wk{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center;font-size:12px;line-height:16px;color:var(--fd-mut)}
.ff-wk span{padding:6px 0;border-radius:8px;background:var(--fd-bg)}
.ff-wk b{display:block;font-size:13px;color:var(--fd-ink)}
.ff-wk .on{background:var(--fd-blue);color:var(--fd-soft)}
.ff-wk .on b{color:#fff}
.ff-wk .off,.ff-wk .off b{color:#9aa1ba}
.ff-tl{display:flex;flex-direction:column;border-top:1px solid #eef0f6}
.ff-tl a{height:44px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eef0f6;color:var(--fd-ink);font-size:16px;font-weight:700}
.ff-tl a:hover{color:var(--fd-act)}
.ff-tl i{font-style:normal;font-size:13px;font-weight:500;color:var(--fd-mut)}
.ff-route{height:44px;border-radius:10px;background:var(--fd-act);color:#fff;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:600;font-size:15px}
.ff-route:hover{background:var(--fd-act-h);color:#fff}
.ff-bot{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0 24px;font-size:14px;color:var(--fd-mut)}
.ff-bot nav{display:flex;flex-wrap:wrap;gap:4px 20px}
.ff-bot nav a{color:var(--fd-ink);font-weight:500}
.ff-bot nav a:hover{color:var(--fd-act)}
.ff-r{display:flex;align-items:center;gap:16px;white-space:nowrap}
.ff-so{display:flex;gap:8px}
.ff-so a{width:36px;height:36px;border-radius:50%;background:color-mix(in srgb,var(--c) 12%,#fff);color:var(--c);display:flex;align-items:center;justify-content:center}
.ff-so svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ff-dev{color:var(--fd-mut);font-size:13px}
.ff-dev:hover{color:var(--fd-act)}

@media (max-width:860px){
  .ff-find{grid-template-columns:1fr}
  .ff-map{min-height:180px}
  .ff-bot{flex-direction:column;align-items:flex-start;gap:4px;padding:12px 0 16px}
  .ff-bot nav{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;width:100%}
  .ff-bot nav a{min-height:40px;display:flex;align-items:center}
  .ff-r{flex-wrap:wrap;gap:8px 16px}
  .ff-so{gap:0;margin-left:-2px}
  .ff-so a{width:40px;height:40px;background:none}
}
@media (max-width:359px){
  .ff-wk{gap:2px}
  .ff-wk span{font-size:11px}
}
