/* ==========================================================================
   BEYOĞLU TEKNOLOJİ — HEADER & MEGA MENÜ (PRO MAX)
   Namespaces: .bt-header-*, .bt-mega-*, .bt-nav-*
   Zero-wrap, Sticky Compact Mode, Accessible Mega Menu, No-CLS
   ========================================================================== */

/* 1. TOPBAR REFINED */
.bt-header-topbar {
  background-color: var(--bt-dark);
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bt-header-topbar a {
  color: #f1f5f9;
  text-decoration: none;
  transition: color var(--bt-transition-fast);
}
.bt-header-topbar a:hover {
  color: var(--bt-primary);
}

/* 2. MAIN HEADER */
.bt-header-main {
  background: var(--bt-surface);
  border-bottom: 1px solid var(--bt-border);
  position: relative;
  z-index: 950;
  transition: padding var(--bt-transition-fast), box-shadow var(--bt-transition-fast);
}

.bt-header-main.bt-sticky-active {
  position: sticky;
  top: 0;
  box-shadow: var(--bt-shadow-md);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.98);
}

.bt-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
  transition: padding var(--bt-transition-fast);
}

.bt-header-main.bt-sticky-active .bt-header-row {
  padding: 0.5rem 0;
}

/* Logo */
.bt-header-logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.bt-header-logo {
  display: block;
  text-decoration: none;
}
.bt-header-logo img {
  height: 40px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
  transition: height var(--bt-transition-fast);
}
.bt-header-main.bt-sticky-active .bt-header-logo img {
  height: 34px;
}

/* Search Area */
.bt-header-search-wrap {
  flex: 1;
  max-width: 620px;
  position: relative;
}
.bt-header-search-form {
  display: flex;
  align-items: center;
  background: var(--bt-surface-subtle);
  border: 1.5px solid var(--bt-border);
  border-radius: var(--bt-radius-full);
  overflow: hidden;
  transition: border-color var(--bt-transition-fast), box-shadow var(--bt-transition-fast);
}
.bt-header-search-form:focus-within {
  border-color: var(--bt-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(209, 33, 49, 0.12);
}
.bt-header-search-cat {
  padding: 0 0.85rem;
  border-right: 1px solid var(--bt-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bt-text-secondary);
  background: transparent;
  border-top: none;
  border-bottom: none;
  border-left: none;
  outline: none;
  cursor: pointer;
  height: 40px;
}
.bt-header-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--bt-text);
  outline: none;
  height: 40px;
}
.bt-header-search-btn {
  background: var(--bt-primary);
  color: #ffffff;
  border: none;
  padding: 0 1.25rem;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--bt-transition-fast);
}
.bt-header-search-btn:hover {
  background: var(--bt-primary-hover);
}

/* Header User Actions */
.bt-header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}
.bt-header-action-item {
  position: relative;
}
.bt-header-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--bt-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--bt-radius-sm);
  transition: color var(--bt-transition-fast);
}
.bt-header-action-link:hover {
  color: var(--bt-primary);
}
.bt-header-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bt-surface-subtle);
  border: 1px solid var(--bt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bt-text-secondary);
  position: relative;
  transition: all var(--bt-transition-fast);
}
.bt-header-action-link:hover .bt-header-action-icon {
  background: var(--bt-primary-light);
  border-color: var(--bt-primary-border);
  color: var(--bt-primary);
}
.bt-header-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--bt-primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(209, 33, 49, 0.4);
}

/* 3. NAVIGATION BAR & MEGA MENU */
.bt-header-nav-bar {
  background: var(--bt-surface);
  border-bottom: 2px solid #e1e7ef;
  position: relative;
  z-index: 940;
}

.bt-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.35rem;
}

.bt-nav-item {
  position: static;
}

.bt-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.85rem;
  color: var(--bt-text);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--bt-radius-sm);
  transition: all var(--bt-transition-fast);
}

.bt-nav-link:hover, .bt-nav-link:focus, .bt-nav-item:hover > .bt-nav-link {
  color: var(--bt-primary);
  background: var(--bt-primary-light);
}

.bt-nav-arrow {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
  transition: transform var(--bt-transition-fast);
}
.bt-nav-item:hover .bt-nav-arrow {
  transform: rotate(180deg);
}

/* Mega Menu Container */
.bt-mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--bt-border);
  box-shadow: var(--bt-shadow-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  pointer-events: none;
}

.bt-nav-item:hover > .bt-mega-dropdown,
.bt-mega-dropdown:hover,
.bt-nav-item:focus-within > .bt-mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.bt-mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 280px;
  gap: 2rem;
}

.bt-mega-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bt-mega-col-title {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--bt-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--bt-primary-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem 0;
}
.bt-mega-col-title a {
  color: inherit;
  text-decoration: none;
}
.bt-mega-col-title a:hover {
  color: var(--bt-primary);
}

.bt-mega-sublink {
  font-size: 0.825rem;
  color: var(--bt-text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: all var(--bt-transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bt-mega-sublink:hover {
  color: var(--bt-primary);
  transform: translateX(3px);
}
.bt-mega-sublink-count {
  font-size: 0.72rem;
  color: var(--bt-muted);
  background: var(--bt-surface-subtle);
  padding: 1px 6px;
  border-radius: 10px;
}

/* Mega Menu Promo Card */
.bt-mega-promo {
  background: linear-gradient(135deg, #1a1f2e 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--bt-radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--bt-shadow-sm);
  position: relative;
  overflow: hidden;
}
.bt-mega-promo::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 33, 49, 0.4) 0%, transparent 70%);
  pointer-events: none;
}
.bt-mega-promo-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #FDEDED;
  background: rgba(209, 33, 49, 0.35);
  border: 1px solid rgba(209, 33, 49, 0.5);
  padding: 2px 8px;
  border-radius: var(--bt-radius-full);
  display: inline-block;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}
.bt-mega-promo-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  margin: 0 0 0.4rem 0;
}
.bt-mega-promo-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0 0 1rem 0;
}
.bt-mega-promo-btn {
  background: var(--bt-primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.5rem 1rem;
  border-radius: var(--bt-radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  transition: all var(--bt-transition-fast);
}
.bt-mega-promo-btn:hover {
  background: var(--bt-primary-hover);
  transform: translateY(-1px);
}

/* 4. MOBILE HEADER & ACCORDION DRAWER */
.bt-mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--bt-border);
}
.bt-mobile-btn-icon {
  background: none;
  border: none;
  padding: 6px;
  color: var(--bt-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bt-mobile-btn-icon svg {
  width: 22px;
  height: 22px;
}

.bt-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: #ffffff;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--bt-transition-normal);
}
.bt-mobile-drawer.active {
  transform: translateX(0);
}
.bt-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transition: all var(--bt-transition-normal);
}
.bt-mobile-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.bt-mobile-drawer-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bt-border);
}
.bt-mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.bt-mobile-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bt-text);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--bt-border-light);
}
.bt-mobile-acc-content {
  display: none;
  background: var(--bt-surface-subtle);
  padding: 0.5rem 1.25rem 0.75rem 1.75rem;
}
.bt-mobile-acc-content.open {
  display: block;
}
.bt-mobile-acc-sublink {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--bt-text-secondary);
  text-decoration: none;
}
.bt-mobile-acc-sublink:hover {
  color: var(--bt-primary);
}

@media (max-width: 1024px) {
  .bt-header-main, .bt-header-nav-bar {
    display: none !important;
  }
  .bt-mobile-bar {
    display: flex !important;
  }
}
