/* Шапка и подвал «Верфь на столе» — 2026. Подключается в header.php шаблона syt_2024. */
:root{
  --hf-brown:#5E4531; --hf-dark:#2D1906; --hf-beige:#E2DED1; --hf-beige2:#C2BDAB; --hf-cream:#F4F1EA;
  --hf-red:#BC1A14; --hf-orange:#DD7D31; --hf-tab-h:58px;
}

/* ---------- Коричневая полоса (компьютер) ---------- */
@media (min-width:992px){
  .itb_header_panel_wrap .itb_header_panel.hf-has-right{justify-content:space-between!important;align-items:center;width:100%!important;max-width:1440px;margin:0 auto;padding:0 20px;gap:16px;box-sizing:border-box}
  .itb_header_panel.hf-has-right #itb-horizontal-multilevel-menu{display:flex;flex-wrap:nowrap;white-space:nowrap}
  .itb_header_panel.hf-has-right #itb-horizontal-multilevel-menu>li{float:none}
  .itb_header_panel.hf-has-right .itb_header_panel_menu{flex:1 1 auto;min-width:0}
  .itb_header_panel.hf-has-right .cleared{display:none}
  /* старая строка с тремя телефонами больше не нужна там, где есть коричневая полоса */
  .hdr-contacts-row.is-replaced{display:none!important}
}
@media (min-width:992px) and (max-width:1279.98px){ .hf-hours{display:none} }
@media (min-width:992px) and (max-width:1149.98px){ .hf-promo{display:none} }
.hf-top-right{display:flex;align-items:center;gap:14px;flex:none;font-family:Tahoma,Verdana,sans-serif;color:#fff;font-size:13px;white-space:nowrap;position:relative;z-index:1001}
.hf-promo{background:var(--hf-red);color:#fff!important;font-weight:bold;font-size:12px;line-height:1;padding:6px 10px;border-radius:999px;text-decoration:none!important;letter-spacing:.02em}
.hf-promo:hover{background:#d4241d}
.hf-hours{color:var(--hf-beige2)}
.hf-phone{display:flex;align-items:center;position:relative}
.hf-phone-main{color:#fff!important;font-weight:bold;font-size:15px;text-decoration:none!important;letter-spacing:.01em}
.hf-phone-main:hover{color:var(--hf-beige)!important}
.hf-phone-toggle{background:transparent;border:0;color:#fff;padding:6px 4px 6px 6px;margin:0;cursor:pointer;line-height:0;border-radius:4px}
.hf-phone-toggle:hover,.hf-phone-toggle[aria-expanded="true"]{background:rgba(255,255,255,.12)}
.hf-phone-toggle[aria-expanded="true"] svg{transform:rotate(180deg)}
.hf-drop{position:absolute;right:0;top:calc(100% + 8px);width:290px;background:#fff;color:#333;border-radius:8px;box-shadow:0 10px 30px rgba(45,25,6,.25);padding:14px 16px;white-space:normal;text-align:left}
.hf-drop::before{content:"";position:absolute;right:14px;top:-6px;border:6px solid transparent;border-top:0;border-bottom-color:#fff}

/* Общий список контактов (выпадашка и мобильная панель) */
.hf-clist{list-style:none;margin:0 0 10px;padding:0}
.hf-clist li{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:6px 0;border-bottom:1px solid #eee8dc}
.hf-clist li:last-child{border-bottom:0}
.hf-clist-phone{font-weight:bold;font-size:16px;color:var(--hf-dark)!important;text-decoration:none!important;white-space:nowrap}
.hf-clist li span{font-size:12px;color:#8a7c6b;text-align:right}
.hf-clist-msg{font-size:13px;color:#555;margin-bottom:10px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hf-clist-msg a{display:inline-block;padding:4px 10px;border-radius:999px;background:var(--hf-cream);border:1px solid var(--hf-beige);color:var(--hf-brown)!important;font-weight:bold;font-size:12px;text-decoration:none!important}
.hf-clist-msg a:hover{background:var(--hf-beige)}
.hf-clist-meta{font-size:12px;line-height:1.6;color:#777}
.hf-clist-meta a{color:var(--hf-brown)!important}

/* ---------- Мобильная шапка ---------- */
.hf-m-phone{position:absolute;right:64px;top:5px;width:40px;height:40px;border:0;border-radius:8px;background:transparent;color:#fff;display:flex;align-items:center;justify-content:center;padding:0;z-index:3;cursor:pointer}
.hf-m-phone[aria-expanded="true"]{background:rgba(255,255,255,.15)}
.hf-sheet{position:fixed;left:0;right:0;top:50px;background:#fff;padding:14px 16px 18px;box-shadow:0 12px 30px rgba(45,25,6,.3);z-index:1030;max-height:calc(100vh - 50px);overflow:auto;font-family:Tahoma,Verdana,sans-serif;text-align:left}
.hf-sheet-title{font-weight:bold;color:var(--hf-dark);font-size:15px;margin-bottom:6px}
.hf-backdrop{position:fixed;inset:50px 0 0 0;background:rgba(45,25,6,.35);z-index:1029}
@media (max-width:991.98px){
  .hdr-contacts-row{display:none!important}
  .hdr-main-row{margin-top:50px}
  .mobile_title a{padding-right:30px}
  .hf-f-bottom{padding-bottom:calc(var(--hf-tab-h) + 14px + env(safe-area-inset-bottom))}
}
@media (min-width:992px){ .hf-m-phone,.hf-sheet,.hf-backdrop{display:none!important} }

/* ---------- Нижняя панель (телефон) ---------- */
.hf-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:1020;display:flex;background:#fff;border-top:1px solid var(--hf-beige);box-shadow:0 -4px 14px rgba(45,25,6,.08);padding-bottom:env(safe-area-inset-bottom);font-family:Tahoma,Verdana,sans-serif}
.hf-tab{flex:1 1 0;min-width:0;height:var(--hf-tab-h);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:none;border:0;padding:0;margin:0;color:var(--hf-brown)!important;font-size:11px;line-height:1;text-decoration:none!important;position:relative;cursor:pointer}
.hf-tab svg{fill:none;stroke:currentColor;stroke-width:1.6}
.hf-tab.is-active{color:var(--hf-red)!important}
.hf-tab.is-active::before{content:"";position:absolute;top:0;left:30%;right:30%;height:3px;border-radius:0 0 3px 3px;background:var(--hf-red)}
.hf-tab span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hf-tab-badge{position:absolute;top:6px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--hf-red);color:#fff;font-size:11px;line-height:18px;font-weight:bold;text-align:center;box-sizing:border-box}
@media (min-width:992px){ .hf-tabbar{display:none!important} }

/* ---------- Подвал ---------- */
.hf-footer{background:var(--hf-dark);color:var(--hf-beige);font-family:Tahoma,Verdana,sans-serif;font-size:14px;margin-top:24px}
.hf-footer a{color:var(--hf-beige);text-decoration:none}
.hf-footer a:hover{color:#fff;text-decoration:underline}
.hf-f-inner{padding-top:36px;padding-bottom:24px}
.hf-f-cols{display:grid;grid-template-columns:1.1fr 1fr 1fr 1.3fr;gap:28px}
.hf-f-h{margin:0 0 12px;font-size:13px;font-weight:bold;text-transform:uppercase;letter-spacing:.08em;color:#fff}
.hf-f-h button{all:unset;cursor:default;display:block;width:100%}
.hf-f-list,.hf-f-body ul{list-style:none;margin:0;padding:0}
.hf-f-list li,.hf-f-body li{margin:0 0 7px;padding:0;background:none}
.hf-f-body li::before{display:none}
.hf-f-body .itb_footer_block h4{display:none}
.hf-f-sale{color:var(--hf-orange)!important;font-weight:bold}
.hf-f-all{color:#fff!important;font-weight:bold}
.hf-f-phones{list-style:none;margin:0 0 10px;padding:0}
.hf-f-phones li{margin:0 0 6px}
.hf-f-phones a{color:#fff!important;font-weight:bold;font-size:16px;white-space:nowrap}
.hf-f-phones span{display:block;font-size:12px;color:var(--hf-beige2)}
.hf-f-meta{margin:0 0 10px;line-height:1.55;font-size:13px;color:var(--hf-beige)}
.hf-f-req{text-decoration:underline!important}
.hf-f-social{display:flex;gap:8px;margin-top:12px}
.hf-soc{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.1);display:inline-flex;align-items:center;justify-content:center;font-size:17px;color:#fff!important;text-decoration:none!important;transition:background .15s}
.hf-soc:hover{background:var(--hf-orange)}
.hf-f-sub{margin-top:30px;padding:18px 20px;border-radius:10px;background:rgba(255,255,255,.06);display:flex;gap:24px;align-items:flex-start}
.hf-f-sub-text{flex:0 0 260px}
.hf-f-sub-text b{display:block;color:#fff;font-size:15px;margin-bottom:4px}
.hf-f-sub-text span{font-size:13px;color:var(--hf-beige2)}
.hf-f-sub-form{flex:1 1 auto;min-width:0}
.hf-f-sub .asd_subscribe_form>p{display:none}
.hf-f-sub .asd_subscribe_form form{margin:0}
.hf-f-sub .asd_subscribe_form input[type=email]{width:100%;height:40px;border-radius:6px;border:1px solid transparent;padding:0 12px;font-size:14px;background:#fff;color:#333;box-sizing:border-box}
.hf-f-sub .asd_subscribe_form input[type=submit]{width:100%;height:40px;border-radius:6px;border:0;background:var(--hf-orange);color:#fff;font-weight:bold;font-size:14px;cursor:pointer;padding:0 14px}
.hf-f-sub .asd_subscribe_form input[type=submit]:hover{background:#c96b22}
.hf-f-sub .main-user-consent-request{display:flex;gap:8px;align-items:flex-start;margin:6px 0 0;cursor:pointer}
.hf-f-sub .main-user-consent-request input{margin-top:3px;flex:none}
.hf-f-sub .main-user-consent-request-announce-link{font-size:11px;line-height:1.4;color:var(--hf-beige2)!important}
.hf-f-sub .asd_subscribe_res{color:#fff;font-size:13px}
.hf-f-bottom{border-top:1px solid rgba(255,255,255,.12);padding:14px 0;font-size:12px;color:var(--hf-beige2)}
.hf-f-bottom a{color:var(--hf-beige)}

@media (max-width:991.98px){
  .hf-f-cols{grid-template-columns:1fr 1fr}
  .hf-f-sub{flex-direction:column;gap:10px}
  .hf-f-sub-text{flex:none}
}
@media (max-width:767.98px){
  .hf-footer{margin-top:16px}
  .hf-f-inner{padding-top:8px;padding-bottom:16px}
  .hf-f-cols{grid-template-columns:1fr;gap:0}
  .hf-f-col[data-hf-acc]{border-bottom:1px solid rgba(255,255,255,.12)}
  .hf-f-col[data-hf-acc] .hf-f-h{margin:0}
  .hf-f-col[data-hf-acc] .hf-f-h button{cursor:pointer;padding:14px 0;position:relative}
  .hf-f-col[data-hf-acc] .hf-f-h button::after{content:"";position:absolute;right:4px;top:50%;width:8px;height:8px;border-right:2px solid var(--hf-beige2);border-bottom:2px solid var(--hf-beige2);transform:translateY(-70%) rotate(45deg);transition:transform .2s}
  .hf-f-col[data-hf-acc].is-open .hf-f-h button::after{transform:translateY(-30%) rotate(-135deg)}
  .hf-f-col[data-hf-acc] .hf-f-body{display:none;padding:0 0 12px}
  .hf-f-col[data-hf-acc].is-open .hf-f-body{display:block}
  .hf-f-contacts{padding-top:18px}
  .hf-f-phones li{display:flex;align-items:baseline;gap:8px;margin:0 0 4px}
  .hf-f-phones span{display:inline;font-size:11px}
  .hf-f-sub .asd_subscribe_form form>.col{flex:0 0 100%;max-width:100%}
  .hf-f-sub{margin-top:18px;padding:14px}
  .hf-f-bottom{text-align:center}
}

/* Кнопка «наверх» — справа, не наезжает на заголовки подвала */
.itb_gotop{left:auto!important;right:24px!important;margin-left:0!important;bottom:110px!important}
@media (max-width:991.98px){ .itb_gotop{right:16px!important;bottom:calc(var(--hf-tab-h) + 80px)!important} }
@media (max-width:991.98px){ .hf-footer .hf-f-bottom{padding-bottom:calc(var(--hf-tab-h) + 14px + env(safe-area-inset-bottom))} }

/* Подвал в фирменном коричневом, как раньше; тёмная полоса только у копирайта */
.hf-footer{background:var(--hf-brown)}
.hf-f-bottom{background:var(--hf-dark);border-top:0}
.hf-f-sale{color:#F6B26B!important}
.hf-f-sub{background:rgba(45,25,6,.28)}
.hf-soc{background:rgba(255,255,255,.14)}
.hf-soc:hover{background:var(--hf-orange)}
@media (max-width:767.98px){ .hf-f-col[data-hf-acc]{border-bottom-color:rgba(255,255,255,.16)} }

/* Узкие телефоны (меньше 360px): прячем слово «Меню», чуть уменьшаем название */
@media (max-width:359.98px){ .bx-nav-bars-text{display:none!important} .mobile_title a{font-size:19px} }
