/* ============================================================
   PB Store — Ortak Header (pb-header)
   Anasayfadaki (index.html) header tasarımının birebir kopyasıdır.
   Kaynak: home.css "body.home-page .pb-header*" kuralları; tek fark
   scope (body.home-page) yerine .pb-header kullanılır ki home-page
   class'ı / home.css olmayan sayfalarda da aynı görünüm elde edilsin.
   Yalnızca .pb-header içindeki öğeleri hedefler.
   Renk/font/boyut anasayfadakiyle aynıdır.
   ============================================================ */

/* ── Header / Navbar (bordo) ── */
.pb-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
}

.pb-header .navbar {
  background: var(--bordo-900) !important;
  border-bottom: none !important;
  position: relative;
  top: auto;
  z-index: auto;
  backdrop-filter: none !important;
}

.pb-header .navbar.scrolled {
  background: var(--bordo-900) !important;
  box-shadow: var(--shadow-nav) !important;
}

.pb-header .pb-nav-main {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: var(--space-4) var(--section-padding-x);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-width: 0;
}

.pb-header .pb-nav-main .mobile-menu-btn {
  flex-shrink: 0;
}

.pb-header .pb-nav-main .mobile-menu-btn .bar {
  background: var(--krem-100);
}

.pb-header .pb-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.pb-header .pb-logo img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-gold);
  object-fit: cover;
}

.pb-header .pb-logo-text {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--krem-100);
  line-height: 1;
  min-width: 0;
  overflow: hidden;
}

.pb-header .pb-logo-text span {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.35em;
  color: var(--altin-400);
  font-weight: 500;
  margin-top: 4px;
}

.pb-header .pb-nav-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-full);
  padding: 0 var(--space-4);
  gap: var(--space-2);
  transition: border-color var(--tr-snappy), background var(--tr-snappy);
}

.pb-header .pb-nav-search:focus-within {
  border-color: var(--altin-500);
  background: rgba(255, 255, 255, 0.12);
}

.pb-header .pb-nav-search i {
  color: var(--altin-400);
  font-size: 14px;
}

.pb-header button.pb-nav-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  padding: 11px 0;
}

.pb-header .pb-nav-search-text {
  flex: 1;
  color: rgba(250, 247, 242, 0.45);
  font-size: 14px;
}

.pb-header .pb-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  flex-shrink: 0;
}

.pb-header .pb-nav-actions .nav-action {
  color: var(--krem-100) !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  text-decoration: none;
  border-bottom: none;
  transition: background var(--tr-snappy), color var(--tr-snappy);
}

.pb-header .pb-nav-actions .nav-action:hover,
.pb-header .pb-nav-actions .nav-action:focus,
.pb-header .pb-nav-actions .nav-action:active {
  text-decoration: none;
}

.pb-header .pb-nav-actions .nav-action:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--altin-300) !important;
}

.pb-header .pb-nav-actions .nav-action .badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  background: var(--altin-500) !important;
  color: var(--bordo-900) !important;
  border: none !important;
  box-shadow: 0 0 0 2px var(--bordo-900);
  pointer-events: none;
  z-index: 2;
}

.pb-header .pb-nav-account {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold-subtle);
  color: var(--krem-100);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: all var(--tr-snappy);
}

.pb-header .pb-nav-account:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--altin-500);
  color: var(--altin-300);
}

.pb-header .pb-nav-account span {
  display: inline;
}

/* Alt kategori menüsü */
.pb-header .pb-subnav {
  background: var(--bordo-800);
  border-bottom: 1px solid var(--border-gold-subtle);
}

.pb-header .pb-subnav-inner {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.pb-header .pb-subnav a {
  color: rgba(250, 247, 242, 0.82);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  transition: color var(--tr-snappy), background var(--tr-snappy);
}

.pb-header .pb-subnav a:hover,
.pb-header .pb-subnav a.active {
  color: var(--altin-400);
  background: rgba(212, 175, 55, 0.1);
}

/* ── Responsive (home.css ile birebir) ── */
@media (max-width: 1024px) {
  .pb-header .pb-nav-search {
    flex: 0 0 auto;
    width: 42px;
    max-width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-full);
  }

  .pb-header .pb-nav-search-text {
    display: none;
  }
}

