/* ===== Desktop only, прячем родную тему ===== */
@media (min-width:992px){
  header#masthead .nav,
  header#masthead .menu,
  header#masthead .vertical-menu,
  header#masthead .search-box,
  header#masthead .shopping-cart{display:none!important}
}
@media (max-width:991.98px){.zfpc-header{display:none!important}}

/* фиксируем шапку и компенсируем отступ body */
@media (min-width:992px){
  body{padding-top:72px}
  body.admin-bar{padding-top:104px}
}

.zfpc-header{
  position:fixed; inset:0 0 auto 0; z-index:10010;
  background:#fff; box-shadow:0 1px 0 rgba(0,0,0,.06);
  height:72px; display:flex; align-items:center;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
  isolation:isolate;

  /* -------- КОНФИГУРАЦИЯ (меняй цифры под себя) -------- */
  --zfpc-search-left-shift: -80px;  /* ДОП. длина поля влево (отрицательное - уезжает влево) */
  --zfpc-search-height: 38px;       /* высота поля поиска (было 42px) */
  --zfpc-search-border: 1px;        /* толщина рамки поиска (было 2px) */
}
body.admin-bar .zfpc-header{top:32px}

/* локальный reset, чтобы тема не ломала */
.zfpc-header,.zfpc-header *{
  box-sizing:border-box;
  writing-mode:horizontal-tb!important; text-orientation:mixed!important;
  direction:ltr!important; letter-spacing:normal!important; text-transform:none!important;
}
.zfpc-header span,.zfpc-header small,.zfpc-header b,.zfpc-header a{white-space:nowrap;line-height:1.2}
.zfpc-ship-text{white-space:normal}

/* ===== GRID: логотип/категории чуть левее, место в центре под поиск ===== */
.zfpc-wrap{
  width:100%; max-width:1400px; margin:0 auto;
  padding:0 12px 0 8px; /* <— левую «прокладку» уменьшили (логотип визуально левее) */
  display:grid; align-items:center; gap:16px;

  /* columns: LEFT | CENTER(search) | RIGHT */
  grid-template-columns: 200px 1fr 300px; /* левую сузили → поиск длиннее влево; правая 300 — чтоб не ломалась */
}
@media (min-width:1600px){
  .zfpc-wrap{ grid-template-columns: 200px 1fr 300px; }
}

