/* =====================================================================
   Header v2 — hamburger + logo + big search + 5 icon tiles + sidebar drawer.
   Override-uri pe stilurile vechi din inspire-shop.css.
   ===================================================================== */

/* ---------- Header layout ---------- */
.id-header.id-header--v2 {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
  padding: 12px 32px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.id-header--v2 .id-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.id-header--v2 .id-header__logo img {
  height: 30px; width: auto;
  display: block;
}

.id-header--v2 .id-hamburger {
  background: transparent;
  border: 0;
  width: 38px; height: 38px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  gap: 5px;
  cursor: pointer;
}
.id-header--v2 .id-hamburger span {
  width: 22px; height: 2px;
  background: #1a1a1a;
  border-radius: 2px;
}

/* ---------- Search big rounded ---------- */
.id-header--v2 .id-header__search {
  flex: 1;
  max-width: 720px;
  position: relative;
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 0 18px;
  height: 44px;
  transition: background .15s, box-shadow .15s;
}
.id-header--v2 .id-header__search:focus-within {
  background: #fff;
  box-shadow: 0 0 0 1px #d0d0d0, 0 4px 16px rgba(0,0,0,0.06);
}
.id-header--v2 .id-header__search-icon {
  color: #888;
  margin-right: 10px;
  flex-shrink: 0;
}
.id-header--v2 .id-header__search input {
  flex: 1;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  color: #1a1a1a;
  height: 100%;
  width: 100%;
}
.id-header--v2 .id-header__search input::placeholder {
  color: #888;
  font-weight: 300;
}

/* ---------- Icon tiles (right) ---------- */
.id-header--v2 .id-header__icons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.id-header--v2 .id-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  text-decoration: none;
  color: #1a1a1a;
  border-radius: 12px;
  transition: background .15s;
  position: relative;
  min-width: 60px;
}
.id-header--v2 .id-icon-tile:hover {
  background: #f5f5f5;
}
.id-header--v2 .id-icon-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
}
.id-header--v2 .id-icon-tile__label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: #1a1a1a;
}
.id-header--v2 .id-icon-tile__badge {
  position: absolute;
  top: 4px; right: 6px;
  background: #ff5555;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hide old nav from header v1 (in case both are rendered) */
.id-header--v2 .id-header__nav { display: none !important; }

/* ---------- Sidebar drawer ---------- */
.id-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 380px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  z-index: 70;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.08);
}
.id-sidebar.is-open { transform: translateX(0); }

.id-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.id-sidebar__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #888;
  margin: 0;
  text-transform: uppercase;
}
.id-sidebar__close {
  background: transparent;
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #1a1a1a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.id-sidebar__close:hover { background: #f5f5f5; }

.id-sidebar__list {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  overflow-y: auto;
  flex: 1;
}
.id-sidebar__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 400;
  transition: background .15s;
}
.id-sidebar__item:hover { background: #f5f5f5; }
.id-sidebar__thumb {
  width: 56px; height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}
.id-sidebar__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.id-sidebar__label { flex: 1; }

/* ---------- Overlay ---------- */
.id-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 65;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
body.id-sidebar-open .id-sidebar-overlay {
  opacity: 1;
  visibility: visible;
}

/* Lock body scroll when sidebar open (mobile) */
body.id-sidebar-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .id-header--v2 .id-icon-tile__label { display: none; }
  .id-header--v2 .id-icon-tile { padding: 8px 10px; min-width: auto; }
  .id-header--v2 { padding: 12px 20px; gap: 16px; }
}

@media (max-width: 768px) {
  .id-header--v2 { height: 64px; padding: 10px 14px; gap: 10px; }
  .id-header--v2 .id-header__logo img { height: 24px; }
  .id-header--v2 .id-header__search {
    height: 40px;
    padding: 0 14px;
  }
  .id-header--v2 .id-header__search input { font-size: 14px; }
  .id-header--v2 .id-header__icons { gap: 0; }
  .id-header--v2 .id-icon-tile { padding: 6px 8px; }
}

@media (max-width: 520px) {
  /* Pe mobil mic, ascundem unele iconuri ca să încapă */
  .id-header--v2 .id-icon-tile:nth-child(1),  /* Servicii */
  .id-header--v2 .id-icon-tile:nth-child(2),  /* Produse  */
  .id-header--v2 .id-icon-tile:nth-child(3) { /* Favorite */
    display: none;
  }
}
