/* =========================================================
   /includes/armazenato_css/header_style.css
   Layout baseado no seu header atual (mesmo visual)
   Prefixo: haz
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root{
  --haz-white:#fff;
  --haz-text:#111;
  --haz-muted:#6b7280;
  --haz-line:#e9e9e9;
  --haz-soft:#f4f4f4;
  --haz-orange:#ff6a00;
  --haz-container:1400px;
  --haz-font:"Poppins",system-ui,-apple-system,Arial,sans-serif;
  --haz-nav-size:16px;
  --haz-nav-weight:500;
  --haz-nav-lh:22px;
}

/* Reset escopado */
#hazHeader, #hazHeader * {
  box-sizing:border-box;
  font-family:var(--haz-font) !important;
}
#hazHeader a, #hazHeader button, #hazHeader select, #hazHeader input {
  font: inherit;
}
#hazHeader button {
  -webkit-appearance:none;
  appearance:none;
}
#hazHeader img{
  display:block;
  max-width:100%;
}

/* Base */
.hazH{
  position:sticky;
  top:0;
  z-index:999;
  background:var(--haz-white);
  border-bottom:1px solid var(--haz-line);
  color:var(--haz-text);
}

.hazWrap{
  max-width:var(--haz-container);
  margin:0 auto;
  padding:12px 16px;
}

.hazTop{
  display:flex;
  align-items:center;
  gap:16px;
}

/* Brand */
.hazBrand img{
  width:180px;
  height:auto;
  display:block;
}

/* ✅ BUSCA PROPORCIONALMENTE MAIOR */
.hazSearchWrap{
  flex:2;
  display:flex;
  align-items:center;
  margin:0 30px;
  position:relative;
}
.hazSearch{
  display:flex;
  align-items:center;
  border:1px solid var(--haz-line);
  border-radius:999px;
  overflow:hidden;
  background:#fff;
  height:48px;
  width:100%;
}
.hazSearchType{
  border:0;
  background:var(--haz-soft);
  padding:0 12px;
  height:48px;
  cursor:pointer;
  border-right:1px solid var(--haz-line);
  font-size:14px;
  font-weight:500;
  outline:none;
}
.hazSearch input{
  flex:1;
  border:0;
  outline:none;
  padding:0 14px;
  font-size:15px;
  font-weight:400;
  min-width:0;
}
.hazSearchBtn{
  width:56px;
  height:48px;
  border:0;
  cursor:pointer;
  background:var(--haz-orange);
  display:grid;
  place-items:center;
  transition:filter .15s ease;
}
.hazSearchBtn:hover{
  filter:brightness(1.05);
}

/* ✅ ÍCONES AGRUPADOS */
.hazActions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:fit-content;
}

.hazAuthLink{
  text-decoration:none;
  color:inherit;
  font-size:14px;
}
.hazAuthSep{
  color:var(--haz-muted);
}
.hazAuthLinkAccent{
  color:var(--haz-orange);
  font-weight:600;
}

.hazIcon{
  position:relative;
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:inherit;
  text-decoration:none;
  transition: background .2s;
}
.hazIcon:hover{
  background:rgba(0,0,0,.04);
}

.hazIcoImg{
  width:26px;
  height:26px;
  display:block;
  object-fit:contain;
}

/* ✅ CONTADOR (BADGE) */
.hazCounter{
  position:absolute;
  top:4px;
  right:4px;
  background:#ef4444;
  color:#fff;
  font-size:10px;
  font-weight:700;
  min-width:18px;
  height:18px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #fff;
  line-height:1;
}

