/* =====================================================
   BSS HEADER — v0.0.8
   One row: LOGO | MENU | ICONS
   No mega, simple dropdown
   ===================================================== */

/* ---------- HEADER WRAPPER ---------- */

.bss-header {
  width: 100%;
  background-repeat: no-repeat;
  background-size: cover;
}

.bss-header[data-bg="light"] {
  background-image: url("../img/bg-header-light.jpg");
}

.bss-header[data-bg="dark"] {
  background-image: url("../img/bg-header-dark.jpg");
}

/* ---------- GRID ---------- */

.bss-header-grid {
  display: grid;
  grid-template-columns: 320px 1fr 260px;
  align-items: center;
  min-height: 160px;
  column-gap: 24px;
}

/* ---------- LOGO ---------- */

.bss-header-logo img {
  max-height: 140px;
  width: auto;
  display: block;
}

/* ---------- MENU ROOT ---------- */

.bss-header-menu {
  position: relative;
}

/* LEVEL 0 */
.bss-menu-level-0 {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ITEM */
.bss-menu-item {
  position: relative;
}

/* LINK */
.bss-menu-item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- DROPDOWN ---------- */

/* LEVEL 1+ */
.bss-menu-level-1,
.bss-menu-level-2 {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  padding: 14px 0;
  list-style: none;
  margin: 12px 0 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  border-radius: 6px;
  display: none;
  z-index: 1000;
}

/* SHOW */
.bss-menu-item.has-children:hover > .bss-menu-level-1 {
  display: block;
}

/* SUB ITEM */
.bss-menu-level-1 .bss-menu-item > a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  color: #333;
}

/* HOVER */
.bss-menu-level-1 .bss-menu-item > a:hover {
  background: rgba(0,0,0,0.05);
}

/* ---------- ICONS ---------- */

.bss-header-icons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.bss-header-icons i.material-icons {
  font-size: 22px;
  cursor: pointer;
}

/* ---------- FIX PS DEFAULTS ---------- */

.bss-header .hidden-sm-down {
  display: none !important;
}

/* =========================================
   MENU — HOVER FIX (NO GAP)
   ========================================= */

/* parent item */
.bss-menu-item {
  position: relative;
}

/* second level */
.bss-menu-level-1 {
  position: absolute;
  top: 100%;              /* БЕЗ margin */
  left: 0;
  margin: 0;              /* ВАЖЛИВО */
  padding: 14px 0;
  background: #fff;
  min-width: 260px;
  z-index: 1000;
  display: none;
}

/* hover trigger */
.bss-menu-item:hover > .bss-menu-level-1 {
  display: block;
}

/* invisible hover bridge */
.bss-menu-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;           /* перекриває gap */
}

/* prevent pointer loss */
.bss-menu-level-1,
.bss-menu-level-1 * {
  pointer-events: auto;
}


/* =========================================
   SEARCH — ICON TOGGLE
   ========================================= */

.bss-header-icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* wrapper */
#search_widget {
  position: relative;
}

/* input hidden by default */
#search_widget form input[type="text"] {
  width: 0;
  opacity: 0;
  padding: 0;
  border: none;
  transition: width 0.25s ease, opacity 0.2s ease;
  pointer-events: none;
}

/* active state */
#search_widget.active form input[type="text"] {
  width: 220px;
  opacity: 1;
  padding: 8px 14px;
  pointer-events: auto;
}

/* search icon */
#search_widget .material-icons.search {
  cursor: pointer;
  font-size: 22px;
}

/* hide clear icon */
#search_widget .material-icons.clear {
  display: none !important;
}
