/* electronics.css - TAM VƏ YENİLƏNMİŞ (Clean Header) VERSİYA */

/* =========================================
   1. HEADER DİZAYNI (DESKTOP)
   ========================================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 0 5%;
  background: #0f172a;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Sol Hamburger (Desktopda yoxdur) */
#openSidebar {
  display: none;
}

/* Logo */
.logo h1 {
  color: white;
  font-size: 1.6rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo i {
  color: #f59e0b;
}

/* Menyu */
.nav-menu {
  display: flex;
  gap: 25px;
}
.nav-link {
  color: #94a3b8;
  font-weight: 500;
  transition: 0.3s;
}
.nav-link:hover,
.nav-link.active {
  color: white;
}

/* Sağ Tərəf (Actions - Desktop) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Axtarış Düyməsi (Desktopda GİZLİ) */
.header-search-btn {
  display: none;
  /* Desktop stilləri qalsın, mobildə ləğv edəcəyik */
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Favorit Düyməsi (Desktop) */
.header-fav-btn {
  display: flex;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  transition: 0.3s;
}
.header-fav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Balans */
.balance-display {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 5px 5px 15px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  gap: 10px;
}
.balance-amount {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.add-balance-btn {
  background: #f59e0b;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login Button */
.header-btn-login {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =========================================
       2. AXTARIŞ PANELİ
       ========================================= */
.search-wrapper {
  background: #ffffff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  border: 1px solid #e2e8f0;
  position: relative;
}
.close-search-btn {
  display: none;
}

.search-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}
.main-search-box {
  position: relative;
  width: 100%;
}
.main-search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  z-index: 2;
}
.main-search-box input {
  padding-left: 45px !important;
}

input,
select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background-color: #f8fafc;
  outline: none;
  box-sizing: border-box;
  height: 48px;
}
button[type="submit"] {
  background-color: #1e293b;
  color: white;
  border: none;
  padding: 0 30px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  height: 48px;
  width: 100%;
}

.search-filters.tech-filters {
  display: flex;
  flex-wrap: wrap; /* Sətirə sığmayanda aşağı düşsün */
  gap: 15px; /* Elementlər arası məsafə */
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #f1f5f9;
}

/* Inputlar və Selectlər üçün ümumi stil */
.search-filters select,
.search-filters input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background-color: #f8fafc;
  outline: none;
  box-sizing: border-box;
  height: 48px;
}

/* Qiymət qrupu (Yan-yana dursunlar) */
.price-range-group {
  display: flex;
  gap: 10px;
  flex: 1.5; /* Qiymət yeri biraz geniş olsun */
  min-width: 200px;
}

/* Axtar düyməsi */
.search-submit-btn {
  background-color: #1e293b;
  color: white;
  border: none;
  padding: 0 30px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  height: 48px;
  min-width: 120px;
  flex: 0 0 auto; /* Düymənin ölçüsü sabit qalsın */
  transition: 0.3s;
}
.search-submit-btn:hover {
  background-color: #0f172a;
}

/* Gizlətmək üçün klass */
.hidden {
  display: none !important;
}

/* =========================================
   6. DAHA ÇOX GÖSTƏR DÜYMƏSİ (LOAD MORE)
   ========================================= */

/* Düyməni mərkəzləşdirən konteyner */
.load-more-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0 50px 0;
  width: 100%;
}

/* Düymənin əsas stili */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 35px;
  background: transparent;
  border: 2px solid #1e293b;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px; /* Oval forma */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Standart düymənin hover effekti */
.btn-outline:hover {
  background: #1e293b;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(30, 41, 59, 0.2);
}

/* Düymə basılanda (Active) */
.btn-outline:active {
  transform: translateY(-1px);
}

/* --- VIP BÖLMƏSİ ÜÇÜN XÜSUSİ RƏNG --- */
.vip-load-btn {
  border-color: #f59e0b !important;
  color: #d97706 !important;
}

.vip-load-btn:hover {
  background: linear-gradient(45deg, #f59e0b, #d97706) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3) !important;
}

/* Mobil üçün kiçik düzəliş */
@media (max-width: 768px) {
  .btn-outline {
    width: 100%; /* Mobildə tam ekran olsun */
    padding: 14px 0;
  }
}

/* Mobil üçün uyğunlaşdırma */
@media (max-width: 768px) {
  .search-filters.tech-filters {
    flex-direction: column; /* Mobildə alt-alta olsun */
    align-items: stretch;
  }
  .price-range-group {
    width: 100%;
  }
  .search-submit-btn {
    width: 100%;
  }
}

/* =========================================
       3. KARTLAR & KATEQORİYALAR
       ========================================= */
.quick-categories {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.cat-chip {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 10px 20px;
  border-radius: 50px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-chip:hover {
  border-color: #f59e0b;
  color: #1e293b;
}
.cat-chip i {
  color: #f59e0b;
}

.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}
.card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: 0.3s;
}
.card:hover {
  transform: translateY(-5px);
}
.card-vip-style {
  border: 2px solid #f59e0b;
}
.image-wrapper {
  height: 200px;
  position: relative;
  background: #e2e8f0;
}
.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge.vip-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(45deg, #f59e0b, #d97706);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.75rem;
  z-index: 5;
}
.condition-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
  color: white;
  z-index: 5;
}
.cond-new {
  background: #10b981;
}
.cond-used {
  background: #64748b;
}

