:root {
  --black: #1a1a1a;
  --white: #fff;
  --red: #e53935;
  --gray: #f5f5f5;
  --border: #e0e0e0;
  --muted: #888;
}

#tm-common-header,
#tm-common-header * {
  box-sizing: border-box;
}

#tm-common-header .topbar {
  background: var(--black);
  color: #fff;
  text-align: center;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  font-family: 'Montserrat', sans-serif;
}

#tm-common-header .topbar span {
  color: #ffd600;
  margin: 0 6px;
}

#tm-common-header header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#tm-common-header .header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

#tm-common-header .site-logo-img {
  height: 32px;
  width: 188px;
  object-fit: contain;
}

#tm-common-header .header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#tm-common-header .header-nav a {
  text-decoration: none;
  color: var(--black);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .15s;
  white-space: nowrap;
  font-family: 'Montserrat', sans-serif;
}

#tm-common-header .header-nav a:hover {
  background: var(--gray);
}

#tm-common-header .nav-personalizat {
  background: var(--red) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
  font-weight: 700 !important;
}

#tm-common-header .nav-personalizat:hover {
  background: #c62828 !important;
}

#tm-common-header .nav-dropdown {
  position: relative;
}

#tm-common-header .nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 8px !important;
  margin-bottom: -8px !important;
}

#tm-common-header .nav-dropdown > a::after {
  content: '▾';
  font-size: 10px;
  opacity: .6;
}

#tm-common-header .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 300;
  padding: 6px 0;
}

#tm-common-header .nav-dropdown:hover .dropdown-menu {
  display: block;
}

#tm-common-header .dropdown-menu a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 16px !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  color: var(--black) !important;
  border-bottom: 1px solid #f5f5f5;
}

#tm-common-header .dropdown-menu a:last-child {
  border-bottom: none;
}

#tm-common-header .dropdown-menu a:hover {
  background: var(--gray) !important;
}

#tm-common-header .dd-icon {
  font-size: 16px;
}

#tm-common-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#tm-common-header .btn-cart {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--black);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}

#tm-common-header .btn-cart:hover {
  background: #333;
}

#tm-common-header .cart-count {
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tm-common-header .hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

#tm-common-header .hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
}

#tm-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 10000;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

#tm-mobile-menu.open {
  display: flex;
}

#tm-mobile-menu .mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

#tm-mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#tm-mobile-menu nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#tm-mobile-menu .mobile-section-label {
  font: 700 11px/1.3 'Montserrat', sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 0 4px;
}

#tm-mobile-menu .mobile-menu-footer {
  margin-top: auto;
  padding-top: 24px;
  font: 13px/1.7 'Montserrat', sans-serif;
  color: var(--muted);
}

@media (max-width: 768px) {
  #tm-common-header header {
    padding: 0 16px;
  }

  #tm-common-header .header-nav {
    display: none;
  }

  #tm-common-header .hamburger {
    display: flex;
  }

  #tm-common-header .site-logo-img {
    height: 24px;
    width: 141px;
  }
}