/* Usuário */
.hazUser{
  position:relative;
  margin-left:12px;
}
.hazUserBtn{
  display:flex;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  cursor:pointer;
  padding:6px 10px;
  border-radius:999px;
  font-size:15px;
  font-weight:500;
}
.hazUserBtn:hover{
  background:rgba(0,0,0,.03);
}
.hazAvatar{
  width:34px;
  height:34px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,106,0,.1);
  border:1px solid rgba(255,106,0,.22);
  display:grid;
  place-items:center;
  font-weight:600;
}
.hazAvatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.hazUserName{
  font-size:15px;
  font-weight:500;
  line-height:20px;
  max-width:180px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Menu usuário */
.hazMenu{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  width:290px;
  background:#fff;
  border:1px solid var(--haz-line);
  border-radius:14px;
  box-shadow:0 14px 30px rgba(0,0,0,.1);
  padding:8px;
  display:none;
  z-index:9999;
}
.hazMenu.open{
  display:block;
}
.hazMenu a,
.hazMenu button{
  display:block;
  width:100%;
  padding:12px;
  border-radius:10px;
  text-decoration:none;
  color:inherit;
  font-size:14px;
  font-weight:500;
  border:0;
  background:none;
  cursor:pointer;
  text-align:left;
  border-bottom:1px solid var(--haz-line);
}
.hazMenu a:hover,
.hazMenu button:hover{
  background:rgba(0,0,0,0.03);
}
.hazMenu a:last-child,
.hazMenu button:last-child{
  border-bottom:0;
}
.hazMenuDivider{
  height:1px;
  background:var(--haz-line);
  margin:8px 0;
}
.hazMenuLabel{
  padding:8px 12px;
  font-size:11px;
  color:var(--haz-muted);
  text-transform:uppercase;
  font-weight:700;
  letter-spacing:.5px;
}
.hazMenuBtnOk{
  color:#0f766e !important;
}
.hazMenuBtnDanger{
  color:#b91c1c !important;
}

/* Barra offline */
.hazOfflineBar{
  max-width:var(--haz-container);
  margin:10px auto 0;
  padding:10px 16px;
  border:1px solid #ffe1c7;
  background:#fff7ed;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#7c2d12;
  font-size:14px;
  font-weight:600;
}
.hazOfflineBtn{
  border:0;
  background:var(--haz-orange);
  color:#fff;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
}

/* Barra nav */
.hazBar{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--haz-line);
  overflow:visible;
}
.hazNav{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  gap:14px;
  min-height:45px;
  flex-wrap:wrap;
  overflow:visible;
}

.hazNavLink,
.hazDropBtn{
  font-size:var(--haz-nav-size) !important;
  font-weight:var(--haz-nav-weight) !important;
  line-height:var(--haz-nav-lh) !important;
  white-space:nowrap;
  color:var(--haz-text);
  text-decoration:none;
  padding:8px 12px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:transparent;
}
.hazNavLink:hover,
.hazDropBtn:hover{
  background:rgba(0,0,0,.04);
}

/* Dropdown nav */
.hazDropBtn{
  border:0;
  cursor:pointer;
}
.hazDrop{
  position:relative;
}
.hazDropMenu{
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  min-width:260px;
  background:#fff;
  border:1px solid var(--haz-line);
  border-radius:14px;
  box-shadow:0 14px 30px rgba(0,0,0,.12);
  padding:8px;
  display:none;
  z-index:9999;
}
.hazDropMenu.open{
  display:block;
}
.hazDropMenu a{
  display:block;
  padding:12px;
  border-radius:10px;
  text-decoration:none;
  color:var(--haz-text);
  font-size:14px;
  font-weight:600;
  border-bottom:1px solid var(--haz-line);
}
.hazDropMenu a:last-child{
  border-bottom:0;
}
.hazDropMenu a:hover{
  background:rgba(0,0,0,.03);
}

/* Botão Categorias */
.hazCategoryContainer{
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
}
.hazCategoryBtn{
  border:0;
  background:transparent;
  cursor:pointer;
  padding:8px 12px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:var(--haz-nav-size);
  font-weight:var(--haz-nav-weight);
  line-height:var(--haz-nav-lh);
}
.hazCategoryBtn:hover{
  background:rgba(0,0,0,.04);
}

