/* =========================================================
   header_b2b.css — clean B2B header Agroshop.site
   Scope: only .header-b2b from my/templates/main.html
   UI law: page edge 10px, radius 12px, round icons/profile 50%
   ========================================================= */

body .header-b2b{
  width:calc(100% - 20px);
  max-width:1680px;
  min-height:72px;
  margin:0 auto 18px;
  padding:0;
  display:flex;
  align-items:center;
  gap:28px;
  background:#fff;
  border-radius:0;
  box-shadow:none;
  position:sticky;
  top:0;
  z-index:1000;
  box-sizing:border-box;
}

body .header-b2b-brand{
  width:300px;
  min-width:300px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

body .header-b2b-brand__link{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  text-decoration:none;
  color:inherit;
}

body .header-b2b-brand__leaf{
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:block;
}

body .header-b2b-brand__text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  line-height:1;
}

body .header-b2b-brand__name{
  display:block;
  color:#176225;
  font-size:30px;
  font-weight:900;
  line-height:1;
  letter-spacing:.1px;
  white-space:nowrap;
}

body .header-b2b-brand__site{
  color:#6aaa34;
  font-weight:900;
}

body .header-b2b-brand__tagline{
  display:block;
  margin-top:4px;
  color:#69746c;
  font-size:13px;
  font-weight:600;
  line-height:1.05;
  white-space:nowrap;
}

body .header-b2b__search{
  width:min(48vw,720px);
  max-width:720px;
  flex:0 1 720px;
  height:44px;
  margin:0;
  display:flex;
  align-items:center;
  position:relative;
  min-width:0;
}

body .header-b2b__search input[type="text"]{
  width:100%;
  height:44px;
  padding:0 112px 0 46px;
  border:1px solid #dde5dd;
  border-radius:12px;
  background:#fff;
  color:#28362d;
  font-size:15px;
  font-weight:500;
  box-shadow:0 3px 12px rgba(20,50,30,.06);
  outline:none;
  box-sizing:border-box;
}

body .header-b2b__search::before{
  content:"";
  position:absolute;
  left:16px;
  top:50%;
  width:16px;
  height:16px;
  border:2px solid #6b7b70;
  border-radius:50%;
  transform:translateY(-56%);
  z-index:2;
  box-sizing:border-box;
}

body .header-b2b__search::after{
  content:"";
  position:absolute;
  left:30px;
  top:27px;
  width:8px;
  height:2px;
  background:#6b7b70;
  border-radius:2px;
  transform:rotate(45deg);
  z-index:2;
}

body .header-b2b__search input[type="submit"]{
  position:absolute;
  right:5px;
  top:5px;
  width:90px;
  min-width:90px;
  height:34px;
  padding:0;
  border:0;
  border-radius:9px;
  background:#2e7d17;
  color:#fff;
  font-size:15px;
  font-weight:800;
  box-shadow:0 5px 14px rgba(46,125,23,.22);
  cursor:pointer;
}

body .header-b2b__news{
  margin-left:auto;
  color:#5f6661;
  font-size:15px;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}

body .header-b2b__news:hover{
  color:#2f3630;
}

body .header-b2b__icon{
  width:34px;
  height:34px;
  min-width:34px;
  padding:0;
  margin:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:0;
  box-shadow:none;
  border-radius:50%;
  position:relative;
  text-decoration:none;
  color:#969797;
}

body .header-b2b__icon:hover{
  color:#6f7670;
}

body .header-b2b__svg{
  width:24px;
  height:24px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2.1;
  stroke-linecap:round;
  stroke-linejoin:round;
}

body .header-b2b__icon img{
  width:24px;
  height:24px;
  display:block;
  object-fit:contain;
  opacity:.72;
  filter:grayscale(1) brightness(.62);
}

body .header-b2b__profile,
body .header-b2b__login,
body .header-b2b__register{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  white-space:nowrap;
}

body .header-b2b__profile{
  width:42px;
  height:42px;
  min-width:42px;
  margin:0 10px 0 2px;
  padding:0;
  border-radius:50%;
  border:1px solid #e4eae4;
  background:#fff;
  box-shadow:0 4px 12px rgba(18,47,29,.07);
  color:#4b5563;
}

body .header-b2b__profile::before{
  content:"👤";
  font-size:22px;
  line-height:1;
}

body .header-b2b__login,
body .header-b2b__register{
  height:38px;
  padding:0 14px;
  border-radius:12px;
  font-size:14px;
  font-weight:800;
}

body .header-b2b__login{
  color:#2f3630;
  background:#fff;
  border:1px solid #e5e7eb;
}

body .header-b2b__register{
  color:#fff;
  background:#0b9444;
  border:1px solid #0b9444;
}

/* desktop compact */
@media (min-width:1280px) and (max-width:1500px){
  body .header-b2b{
    gap:18px;
  }

  body .header-b2b-brand{
    width:260px;
    min-width:260px;
  }

  body .header-b2b__search{
    width:min(42vw,640px);
    max-width:640px;
    flex-basis:640px;
  }

  body .header-b2b-brand__name{
    font-size:26px;
  }

  body .header-b2b-brand__tagline{
    font-size:12px;
  }
}

