/* ============================================================
   CLAVE HEADER — Sticky, Scroll Şeffaflık, Logo Swap
   ============================================================ */

/* ── Duyuru Çubuğu (Gymshark Stili Dikey Slider) ── */
.announcement-bar {
  background: var(--c-black);
  color: var(--c-white);
  overflow: hidden;
  height: 38px;
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.announcement-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.announcement-item.is-active {
  opacity: 1;
  transform: translateY(0);
  z-index: 2;
}

.announcement-item.is-leaving {
  opacity: 0;
  transform: translateY(-100%);
  z-index: 1;
}

/* ── Header Wrapper ── */
.site-header {
  position: absolute;
  top: 38px;
  /* marquee yüksekliği kadar aşağıda */
  left: 0;
  right: 0;
  z-index: 1010;
  height: var(--header-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.at-top {
  background: transparent;
  box-shadow: none;
}

.site-header.scrolled {
  position: fixed;
  top: 0;
  background: var(--c-white);
  box-shadow: var(--shadow-sm);
}

/* Marquee ve header akışta; ekstra boşluk gerekmez */
body {
  padding-top: 0;
}

body.anasayfa-page {
  padding-top: 0;
}

/* ── Header Inner ── */
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: var(--header-height);
  position: static;
}

/* ── Logo (Gymshark stili: solda) ── */
.header-logo {
  position: static;
  transform: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo img.logo-img {
  height: 50px;
  width: auto;
  display: block;
  transition: var(--transition);
}

@media (min-width: 992px) {
  .header-logo img.logo-img {
    height: 56px;
  }
}

/* Eğer metin kullanılacaksa */
.header-logo span.brand-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

/* Logo swap: tepedeyken (koyu hero üstünde) beyaz logo, scroll'da siyah logo */
.site-header.at-top .logo-dark {
  display: none;
}

.site-header.at-top .logo-light {
  display: block;
}

.site-header.scrolled .logo-dark {
  display: block;
}

.site-header.scrolled .logo-light {
  display: none;
}

.site-header.at-top .brand-text {
  color: var(--c-white);
}

.site-header.scrolled .brand-text {
  color: var(--c-black);
}

/* Mega Menu açıkken Header rengini beyaz yap ve logo/yazıları siyah yap */
body.mega-menu-open .site-header {
  background: var(--c-white) !important;
  box-shadow: var(--shadow-sm);
}

body.mega-menu-open .site-header .logo-dark {
  display: block !important;
}

body.mega-menu-open .site-header .logo-light {
  display: none !important;
}

body.mega-menu-open .site-header .nav-item,
body.mega-menu-open .site-header .action-btn,
body.mega-menu-open .site-header .mobile-menu-btn {
  color: var(--c-black) !important;
}

/* ── İç sayfalar: header her zaman katı beyaz, sticky (okunabilirlik) ── */
body:not(.anasayfa-page) .site-header,
body:not(.anasayfa-page) .site-header.at-top,
body:not(.anasayfa-page) .site-header.scrolled {
  position: sticky !important;
  top: 0 !important;
  background: var(--c-white);
  box-shadow: var(--shadow-sm);
}

body:not(.anasayfa-page) .site-header .logo-light {
  display: none;
}

body:not(.anasayfa-page) .site-header .logo-dark {
  display: block;
}

body:not(.anasayfa-page) .site-header .nav-item,
body:not(.anasayfa-page) .site-header .action-btn,
body:not(.anasayfa-page) .site-header .mobile-menu-btn,
body:not(.anasayfa-page) .site-header .header-mobile-left .action-btn,
body:not(.anasayfa-page) .site-header .header-actions .action-btn {
  color: var(--c-black) !important;
}

/* ── Nav (Sol) ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-left: 60px;
}

.nav-item {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding: var(--space-2) 0;
  transition: color var(--transition);
}

.site-header.at-top .nav-item {
  color: var(--c-white);
}

.site-header.scrolled .nav-item {
  color: var(--c-black);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-accent);
  transition: width var(--transition);
}

.nav-item:hover::after {
  width: 100%;
}

/* ── Mega Menü (Soldan Kayan Sheet / Panel — Gymshark stili) ── */
.nav-dropdown {
  position: static;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.mega-menu {
  position: absolute;
  top: calc(100% - 2px);
  /* Header ile 2px üst üste binsin, sub-pixel boşluğu kapansın */
  left: 0;
  width: 660px;
  height: calc(100vh - var(--header-height) - 38px);
  background: var(--c-white);
  padding-top: 2px;
  /* Görsel içeriğin Header üzerine taşmasını engeller */
  box-shadow: 15px 0 40px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.4s;
  z-index: 1000;
}

.site-header.scrolled .mega-menu {
  height: calc(100vh - var(--header-height));
}

.nav-dropdown.is-active .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

body.mega-menu-open .mega-menu {
  transform: translateX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease, visibility 0.15s;
}

.mega-inner {
  display: flex;
  height: 100%;
}

.mega-list {
  flex: 1;
  padding: 45px var(--space-8);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

.mega-list-item {
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-gray-800);
  padding: 18px 0;
  border-bottom: 1px solid var(--c-gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.mega-list-item svg {
  display: block !important;
  /* SVG oklarını göster */
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
  color: var(--c-gray-400);
  transition: transform 0.25s ease, color 0.25s ease;
}

.mega-list-item:hover {
  color: var(--c-black);
  padding-left: 6px;
}

.mega-list-item:hover svg {
  transform: translateX(4px);
  color: var(--c-black);
}

.mega-sublist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 16px 15px;
  border-left: 1.5px solid var(--c-gray-150);
  margin-top: -4px;
  margin-bottom: 12px;
}

.mega-sublink {
  font-size: 13px;
  color: var(--c-gray-500);
  font-weight: 500;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mega-sublink:hover {
  color: var(--c-black);
  padding-left: 4px;
}

.mega-promos {
  width: 310px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Görseli dikeyde ortalar */
  align-items: center;
  /* Görseli yatayda ortalar */
  padding: 40px 25px;
  background: var(--c-gray-50);
  /* Premium kart görünümü için hafif gri arka plan */
  border-left: 1px solid var(--c-gray-100);
  height: 100%;
}

.mega-promo {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  /* Standart e-ticaret dikey boy oranı - kırpılmaları önler */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: block;
}

.mega-promo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease-in-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-promo:hover img {
  transform: scale(1.04);
}

.mega-promo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent 60%);
  z-index: 1;
}

.mega-promo-label {
  position: absolute;
  left: 20px;
  bottom: 20px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.25s ease-in-out, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Mega Menü Backdrop ── */
.menu-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  /* Bütün ekranı kaplasın, header arkasını da karartsın */
  background: rgba(0, 0, 0, 0.35);
  /* Biraz daha koyu, odaklama için */
  backdrop-filter: blur(3px);
  /* Premium blur derinliği */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 990;
  /* Kayan menünün (.mega-menu z-index: 1000) arkasında kalacak */
}

body.mega-menu-open .menu-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Actions (Sağ) ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-left: auto;
}

.action-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.site-header.at-top .action-btn {
  color: var(--c-white);
}

.site-header.scrolled .action-btn {
  color: var(--c-black);
}

.action-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

.action-btn:hover {
  color: var(--c-accent);
}

.action-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: var(--c-accent);
  color: var(--c-black);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.action-badge[data-zero="1"] {
  display: none;
}

/* ── Arama Paneli (Gymshark stili) ── */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--c-white);
  z-index: 1101;
  padding: 28px 24px 0;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  max-height: 90vh;
  overflow-y: auto;
}

.search-panel.open,
.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-panel.open {
  transform: translateY(0);
}

.search-panel-inner {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 20px;
}

/* Search input row */
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 2px solid var(--c-black);
  padding-bottom: 4px;
  margin-bottom: 0;
}