/* Dropdown categorias (AJUSTADO) */
.hazCategoryDropdown{
  display:none;
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  min-width:720px;
  max-width:min(92vw, 980px);
  background:#fff;
  border:1px solid var(--haz-line);
  border-radius:14px;
  box-shadow:0 14px 30px rgba(0,0,0,.12);
  padding:14px;
  z-index:9998;
}
.hazCategoryDropdown.open{
  display:block;
}
.hazCategoryDropdownInner{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:10px 16px;
  max-height:360px;
  overflow:auto;
  padding-right:4px;
}
.hazCategoryColumn{
  display:flex;
  flex-direction:column;
  gap:6px;
  text-align:left;
}
.hazCategoryDropdown a{
  display:block;
  padding:7px 8px;
  text-decoration:none;
  color:var(--haz-text);
  font-size:14px;
  font-weight:500;
  border-radius:8px;
}
.hazCategoryDropdown a:hover{
  background:rgba(0,0,0,.04);
  color:var(--haz-orange);
}
.hazCategoryEmpty{
  color:var(--haz-muted);
  font-size:14px;
  padding:6px;
}
.hazCategoryFoot{
  border-top:1px solid var(--haz-line);
  margin-top:10px;
  padding-top:10px;
}
.hazCategoryFoot a{
  color:var(--haz-orange);
  font-weight:600;
  padding:6px 4px;
}

/* Responsivo */
@media (max-width: 1100px){
  .hazSearchWrap{
    margin:0 14px;
  }
  .hazBrand img{
    width:160px;
  }
}

@media (max-width: 920px){
  .hazTop{
    flex-wrap:wrap;
    gap:10px;
  }

  .hazBrand{
    order:1;
  }

  .hazActions{
    order:2;
    margin-left:auto;
  }

  .hazSearchWrap{
    order:3;
    width:100%;
    flex:1 1 100%;
    margin:0;
  }

  .hazNav{
    justify-content:flex-start;
    padding-left:120px; /* espaço pro botão categorias */
  }

  .hazCategoryDropdown{
    min-width:min(92vw, 700px);
  }
}

@media (max-width: 640px){
  .hazWrap{
    padding:10px 10px;
  }

  .hazBrand img{
    width:140px;
  }

  .hazIcon{
    width:42px;
    height:42px;
  }

  .hazIcoImg{
    width:22px;
    height:22px;
  }

  .hazSearch{
    height:42px;
  }

  .hazSearchType{
    height:42px;
    font-size:12px;
    padding:0 8px;
  }

  .hazSearch input{
    font-size:13px;
    padding:0 10px;
  }

  .hazSearchBtn{
    width:46px;
    height:42px;
  }

  .hazUserName{
    display:none;
  }

  .hazUser{
    margin-left:4px;
  }

  .hazNav{
    gap:8px;
    justify-content:flex-start;
    padding-left:0;
    min-height:auto;
  }

  .hazCategoryContainer{
    position:relative;
    left:auto;
    top:auto;
    transform:none;
  }

  .hazCategoryDropdown{
    top:calc(100% + 8px);
    left:0;
    min-width:min(92vw, 420px);
    max-width:92vw;
    padding:12px;
  }

  .hazCategoryDropdownInner{
    grid-template-columns:1fr 1fr;
    gap:10px 12px;
    max-height:300px;
  }

  .hazCategoryDropdown a{
    font-size:14px;
  }

  .hazOfflineBar{
    flex-direction:column;
    align-items:stretch;
  }

  .hazOfflineBtn{
    width:100%;
  }

  .hazMenu,
  .hazDropMenu{
    width:min(92vw, 290px);
  }
}

@media (max-width: 420px){
  .hazCategoryDropdownInner{
    grid-template-columns:1fr;
  }

  .hazSearchType{
    max-width:90px;
  }
}