* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  /* Prevent horizontal scroll */
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  height: 80px;
  background-color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 1030;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f5f5f6 !important;
  display: flex;
  align-items: center;
  padding: 0 40px !important;
}

/* Logo */
.logo-wrapper {
  text-decoration: none !important;
  margin-right: 2rem;
  display: flex;
  align-items: center;
}

.main-logo {
  height: 70px;
  width: auto;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: #FFA500;
  /* Gold */
  font-size: 1.5rem;
}

/* Nav Categories */
.nav-categories {
  display: flex;
  height: 100%;
}

.nav-categories .nav-link {
  font-size: 14px;
  font-weight: 700;
  color: #282c3f;
  padding: 30px 15px !important;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-bottom: 4px solid transparent;
  transition: all 0.2s ease;
}

.nav-categories .nav-link:hover {
  border-bottom: 4px solid #FFA500;
  color: #FFA500 !important;
}

.search-container {
  max-width: 600px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.search-wrapper {
  background: #f5f5f6 !important;
  border-radius: 10px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid #f5f5f6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-wrapper:focus-within {
  background: #fff !important;
  border-color: #eaeaec;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-wrapper i {
  color: #696e79;
  font-size: 14px;
  margin-right: 10px;
}

.search-input {
  background: transparent !important;
  border: none !important;
  width: 100%;
  font-size: 14px;
  color: #282c3f;
  outline: none;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 25px; /* Increased for better spacing after label removal */
  margin-left: auto;
}

@media (max-width: 992px) {
  .header-actions {
    gap: 18px;
  }

  .search-container {
    display: none !important;
    /* Hide full search on mobile */
  }

  .logo-wrapper {
    margin-right: 1rem;
  }
}

.action-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important;
  color: #282c3f !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.action-link i {
  font-size: 20px;
  margin-bottom: 2px;
}

.action-link span {
  font-size: 12px;
  font-weight: 700;
}

.action-link:hover {
  color: #FFA500 !important;
}

.header-profile-img-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2px;
}

.notification-dropdown-custom {
  width: 380px !important;
  max-height: 500px;
  overflow-y: auto;
  border-radius: 12px !important;
  margin-top: 15px !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
}

.notification-header {
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #f1f5f9;
}

.notification-item {
  padding: 16px 20px !important;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  text-decoration: none !important;
  display: block;
}

.notification-item:hover {
  background-color: #f8fafc !important;
}

.notification-item.unread {
  background-color: #fffaf0 !important;
  /* Very subtle warm tint */
}

.notification-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.icon-bg-success {
  background: #f0fdf4;
  color: #22c55e;
}

.icon-bg-warning {
  background: #fffbeb;
  color: #f59e0b;
}

.icon-bg-danger {
  background: #fef2f2;
  color: #ef4444;
}

.icon-bg-info {
  background: #f0f9ff;
  color: #0ea5e9;
}

.notification-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}

.notification-msg {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 4px;
}

.notification-time {
  font-size: 0.75rem;
  color: #94a3b8;
}