@media (max-width: 768px) {
  .pb-header .pb-subnav-inner {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pb-header .pb-subnav-inner::-webkit-scrollbar {
    display: none;
  }

  .pb-header .pb-nav-main {
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
  }

  .pb-header .pb-nav-account span {
    display: none;
  }

  .pb-header .pb-nav-account {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .pb-header .pb-logo-text {
    font-size: 17px;
    letter-spacing: 0.12em;
  }

  .pb-header .pb-logo-text span {
    display: none;
  }

  .pb-header .pb-logo img {
    width: 36px;
    height: 36px;
  }

  .pb-header .pb-nav-actions {
    gap: var(--space-1);
  }

  .pb-header .pb-nav-actions .nav-action {
    width: 38px;
    height: 38px;
  }

  .pb-header .pb-nav-account {
    width: 38px;
    height: 38px;
  }

  .pb-header .pb-nav-search {
    width: 38px;
    max-width: 38px;
    height: 38px;
  }
}

/* ============ SEARCH OVERLAY (index ile birebir) ============ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12vh;
}
.search-overlay.show {
  opacity: 1;
  visibility: visible;
}
.search-overlay-content {
  width: 100%;
  max-width: 720px;
  padding: 0 24px;
  transform: translateY(-20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-overlay.show .search-overlay-content {
  transform: translateY(0);
}
.search-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--krem);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.search-close:hover {
  background: var(--altin-500);
  color: var(--bordo-900);
  border-color: var(--altin-500);
  transform: rotate(90deg);
}
.search-input-wrap {
  position: relative;
  background: var(--krem);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.search-input-wrap i.search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--altin-600);
  font-size: 18px;
}
.search-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 22px 22px 22px 64px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--bordo-800);
  outline: none;
  border-radius: 12px;
}
.search-input::placeholder {
  color: var(--gri-text);
  font-style: italic;
}
.search-suggestions {
  background: var(--krem);
  border-radius: 12px;
  margin-top: 12px;
  padding: 20px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-height: 60vh;
  overflow-y: auto;
}
.search-suggest-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gri-text);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-suggest-label i { color: var(--altin-600); font-size: 10px; }
.search-suggest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.search-suggest-list:last-child { margin-bottom: 0; }
.search-tag {
  background: var(--beyaz);
  border: 1px solid var(--gri-border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--bordo-800);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.search-tag:hover {
  border-color: var(--altin-500);
  background: var(--krem-koyu);
}
.search-tag i { color: var(--altin-600); font-size: 11px; }
.search-product-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.search-product-item:hover { background: var(--krem-koyu); }
.search-product-img {
  width: 50px;
  height: 50px;
  background: var(--gri-suzme);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bordo-700);
  opacity: 0.7;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.search-product-img.has-photo { opacity: 1; background: #f5f5f5; }
.search-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.search-product-info {
  flex: 1;
  min-width: 0;
}
.search-product-name {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--bordo-800);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2px;
}
.search-product-cat {
  font-size: 11px;
  color: var(--gri-text);
  letter-spacing: 0.5px;
}
.search-product-price {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--bordo-800);
  font-weight: 600;
}
.search-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--gri-text);
  font-size: 13px;
}
.search-empty i {
  font-size: 32px;
  color: var(--altin-500);
  opacity: 0.5;
  margin-bottom: 10px;
  display: block;
}
.search-hint {
  color: var(--krem);
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  opacity: 0.7;
  letter-spacing: 1px;
}
.search-hint kbd {
  background: rgba(250, 247, 242, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  color: var(--altin-300);
  margin: 0 4px;
}
