/* Tema 3 — Header (topbar, mainbar, nav, mega menü) */
.t3-header {
  position: sticky;
  top: 0;
  z-index: 300;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #fff;
  box-shadow: 0 1px 0 #e8ecf4;
}

.t3-header-inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.t3-topbar {
  background: #f4f6f8;
  border-bottom: 1px solid #e8ecf4;
}
.t3-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0.35rem 0;
  font-size: 0.75rem;
}
.t3-topbar-left,
.t3-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.t3-topbar-email { color: #64748b; font-weight: 600; }
.t3-topbar-right a {
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
}
.t3-topbar-right a:hover { color: var(--t3-primary); }
.t3-topbar-accent { color: var(--t3-primary) !important; font-weight: 700 !important; }

.t3-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.t3-icon-green { background: #22c55e; }
.t3-icon-blue { background: #3b82f6; }

.t3-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: #e2e8f0;
}
.t3-theme-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.t3-theme-btn.t3-theme-active {
  background: var(--t3-primary);
  color: #fff;
}
.t3-topbar .t3-theme-btn.t3-theme-active {
  background: #475569;
  color: #fff;
}

.t3-mainbar {
  background: #fff;
  border-bottom: 1px solid #eef2f6;
}
.t3-mainbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
  padding: 0.65rem 0;
}

.t3-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--t3-ink);
  text-decoration: none;
  flex-shrink: 0;
}
.t3-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--t3-primary), var(--t3-primary-light));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}
.t3-logo-text span { color: var(--t3-primary); }

.t3-search-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: center;
}
.t3-search {
  position: relative;
  width: 100%;
}
.t3-search input {
  width: 100%;
  padding: 0.72rem 3rem 0.72rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.875rem;
  background: #f8fafc;
  outline: none;
  transition: 0.2s;
}
.t3-search input:focus {
  border-color: var(--t3-primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
  background: #fff;
}
.t3-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--t3-primary);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.t3-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-self: end;
}
.t3-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e8ecf4;
  background: #f8fafc;
  color: var(--t3-ink);
  display: inline-grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s;
}
.t3-icon-badge:hover {
  border-color: rgba(5, 150, 105, 0.35);
  color: var(--t3-primary);
  background: #fff;
}
.t3-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--t3-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}
.t3-badge--notif { background: #f59e0b; }

.t3-notif-wrap { position: relative; }
.t3-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, 88vw);
  background: #fff;
  border: 1px solid var(--t3-border);
  border-radius: 14px;
  box-shadow: var(--t3-shadow-lg);
  overflow: hidden;
  z-index: 400;
}
.t3-notif-panel[hidden] { display: none !important; }
.t3-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.t3-notif-item + .t3-notif-item { border-top: 1px solid #f1f5f9; }
.t3-notif-item:hover { background: #f8fafc; }
.t3-notif-icon { color: var(--t3-primary); flex-shrink: 0; }
.t3-notif-body strong {
  display: block;
  font-size: 0.82rem;
  color: var(--t3-ink);
}
.t3-notif-body small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--t3-muted);
  line-height: 1.4;
}

.t3-mobile-toggle {
  display: none;
  border: 1px solid #e8ecf4;
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--t3-ink);
}

.t3-nav {
  position: relative;
  background: #fff;
  border-top: 1px solid #eef2f6;
}
.t3-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  width: min(1200px, 92vw);
  margin-inline: auto;
}
.t3-nav-list > li {
  display: flex;
  align-items: stretch;
}
.t3-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.55rem;
  white-space: nowrap;
  color: var(--t3-primary-dark);
  font-size: 0.95rem;
  font-weight: 600;
  border-right: 1px solid #eef2f6;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.t3-nav-list li:last-child .t3-nav-item { border-right: 0; }
.t3-nav-item:hover,
.t3-nav-item.t3-nav-active {
  color: var(--t3-primary);
  background: rgba(5, 150, 105, 0.06);
}
.t3-nav-icon {
  display: inline-flex;
  color: inherit;
  flex-shrink: 0;
}
.t3-nav-icon svg { width: 20px; height: 20px; }

.t3-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--t3-border);
  border-radius: 14px;
  box-shadow: var(--t3-shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 500;
}
.t3-search-results[hidden] { display: none !important; }
.t3-search-group-title {
  padding: 0.55rem 1rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.t3-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
}
.t3-search-item:hover { background: #f8fafc; }
.t3-search-item:last-child { border-bottom: 0; }
.t3-search-item-body { min-width: 0; flex: 1; }
.t3-search-item-body strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}
.t3-search-item-body small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
}
.t3-search-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}
.t3-search-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
}
.t3-search-badge-platform { background: #ecfdf5; color: #047857; }
.t3-search-badge-category { background: #d1fae5; color: #065f46; }
.t3-search-badge-package { background: #f1f5f9; color: #475569; }
.t3-search-price { font-size: 0.75rem; font-weight: 700; color: #059669; }
.t3-search-empty {
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: #64748b;
}

.t3-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(15, 23, 42, 0.45);
  padding: 1rem;
}
.t3-mobile-nav[hidden] { display: none !important; }
.t3-mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}
.t3-mobile-nav a,
.t3-mobile-order-btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  background: #fff;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: #0f172a;
  border-top: 1px solid #f1f5f9;
  cursor: pointer;
}
.t3-mobile-order-btn {
  margin-top: 0.5rem;
  border-radius: 10px;
  background: var(--t3-primary);
  color: #fff;
  text-align: center;
}

@media (max-width: 768px) {
  .t3-nav { display: none; }
  .t3-mobile-toggle { display: inline-grid; }
  .t3-topbar-right a:not(.t3-topbar-accent) { display: none; }
  .t3-mainbar-inner {
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
  }
  .t3-search-wrap { max-width: none; }
}