.unread-dot {
  width: 8px;
  height: 8px;
  background-color: #FFA500;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Badge */
.action-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #FFA500;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sell Button & View Bag Button */
.btn-sell-premium,
.btn-view-bag-premium {
  background: linear-gradient(135deg, #FFA500 0%, #FF7F50 100%);
  color: #fff !important;
  font-weight: 700;
  padding: 8px 24px;
  border-radius: 50px;
  text-decoration: none !important;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 165, 0, 0.3);
  border: none;
  display: inline-block;
  text-align: center;
}

.btn-sell-premium:hover,
.btn-view-bag-premium:hover {
  background: linear-gradient(135deg, #FFB833 0%, #FF7F50 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 165, 0, 0.4);
}

/* Profile Dropdown Custom */
.profile-dropdown-custom {
  width: 280px !important;
  border-radius: 12px !important;
  margin-top: 15px !important;
  padding: 0 !important;
  overflow: hidden;
  border: none !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
}

.profile-dropdown-header {
  padding: 20px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.profile-dropdown-header h6 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  margin-bottom: 4px;
}

.profile-dropdown-header .user-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.profile-dropdown-custom .dropdown-item {
  font-size: 0.95rem;
  padding: 12px 20px !important;
  font-weight: 500;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.profile-dropdown-custom .dropdown-item i {
  font-size: 1.1rem;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.profile-dropdown-custom .dropdown-item:hover {
  background: #f8fafc !important;
  color: #FFA500 !important;
}

.profile-dropdown-custom .dropdown-item:hover i {
  color: #FFA500 !important;
}

.profile-dropdown-custom .dropdown-divider {
  margin: 0;
  border-color: #f1f5f9;
}

.dropdown-item.logout-btn {
  color: #ef4444 !important;
  font-weight: 600;
}

.dropdown-item.logout-btn:hover {
  background-color: #fef2f2 !important;
}

.dropdown-item.logout-btn i {
  color: #ef4444 !important;
}

/* Header adjustment for fixed position (Desktop Only) */
@media (min-width: 992px) {
  main {
    padding-top: 80px;
    /* Header height */
  }
}

@media (max-width: 992px) {
  main {
    padding-top: 0;
    /* Let it scroll away on mobile */
    padding-bottom: 50px !important;
    /* Room for bottom nav + extra breathing room */
  }

  .top-nav {
    position: relative !important;
    height: 55px;
    /* Fixed height for consistency */
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    /* Side by side */
    background: white;
    gap: 10px;
  }

  .header-actions-mobile {
    display: flex;
    align-items: center;
    margin-right: -5px;
  }

  .header-actions-mobile .action-link i {
    font-size: 1.2rem;
    /* Matching bottom nav */
    color: #64748b;
    /* Matching bottom nav */
  }

  .action-badge-mobile {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FFA500; /* Back to Yellow */
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .icon-small-adjust {
    font-size: 1.0rem !important;
  }

  .logo-wrapper {
    margin: 0 !important;
    flex-shrink: 0;
  }

  .search-container {
    display: flex !important;
    flex-grow: 1;
    margin: 0 !important;
    order: unset;
    /* Back to normal order */
  }

  .search-wrapper {
    padding: 6px 10px !important;
    /* More compact search */
  }

  .main-logo {
    height: 40px !important;
  }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0px;
  left: 0;
  right: 0;
  height: 45px;
  background: white;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  z-index: 2000;
  border-top: 1px solid #f1f5f9;
  width: 98%;
  margin: auto;
  border-radius: 10px 10px 0 0;
}

.bottom-nav-wrapper {
  height: 100%;
  padding: 0 5px;
  /* Reduced from 10px */
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none !important;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item i {
  font-size: 1.2rem;
}

.nav-item.active {
  color: #FFA500;
}

.icon-wrapper {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: #FFA500; /* Back to Yellow */
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.sell-center {
  margin-top: -30px;
}

.sell-icon-inner {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #FFA500 0%, #FF7F50 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
  border: 3px solid #fff;
}

.sell-icon-inner i {
  font-size: 1.1rem;
}

.nav-profile-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #f1f5f9;
}

/* Mini Cart Dropdown */
.cart-dropdown-wrapper {
  position: relative;
}

.cart-dropdown-wrapper:hover .mini-cart-dropdown {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mini-cart-dropdown {
  width: 380px;
  border-radius: 12px !important;
  margin-top: 0 !important;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
  left: auto !important;
  right: 0 !important;
  top: 100%;
  z-index: 1000;
}

.mini-cart-header {
  background: white;
}

.mini-cart-item {
  transition: background 0.2s ease;
}

.mini-cart-item:hover {
  background-color: #f8fafc;
}

.mini-cart-img-wrapper {
  flex-shrink: 0;
}

.mini-cart-img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mini-cart-details h6 {
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 2px;
}

.mini-cart-details p {
  line-height: 1.2;
  margin-bottom: 2px;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* AJAX Search Results */
.search-container {
  position: relative !important;
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  overflow: hidden;
  display: none;
  animation: searchSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes searchSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results-list {
  max-height: 450px;
  overflow-y: auto;
}

.search-result-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
}

.search-result-item:hover {
  background-color: #f8fafc;
  padding-left: 25px;
}

.search-result-img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-result-info {
  flex-grow: 1;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.search-result-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
}

.search-result-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFA500;
  margin-left: auto;
  white-space: nowrap;
}

.search-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  text-align: center;
  background: #f8fafc;
  color: #FFA500;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none !important;
  border-top: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-all-btn:hover {
  background: #FFA500;
  color: #ffffff !important;
}

.no-results {
  padding: 30px 20px;
  text-align: center;
  color: #64748b;
}

.no-results i {
  font-size: 2rem;
  color: #cbd5e1;
  display: block;
  margin-bottom: 10px;
}

.search-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px 8px;
  background: #fcfcfd;
  border-bottom: 1px solid #f1f5f9;
}

.search-categories-wrapper {
  padding: 8px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.search-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #fff8f0;
  color: #FFA500;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.2s ease;
  border: 1px solid #ffedcc;
}

.search-category-tag:hover {
  background: #FFA500;
  color: #ffffff;
  border-color: #FFA500;
  transform: translateY(-1px);
}

.search-category-tag i {
  font-size: 0.85rem;
}

/* Mobile Search Results Adjustments */
@media (max-width: 992px) {
  .search-results-dropdown {
    position: fixed !important;
    top: 55px !important;
    left: 12px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-height: 80vh;
    border-radius: 16px;
    margin-top: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  }

  .search-result-item {
    padding: 10px 15px;
    gap: 12px;
  }

  .search-result-title {
    max-width: 180px;
    font-size: 0.85rem;
  }

  .search-result-img {
    width: 40px;
    height: 54px;
  }

  .search-all-btn {
    padding: 12px;
    font-size: 0.8rem;
  }

  .notification-dropdown-custom {
    position: fixed !important;
    top: 55px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 0 0 20px 20px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2) !important;
    z-index: 2050 !important;
  }

  .notification-header {
    padding: 12px 15px;
  }

  .notification-item {
    padding: 12px 15px !important;
  }
}