/* tablet */
@media (min-width:768px) and (max-width:1279.98px){
  body .header-b2b{
    width:calc(100% - 20px);
    min-height:64px;
    margin:0 auto 12px;
    display:flex;
    gap:14px;
  }

  body .header-b2b-brand{
    width:220px;
    min-width:220px;
  }

  body .header-b2b__search{
    width:min(42vw,520px);
    max-width:520px;
    flex:0 1 520px;
  }

  body .header-b2b-brand__leaf{
    width:28px;
    height:28px;
    flex-basis:28px;
  }

  body .header-b2b-brand__name{
    font-size:23px;
  }

  body .header-b2b-brand__tagline{
    font-size:11px;
  }

  body .header-b2b__search{
    height:40px;
  }

  body .header-b2b__search input[type="text"]{
    height:40px;
    padding-right:82px;
    font-size:14px;
  }

  body .header-b2b__search input[type="submit"]{
    width:68px;
    min-width:68px;
    height:30px;
    font-size:13px;
  }

  body .header-b2b__news{
    font-size:14px;
  }

  body .header-b2b__icon{
    width:32px;
    height:32px;
    min-width:32px;
  }

  body .header-b2b__profile{
    width:38px;
    height:38px;
    min-width:38px;
    margin-right:0;
  }
}

/* mobile */
@media (max-width:767.98px){
  body .header-b2b{
    width:calc(100% - 20px);
    min-height:54px;
    margin:0 auto 10px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 30px 30px 30px;
    gap:12px;
    align-items:center;
  }

  body .header-b2b-brand__link{
    gap:7px;
  }

  body .header-b2b-brand__leaf{
    width:26px;
    height:26px;
    flex-basis:26px;
  }

  body .header-b2b-brand__name{
    font-size:22px;
  }

  body .header-b2b-brand__tagline{
    margin-top:3px;
    font-size:9.5px;
  }

  body .header-b2b__search{
    width:30px;
    height:30px;
    min-width:30px;
    max-width:30px;
    overflow:hidden;
    cursor:pointer;
  }

  body .header-b2b__search input[type="text"],
  body .header-b2b__search input[type="submit"]{
    opacity:0;
    pointer-events:none;
    position:absolute;
    inset:0;
    width:30px;
    min-width:30px;
    height:30px;
    padding:0;
  }

  body .header-b2b__search::before{
    left:5px;
    top:7px;
    width:15px;
    height:15px;
    border-color:#969797;
    transform:none;
  }

  body .header-b2b__search::after{
    left:18px;
    top:20px;
    width:8px;
    height:2px;
    background:#969797;
  }

  body .header-b2b__news,
  body .header-b2b__login,
  body .header-b2b__register,
  body .header-b2b__profile{
    display:none;
  }

  body .header-b2b__icon{
    width:30px;
    height:30px;
    min-width:30px;
    border-radius:50%;
    color:#969797;
  }

  body .header-b2b__svg,
  body .header-b2b__icon img{
    width:24px;
    height:24px;
  }
}

/* 2026-05-10 mobile search popup final */
.header-b2b__mobile-search-panel{
  display:none;
}

@media (max-width:767.98px){
  body.mobile-search-open .content{
    padding-top:0;
  }

  .header-b2b{
    position:relative;
    z-index:7000;
  }

  .header-b2b__mobile-search-panel{
    display:none;
    position:absolute;
    left:10px;
    right:10px;
    top:58px;
    z-index:9000;
  }

  .header-b2b__mobile-search-panel.is-open{
    display:block;
  }

  .header-b2b__mobile-search-form{
    width:100%;
    height:44px;
    position:relative;
    display:flex;
    align-items:center;
    background:#fff;
    border:1px solid #dfe7df;
    border-radius:14px;
    box-shadow:0 14px 34px rgba(16,66,40,.18);
    overflow:hidden;
  }

  .header-b2b__mobile-search-form::before{
    content:"";
    width:16px;
    height:16px;
    border:2px solid #7b8794;
    border-radius:50%;
    position:absolute;
    left:15px;
    top:13px;
    box-sizing:border-box;
    pointer-events:none;
  }

  .header-b2b__mobile-search-form::after{
    content:"";
    width:8px;
    height:2px;
    background:#7b8794;
    border-radius:2px;
    position:absolute;
    left:28px;
    top:28px;
    transform:rotate(45deg);
    pointer-events:none;
  }

  .header-b2b__mobile-search-form input[type="text"]{
    width:100%;
    height:44px;
    padding:0 56px 0 42px;
    border:0;
    outline:0;
    background:#fff;
    color:#1f2937;
    font-size:14px;
    line-height:44px;
  }

  .header-b2b__mobile-search-submit{
    width:36px;
    height:36px;
    position:absolute;
    top:4px;
    right:4px;
    border:0;
    border-radius:10px;
    background-color:#138343;
    background-repeat:no-repeat;
    background-position:center;
    background-size:18px 18px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16.2 16.2L21 21'/%3E%3C/svg%3E");
    cursor:pointer;
  }

  .header-b2b__mobile-search-close{
    display:none;
  }
}
/* END mobile search popup final */


/* 2026-05-10 mobile header lupa icon polish */
@media (max-width:767.98px){
  body .header-b2b .header-b2b__search{
    width:30px;
    min-width:30px;
    max-width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:transparent;
    border:0;
    box-shadow:none;
    overflow:visible;
  }

  body .header-b2b .header-b2b__search::before{
    content:"";
    width:15px;
    height:15px;
    position:absolute;
    left:5px;
    top:5px;
    border:2px solid #8b9299;
    border-radius:50%;
    box-sizing:border-box;
    background:transparent;
    pointer-events:none;
  }

  body .header-b2b .header-b2b__search::after{
    content:"";
    width:8px;
    height:2px;
    position:absolute;
    left:18px;
    top:19px;
    background:#8b9299;
    border-radius:2px;
    transform:rotate(45deg);
    transform-origin:center;
    pointer-events:none;
  }
}
/* END mobile header lupa icon polish */

/* 2026-05-10 hide mobile search trigger while popup opened */
@media (max-width:767.98px){
  body.mobile-search-panel-open .header-b2b .header-b2b__search{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
  }
}
/* END hide mobile search trigger while popup opened */