.search-icon-left {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--c-gray-400);
}

.search-panel input {
  flex: 1;
  padding: 14px 0;
  font-size: 1.25rem;
  border: none;
  outline: none;
  font-family: var(--font-primary);
  background: transparent;
  color: var(--c-black);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.search-panel input::placeholder {
  color: var(--c-gray-400);
  font-weight: 400;
}

.search-panel-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--c-gray-500);
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

.search-panel-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.search-panel-close:hover {
  background: var(--c-gray-100);
  color: var(--c-black);
}

/* ── Live Search Results ── */
.search-live-results {
  display: none;
  margin-top: 0;
  padding-top: 16px;
}

.search-live-results.has-results {
  display: block;
  animation: slrFadeIn 0.2s ease;
}

@keyframes slrFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slr-grid {
  display: grid;
  gap: 2px;
}

.slr-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  text-decoration: none;
  color: var(--c-black);
  border-radius: 10px;
  transition: background 0.15s;
}

.slr-item:hover {
  background: var(--c-gray-100);
}

.slr-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--c-gray-100);
}

.slr-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slr-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.slr-name {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--c-black);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.slr-price {
  font-size: 0.85rem;
  color: var(--c-gray-600);
}

.slr-old {
  color: var(--c-gray-400);
  font-size: 0.78rem;
  text-decoration: line-through;
  margin-right: 4px;
}