/* ===== LEFT (logo + categories ниже) */
.zfpc-left{
  display:flex; flex-direction:column; align-items:flex-start; gap:8px;
  transform: translateY(26px);      /* «чуть ниже» как просил */
  margin-left:-6px;                  /* «чуть левее» */
}
.zfpc-logo img{ height:48px; width:auto; display:block }
.zfpc-logo .zfpc-logo-fallback{ font-weight:700; font-size:22px; text-decoration:none; color:#111 }

.zfpc-categories{ position:relative }
.zfpc-cat-btn{
  display:flex; align-items:center; gap:10px;
  height:36px; padding:0 14px; margin-left:12px;   /* немного правее под логотипом */
  border:1px solid #eee; background:#fafafa; border-radius:999px; cursor:pointer;
}
.zfpc-cat-btn:hover{ background:#f3f3f3 }
.zfpc-cat-icon::before{
  content:""; display:inline-block; width:18px; height:18px; background:
  linear-gradient(#111,#111) left 2px top 4px/14px 2px no-repeat,
  linear-gradient(#111,#111) left 2px top 8px/14px 2px no-repeat,
  linear-gradient(#111,#111) left 2px top 12px/14px 2px no-repeat;
}

/* дроп-даун категорий */
.zfpc-cat-panel{
  position:absolute; left:0; top:42px; min-width:680px; width:max(60vw,840px);
  background:#fff; border:1px solid #eee; border-radius:14px; box-shadow:0 12px 40px rgba(0,0,0,.08);
  padding:14px; display:block;
}
.zfpc-cat-panel[hidden]{ display:none!important }
.zfpc-cat-grid{ display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px 12px }
.zfpc-cat-item{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; text-decoration:none; color:#111 }
.zfpc-cat-item:hover{ background:#f7f7f7 }
.zfpc-cat-thumb{ width:27px; height:27px; background:#eee; border-radius:8px }

/* ===== CENTER — длинный поиск (длиннее влево), тоньше бордер, ниже placeholder */
.zfpc-center{ min-width:0 }
.zfpc-search{
  position:relative; display:flex; align-items:center;
  height:var(--zfpc-search-height);
  border:var(--zfpc-search-border) solid #111; border-radius:999px;
  background:#fff;
  overflow:visible;                  /* нужно, чтобы внутренняя «капсула» лупы была полностью округлой */
  margin-left:var(--zfpc-search-left-shift);  /* ← растягиваем влево */
  z-index:1;
}

/* «чище» инпут + placeholder чуть ниже */
.zfpc-search-input,
.zfpc-search input[type="search"]{
  flex:1; min-width:0;
  border:0!important; box-shadow:none!important; outline:0!important; background:transparent!important;
  height:var(--zfpc-search-height)!important;
  line-height:var(--zfpc-search-height)!important;
  padding:2px 70px 0 16px!important; /* +2px сверху — placeholder визуально «чуть ниже» */
  font-size:15px; -webkit-appearance:none; appearance:none;
}
.zfpc-search input::-webkit-search-decoration,
.zfpc-search input::-webkit-search-cancel-button{ -webkit-appearance:none }

/* старую «поиск по картинке» прячем */
.zfpc-search-pic{ display:none!important }

/* ===== КНОПКА-ЛУПА: отдельная овальная капсула внутри поля ===== */
.zfpc-search-submit{
  position:relative; display:flex; align-items:center; justify-content:center;
  height:calc(var(--zfpc-search-height) - 8px);
  width:calc(var(--zfpc-search-height) - 8px);      /* круг; хочешь «овальчик» — сделай шире, например +12px */
  margin-right:6px; margin-left:6px;
  border:0; border-radius:999px; background:#111; cursor:pointer;
}
.zfpc-search-submit::before{
  content:""; width:22px; height:22px;
  background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><circle cx="10" cy="10" r="7" stroke="white" stroke-width="2" fill="none"/><line x1="15" y1="15" x2="22" y2="22" stroke="white" stroke-width="2"/></svg>')
            center/22px 22px no-repeat;
  display:block; transform:translateY(-1px);
}

/* ===== RIGHT (языки, аккаунт, корзина) ===== */
.zfpc-right{ display:flex; align-items:center; gap:16px }

.zfpc-ship-btn{
  display:flex; align-items:center; gap:8px; height:40px; padding:0 12px;
  border-radius:12px; border:1px solid #eee; background:#fff; cursor:pointer;
}
.zfpc-flag{ font-size:20px; line-height:1 }
.zfpc-ship-text{ display:flex; flex-direction:column; line-height:1.1 }
.zfpc-ship-text small{ color:#777; font-size:12px }
.zfpc-ship-text b{ font-size:14px }

/* GTranslate внутри правого блока */
.zfpc-header #gt_float_wrapper{ position:static!important; top:auto!important; right:auto!important; z-index:auto!important }
.zfpc-header .gt_float_switcher{
  opacity:1!important; background:#fff!important; border:1px solid #eee!important; border-radius:12px!important;
  height:40px; display:flex; align-items:center; padding:0 10px;
}
.zfpc-header .gt-current-lang{ display:flex; align-items:center; gap:6px }
.zfpc-header .gt-current-lang img{ width:18px; height:18px }
.zfpc-header .gt_options{ right:0!important; left:auto!important; top:44px!important }

/* Аккаунт — иконка «человечек» */
.zfpc-acc-ico{
  width:24px;height:24px;background:none!important;-webkit-mask:none!important;mask:none!important;display:inline-block;background-repeat:no-repeat;background-position:center;background-size:22px 22px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23111' d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-5.2 0-8 3.1-8 6h16c0-2.9-2.8-6-8-6Z'/%3E%3C/svg%3E")
}
.zfpc-acc-link,.zfpc-cart-link{ display:flex; align-items:center; gap:8px; text-decoration:none; color:#111 }
.zfpc-acc-text small{ color:#777; font-size:12px; display:block }
.zfpc-acc-text b{ font-size:14px }

/* Корзина — иконка и подписи */
.zfpc-cart-ico{
  width:24px;height:24px;background:none!important;-webkit-mask:none!important;mask:none!important;display:inline-block;background-repeat:no-repeat;background-position:center;background-size:22px 22px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23111' d='M7 4H5L4 6v2h2l3.6 7.6-1.35 2.45A1 1 0 0 0 9 20h10v-2H9.4l.93-1.67h6.72a2 2 0 0 0 1.79-1.11L22 8H6.21'/%3E%3C/svg%3E")
}
.zfpc-cart-link{ align-items:center; gap:8px }
.zfpc-cart-text{ display:flex; flex-direction:column; align-items:flex-start; gap:4px }
.zfpc-cart-count{ min-width:28px; height:22px; padding:0 8px; border-radius:999px; background:#111; color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700 }
.zfpc-cart-text b{ font-size:14px; font-weight:700; line-height:1.1 }

/* мелочь */
.zfpc-cat-btn[aria-expanded="true"]{ background:#f0f0f0 }

@media (min-width: 992px){

  .zfpc-search-input{
    position: relative !important;
    top: 5px !important;            /* мягкий сдвиг всего ввода вниз */
    padding-top: 8px !important;    /* доп. опускание контента */
    line-height: 18px !important;   /* ниже базовая линия */
    height: calc(var(--zfpc-search-height) - 3px) !important; /* чтобы не резалось */
  }

  .zfpc-search-input::placeholder{ opacity:1 !important; position:relative; top:1px !important; }
  .zfpc-search-input::-webkit-input-placeholder{ position:relative; top:2px !important; }
  .zfpc-search-input::-moz-placeholder{ position:relative; top:1px !important; }
  .zfpc-search-input:-ms-input-placeholder{ position:relative; top:2px !important; }
  .zfpc-search-input::-ms-input-placeholder{ position:relative; top:2px !important; }
}

@media (min-width: 992px){

  .zfpc-acc-ico{
    background: none !important;
    -webkit-mask: none !important; mask: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;

    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<circle cx='12' cy='7' r='4'/>\
<path d='M5.5 21a8.5 8.5 0 0 1 13 0'/>\
</svg>") !important;
  }


  .zfpc-cart-ico{
    background: none !important;
    -webkit-mask: none !important; mask: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;

    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<circle cx='9' cy='21' r='1'/>\
<circle cx='20' cy='21' r='1'/>\
<path d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/>\
</svg>") !important;
  }
}
