/**
 * Topbar & Header Styles
 *
 * @package BaitAlKaram
 */

.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 2px solid var(--red);
  position: sticky;
  top: 0;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  padding: 0 4px;
}

.brand {
  color: var(--red);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.brand-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transform: rotate(45deg);
  border-radius: 6px;
}

.brand-mark i {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
.brand-mark i:nth-child(2) { width: 24px; }
.brand-mark i:nth-child(3) { width: 12px; }

.brand-name {
  line-height: 1;
}

.brand-name small {
  direction: rtl;
  display: block;
  margin-top: 6px;
  color: var(--ink-light);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  margin-inline: auto;
}

nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-light);
  transition: color 0.25s ease;
  position: relative;
  padding: 6px 0;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

nav a:hover, nav a.active {
  color: var(--ink);
  font-weight: 600;
}

nav a.active::after, nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  direction: ltr;
  gap: 10px;
}

.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.icon-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

.icon-button:hover {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-color: transparent;
  transform: translateY(-2px);
}

.icon-button:hover svg {
  stroke: #fff;
}

.bag i {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 600;
  font-style: normal;
  border: 2px solid #fff;
}

@media (max-width: 700px) {
  .topbar { height: 68px; }
  nav { display: none; }
  .brand { font-size: 22px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-mark i { width: 14px; }
  .brand-mark i:nth-child(2) { width: 19px; }
  .brand-mark i:nth-child(3) { width: 10px; }
}