.card-fav-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  color: #94a3b8;
}
.card-fav-btn.active {
  color: #ef4444;
}

.card-content {
  padding: 15px;
}
.card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px 0;
  color: #1e293b;
  height: 2.6em;
  overflow: hidden;
}
.tech-specs-row {
  display: flex;
  gap: 6px;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tech-tag {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}
.price {
  color: #10b981;
  font-weight: 800;
  font-size: 1.1rem;
}

/* =========================================
       4. RESPONSIVE (MOBIL) - DÜZƏLİŞLƏR
       ========================================= */
@media (max-width: 768px) {
  .id-text {
    font-size: 0.65rem;
  }
  /* Header Layout */
  header {
    height: 60px;
    padding: 0 15px;
    justify-content: space-between;
  }

  /* 1. Hamburger (Solda) */
  #openSidebar {
    display: flex !important;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    padding: 0;
    color: white;
    order: 1; /* Ən solda */
  }

  /* 2. Logo (Ortada - Absolute) */
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    order: 2;
    z-index: 1;
  }
  .logo h1 {
    font-size: 0 !important;
  }
  .logo h1 i {
    font-size: 1.6rem !important;
    display: block;
    color: #f59e0b;
  }

  /* 3. Sağ Tərəf (İkonlar Qrupu) */
  .header-actions {
    order: 3;
    display: flex;
    align-items: center;
    gap: 1px; /* İkonlar arası məsafə */
  }

  /* Gizlədiləcəklər */
  .mobile-hide,
  #userNameDisplay,
  .nav-menu {
    display: none !important;
  }

  /* --- İKONLARIN ÜMUMİ STİLİ (Evlər səhifəsindəki kimi sadə) --- */
  .header-search-btn,
  .header-fav-btn {
    display: flex !important;
    background: transparent !important; /* Fonu ləğv etdik */
    border: none !important; /* Çərçivəni ləğv etdik */
    box-shadow: none !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    align-items: center;
    justify-content: center !important;
    font-size: 1.3rem !important; /* İkon ölçüsü */
    color: white !important;
  }

  /* Xüsusi Düzülüş (Order) */
  .header-search-btn {
    order: 1; /* 1. Axtarış */
  }
  .header-fav-btn {
    order: 2; /* 2. Sevimli (Ürək) */
  }
  .header-fav-btn span {
    display: none; /* Sayğacı gizlədirik (əgər varsa) */
  }
  #userProfileMenu {
    display: block !important;
    order: 3; /* 3. Profil */
  }

  /* Giriş düyməsi (Login olmayıbsa) */
  .header-btn-login {
    display: none !important;
  }

  /* --- MOBİL AXTARIŞ PANELI (OVERLAY) --- */
  .search-wrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    background: white;
    padding: 60px 20px 20px 20px;
    overflow-y: auto;
    margin: 0;
    border-radius: 0;
  }
  /* JS tərəfindən 'active' klassı əlavə olunanda açılacaq */
  .search-wrapper.active {
    display: block !important;
  }

  /* X Düyməsi */
  .close-search-btn {
    display: block !important;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #64748b;
    z-index: 2100;
  }

  /* Form Elementləri */
  .search-top {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .search-filters.tech-filters {
    grid-template-columns: 1fr 1fr;
    border-top: none;
  }
  button[type="submit"] {
    grid-column: 1 / -1;
    margin-top: 10px;
  }

  /* Kart Dizaynı */
  .listings {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .image-wrapper {
    height: 140px;
  }
  .tech-specs-row {
    display: none;
  }
  .card h3 {
    font-size: 0.9rem;
  }
  .status-badge.vip-badge,
  .condition-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    top: 5px;
    left: 5px;
  }
  .status-badge.vip-badge {
    right: 5px;
    left: auto;
  }
}

/* =========================================
   5. STORIES (TƏCİLİ) BÖLMƏSİ - DÜZƏLİŞ
   ========================================= */

/* Konteynerin özü */
.stories-container {
  padding: 20px 0;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 30px;
}

/* --- STORIES (TƏCİLİ) HİSSƏSİ --- */
.stories-container {
  background: white;
  padding: 15px 0;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
}

.stories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.stories-header h4 {
  margin: 0;
  color: #ef4444; /* Qırmızı rəng */
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stories-link {
  font-size: 0.9rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
}

.stories-wrapper {
  display: flex;
  gap: 15px;
  overflow-x: auto; /* Yana sürüşdürmə */
  padding-bottom: 10px;
  scrollbar-width: none; /* Firefox-da skrollu gizlət */
}

/* Chrome/Safari-də skrollu gizlət */
.stories-wrapper::-webkit-scrollbar {
  display: none;
}

/* Tək element (Story) */
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 72px; /* Sıxılmasın deyə minimum ölçü */
}

/* Şəklin çərçivəsi */
.story-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

/* Aktiv (Təcili) halda qırmızı çərçivə */
.story-ring.active {
  border-color: #ef4444;
}

.story-item:hover .story-ring {
  transform: scale(1.05);
}

/* Şəklin özü */
.story-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover; /* Şəkli dairəyə sığdırır */
  background-color: #f1f5f9;
}

/* Qiymət yazısı */
.story-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* SKELETON (Yüklənəndə görünən boz dairələr) */
.story-skeleton {
  min-width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