.slr-price strong {
  color: var(--c-black);
  font-weight: 700;
}

.slr-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--c-gray-400);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.slr-item:hover .slr-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.slr-footer {
  padding: 12px 8px 8px;
  border-top: 1px solid var(--c-gray-200);
  margin-top: 8px;
}

.slr-see-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-black);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: gap 0.2s;
}

.slr-see-all:hover {
  gap: 10px;
}

.slr-see-all svg {
  width: 14px;
  height: 14px;
}

.slr-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 8px;
  color: var(--c-gray-500);
  font-size: 0.9rem;
}

.slr-empty svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--c-gray-400);
}

/* Spinner */
.slr-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 0;
}

.slr-spinner span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-black);
  animation: slrDot 1.2s infinite;
}

.slr-spinner span:nth-child(2) {
  animation-delay: 0.2s;
}

.slr-spinner span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes slrDot {

  0%,
  80%,
  100% {
    transform: scale(0.5);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile search panel */
@media (max-width: 768px) {
  .search-panel {
    padding: 20px 16px 0;
    max-height: 85vh;
  }

  .search-panel input {
    font-size: 1rem;
    padding: 12px 0;
  }

  .slr-img {
    width: 48px;
    height: 48px;
  }

  .slr-name {
    font-size: 0.85rem;
  }
}

.header-mobile-left {
  display: none;
}

/* ── Mobil Header ── */
@media (max-width: 1024px) {

  .header-nav,
  .mega-menu {
    display: none;
  }

  .header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .header-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
  }

  .header-mobile-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    z-index: 5;
  }

  .header-mobile-left .action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }

  .site-header.at-top .header-mobile-left .action-btn {
    color: var(--c-white);
  }

  .site-header.scrolled .header-mobile-left .action-btn {
    color: var(--c-black);
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
    z-index: 5;
  }

  .site-header.at-top .header-actions .action-btn {
    color: var(--c-white);
  }

  .site-header.scrolled .header-actions .action-btn {
    color: var(--c-black);
  }
}

@media (min-width: 1025px) {

  .mobile-menu-btn,
  .header-mobile-left {
    display: none !important;
  }
}

/* ── Mobil Drawer (minimal + görselli) ── */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(370px, 88vw);
  background: var(--c-white);
  z-index: 1201;
  transform: translateX(-100%);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer.open {
  transform: translateX(0);
  box-shadow: 12px 0 40px rgba(0, 0, 0, .18);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-gray-100);
  flex-shrink: 0;
}

.drawer-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.drawer-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--c-gray-100);
  border-radius: 50%;
  color: var(--c-black);
  cursor: pointer;
  transition: background .2s ease;
}

.drawer-close:hover {
  background: var(--c-gray-200);
}

.drawer-close svg {
  width: 18px;
  height: 18px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

/* Kategori görsel kartları */
.drawer-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-card {
  position: relative;
  display: block;
  height: 104px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--c-gray-100);
}

.drawer-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.drawer-card:active img {
  transform: scale(1.04);
}

.drawer-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .2) 60%, rgba(0, 0, 0, .05) 100%);
}

.drawer-card-label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drawer-card-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #fff;
  opacity: .9;
}

/* Hızlı linkler */
.drawer-links {
  display: flex;
  flex-direction: column;
  margin-top: 22px;
  border-top: 1px solid var(--c-gray-100);
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--c-black);
  border-bottom: 1px solid var(--c-gray-100);
  transition: color .2s ease, padding-left .2s ease;
}

.drawer-link::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--c-gray-300);
  border-top: 1.5px solid var(--c-gray-300);
  transform: rotate(45deg);
  transition: border-color .2s ease;
}

.drawer-link:hover,
.drawer-link:active {
  color: var(--c-accent-dark);
  padding-left: 10px;
}

.drawer-link:hover::after {
  border-color: var(--c-accent);
}


@media (max-width: 1024px) {
  .d-none-mobile {
    display: none !important;
  }
}