body {
  margin: 0;
  background-color: #0e0e0e;
  font-family: "Segoe UI", sans-serif;
  color: #eee;
}
body, html {
  width: 100%;
  overflow-x: hidden;
}
* {
  font-family: "Onest", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.header {
  display: flex;
  justify-content: space-between;
  padding: 15px 30px;
  background: #1a1a1a;
  font-size: 18px;
  border-bottom: 1px solid #333;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  padding: 20px;
  background: #121212;
  border-right: 1px solid #333;
  font-size: 14px;
}

.sidebar .section {
  margin-bottom: 30px;
}

.sidebar h3 {
  color: #ddd;
  font-size: 16px;
  margin-bottom: 10px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #aaa;
}

.sidebar input[type="number"] {
  width: 100%;
  margin-bottom: 10px;
  padding: 6px;
  background: #1e1e1e;
  border: 1px solid #333;
  color: #fff;
}

.main {
  flex: 1;
  padding: 30px;
}

.sort-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sort-bar select {
  background: #222;
  color: #fff;
  padding: 6px;
  border: 1px solid #444;
}

.SkeletonsGrid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
  transition: 0.3s ease;
}

.card:hover {
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
  transform: scale(1.02);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card-content {
  padding: 10px;
}

.card-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin: 5px 0;
}

.card-meta {
  font-size: 12px;
  color: #aaa;
}

.card-price {
  font-size: 14px;
  color: #4a78f0;
  margin-top: 5px;
  font-weight: bold;
}

.card-strike {
  text-decoration: line-through;
  color: #888;
  font-size: 12px;
  margin-left: 5px;
}

.badge {
  background: #d35400;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 3px;
}

#pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
  font-family: Arial, sans-serif;
}

/* Pagination button base */
#pagination button {
  background-color: #1f1f1f;
  color: #ddd;
  border: 1px solid #4a78f0;
  border-radius: 6px;
  padding: 6px 12px;
  min-width: 36px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.2s ease;
}

/* Hover and focus */
#pagination button:hover:not(:disabled),
#pagination button:focus-visible:not(:disabled) {
  background-color: #2c2c2c;
  color: #fff;
  box-shadow: 0 0 4px #4a78f0;
}

/* Active page */
#pagination button.active {
  background-color: #4a78f0;
  color: white;
  border-color: #4a78f0;
  box-shadow: 0 0 6px rgba(74, 120, 240, 0.5);
}

/* Disabled button */
#pagination button:disabled {
  background-color: #111;
  color: #555;
  border-color: #333;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Ellipsis style */
#pagination span {
  color: #888;
  font-size: 1rem;
  padding: 0 6px;
  user-select: none;
}

.search-bar {
  width: 100%;
  max-width: 600px;
  padding: 10px 16px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  color: #eee;
  background-color: #222;
  border: 1.5px solid #4a78f0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  box-sizing: border-box;
  user-select: text;
}

.search-bar::placeholder {
  color: #777;
  opacity: 1;
}

.search-bar:focus {
  border-color: #6a9eff;
  background-color: #2a2a2a;
  color: #fff;
  box-shadow: 0 0 8px #4a78f0aa;
}


/* Hover Popup */
.hover-popup {
  position: absolute;
  z-index: 999;
  background: #1c1c1c;
  border: 1px solid #333;
  padding: 12px;
  width: 250px;
  display: none;
  pointer-events: none;
  color: #fff;
  font-size: 13px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}
#hoverPopup {
  position: absolute;
  max-width: 280px;
  background-color: #1c1c1c;
  color: #ddd;
  border: 1px solid #4a78f0;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(74, 120, 240, 0.15);
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

/* When visible */
#hoverPopup.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-8px);
}

#hoverPopup strong {
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  display: block;
  margin-bottom: 6px;
}

#hoverPopup span {
  color: #888;
  font-size: 0.85rem;
}

#hoverPopup img {
  width: 100%;
  margin-top: 10px;
  border-radius: 6px;
  object-fit: cover;
}

/* Active filters container */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: Arial, sans-serif;
}

/* Individual filter tag */
.filter-tag {
  background-color: #2a2a2a;
  color: #ddd;
  border: 1px solid #4a78f0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Text inside tag */
.filter-tag strong {
  color: #4a78f0;
  font-weight: 600;
}

/* "×" close button */
.filter-tag .close-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.filter-tag .close-btn:hover {
  color: #ff4d4d;
}

/* Clear all link */
.active-filters a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #e35c5c;
  font-weight: 600;
  transition: color 0.2s ease;
}

.active-filters a:hover {
  color: #ff7777;
}

/* Checkbox container */
.checkbox-container label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.9);
  transition: all 0.3s ease;
  background-color: #222; /* dark background */
  color: #ddd; /* light text */
  user-select: none;
}

.checkbox-container label:hover {
  background-color: #333;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.7);
}

/* Hide native checkbox but keep accessible */
.checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #4a78f0;
  border-radius: 6px;
  background-color: #111;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  vertical-align: middle; /* add this for good measure */
}


.checkbox-container input[type="checkbox"]:checked {
  background-color: #4a78f0;
  border-color: #4a78f0;
}

/* Toggle button style */
.show-more-toggle {
  display: block;
  text-align: center;
  color: #4a78f0;
  cursor: pointer;
  user-select: none;
  margin-top: 8px;
  font-weight: 600;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

.show-more-toggle:hover {
  color: #3361d8;
}
.sort-bar {
  display: flex;
  align-items: center;
  gap: 20px;
}

.view-toggle {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}


.sort-select {
  font-family: Arial, sans-serif;
  color: #ddd;
  font-size: 0.95rem;
  margin-bottom: 16px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Wrapper to allow absolute positioning */
.sort-select {
  position: relative;
}

.sort-select select {
  background-color: #222;
  color: #eee;
  border: 1.5px solid #4a78f0;
  border-radius: 6px;
  padding: 6px 36px 6px 12px; /* right padding to fit arrow */
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  z-index: 1;
}

/* Custom arrow using ::after on parent */
.sort-select::after {
  content: "▼";
  color: #4a78f0;
  font-size: 0.7rem;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* Hover/focus effect */
.sort-select select:hover,
.sort-select select:focus {
  border-color: #6a9eff;
  background-color: #2a2a2a;
  color: #fff;
  outline: none;
}
/* View toggle buttons */
.view-toggle {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
  gap: 10px;
}

.view-toggle button {
  background: #2a2a2a;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle button:hover {
  background: #3a3a3a;
  color: #fff;
}

.view-toggle button.active {
  background: #4a78f0;
  color: white;
  border-color: #4a78f0;
}

/* LIST VIEW layout */
.grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Make each card a horizontal row */
.grid.list-view .card {
  display: flex;
  gap: 12px;
  height: 140px;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
  background: #1a1a1a;
  transition: 0.3s ease;
}

.grid.list-view .card img {
  width: 300px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Adjust content layout in row mode */
.grid.list-view .card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  flex: 1;
}

.grid.list-view .card-title {
  font-size: 16px;
}

.grid.list-view .card-meta {
  font-size: 13px;
  margin-top: 3px;
}

.grid.list-view .card-price {
  margin-top: 8px;
  font-size: 14px;
}

/* Badge position in row layout */
.grid.list-view .badge {
  top: 10px;
  left: 10px;
  font-size: 11px;
}
.view-toggle button {
  display: flex;
  justify-content: center;
  align-items: center;
}
#lottieContainer {
  width: 80px;
  height: 80px;
  overflow: hidden;
}
#lottieContainer svg {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain; /* or cover, depending on need */
}

/* Product card animation */
/* Base grid styles */
.SkeletonsGrid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  transition: all 0.4s ease;
}

/* Card transition */
.card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.4s ease; /* Smooth size/shape transition */
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: all 0.4s ease;
}

.card-content {
  padding: 10px;
  transition: all 0.4s ease;
}

/* List view overrides */
.grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid.list-view .card {
  flex-direction: row;
  align-items: center;
  height: 100%;
  transition: all 0.4s ease;
}

.grid.list-view .card img {
  object-fit: cover;
  border-radius: 0;
}

.grid.list-view .card-content {
  padding: 12px 16px;
  flex: 1;
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 250px;
    height: 100%;
    z-index: 1000;
    background: #121212;
    border-right: 1px solid #333;
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  .sidebar.open {
    left: 0;
  }

  .filter-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: #4a78f0;
    border: none;
    padding: 10px;
    border-radius: 0 8px 8px 0;
    z-index: 1100;
    cursor: pointer;
    width: 30px;
    height: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
  }

  .filter-toggle-btn:hover {
    background-color: #5a88ff;
  }

  .filter-toggle-btn #lottieFilterArrow {
    width: 30px;
    height: 30px;
    pointer-events: none;
  }

  .layout {
    flex-direction: column;
  }

  .main {
    padding: 30px 16px;
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .SkeletonsGrid,
  .grid {
    grid-template-columns: repeat(2, 1fr); /* Show 2 items per row */
    gap: 16px;
  }

  .sort-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .view-toggle {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .search-bar {
    width: 100%;
  }
}


@media (max-width: 768px) {
  /* Adjust list view on small screens */
  .grid.list-view .card {
    flex-direction: row;
    height: auto;
    padding: 10px;
    align-items: center;
  }

  .grid.list-view .card img {
    width: 120px;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
  }

  .grid.list-view .card-content {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .grid.list-view .card-title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .grid.list-view .card-meta {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
  }

  .grid.list-view .card-price {
    font-size: 13px;
    color: #4a78f0;
    font-weight: bold;
    margin-top: auto;
  }

  .grid.list-view .badge {
    font-size: 10px;
    top: 6px;
    left: 6px;
  }
}
@media (min-width: 1025px) {
  .filter-toggle-btn {
    display: none;
  }
}
@keyframes pulse {
  0% { background-color: #2a2a2a; }
  50% { background-color: #383838; }
  100% { background-color: #2a2a2a; }
}

@media (max-width: 768px) {
  /* Adjustview on small screens */

  .card-content {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .card-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
  }

  .card-meta {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 3px;
  }

  .card-price {
    font-size: 14px;
    color: #4a78f0;
    font-weight: bold;
    margin-top: auto;
  }

  .badge {
    font-size: 9px;
    top: 6px;
    left: 6px;
  }
}

.skeleton-line {
  background: #2a2a2a;
  height: 16px;
  border-radius: 4px;
  animation: pulse 1.5s infinite;
  margin: 8px 0;
  width: 80%;
}
.skeleton-line.short {
  width: 60%;
}
.skeleton-line.shorter {
  width: 40%;
}
.site-header {
  background: #1f1f1f;
  border-bottom: 1px solid #333;
  padding: 0 20px;
}
.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
}
.site-header__logo img {
  height: 32px;
}
.site-header__nav {
  flex: 1;
  display: flex;
  gap: 24px;
  justify-content: center;
}
.site-header__nav a {
  color: #eaeaea;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .5px;
  font-size: medium;
}
.site-header__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.icon-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #eaeaea;
  cursor: pointer;
}
.icon-btn:hover {
  color: #fff;
}
.site-header__user {
  display: flex;
  gap: 8px;
  align-items: center;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.btn {
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn--outline {
  background: transparent;
  border: 1px solid #4675bd;
  color: #4675bd;
}
.btn--outline:hover {
  background: #4675bd;
  color: #fff;
}
#headerUserName{
  font-size: medium;
}

/* MOBILE: logo+user on row-1, nav on row-2 */
@media (max-width: 600px) {
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px 8px;
    height: auto;
  }

  /* Row 1: logo (left) & actions (right) */
  .site-header__logo {
    order: 1;
    flex: 1 1 auto;
  }
  .site-header__actions {
    order: 1;
    flex: 0 1 auto;
    justify-content: flex-end;
    gap: 6px;
  }

  /* Row 2: nav full width, centered */
  .site-header__nav {
    order: 2;
    flex: 1 1 100%;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
    border-top: 1px solid #333;
    padding-top: 4px;
  }

  /* shrink logo */
  .site-header__logo img {
    height: 24px;
  }

  /* shrink nav text */
  .site-header__nav a {
    font-size: 12px;
    padding: 0 6px;
  }

  /* shrink icons & avatar */
  .icon-btn {
    font-size: 16px;
  }
  .user-avatar {
    width: 20px;
    height: 20px;
  }

  /* shrink buttons */
  .btn, .btn--outline, .btn--ghost {
    font-size: 11px;
    padding: 4px 8px;
  }
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #1e1e1e;
  border: 1px solid #4a78f0;
  border-top: none;
  z-index: 999;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  max-height: 250px;
  overflow-y: auto;
  display: none; /* default hidden */
}

.search-suggestions.show {
  display: block;
}

/* Individual suggestion item */
.search-suggestions div {
  padding: 10px 14px;
  cursor: pointer;
  color: #ddd;
  font-size: 0.95rem;
  border-bottom: 1px solid #2a2a2a;
  transition: background-color 0.2s ease;
}

.search-suggestions div:last-child {
  border-bottom: none;
}

/* Hover effect */
.search-suggestions div:hover {
  background-color: #2a2a2a;
  color: #fff;
}

.card-content strong {
  color: #f4c900;
  font-weight: bold;
}
.campaign-btn {
  margin-top: 20px;
  padding: 8px 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  background: linear-gradient(270deg, #ff6ec4, #7873f5, #ff6ec4);
  background-size: 600% 600%;
  animation: gradientMove 4s ease infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.campaign-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 110, 196, 0.7);
}

.campaign-btn.active {
  border: 2px solid white;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* Search Box */
#searchSuggestionBox {
  background: #1e1e1e; /* Dark background to match header/sidebar */
  border: 1px solid #444; /* Darker border */
  border-top: none; /* Merges with search bar */
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); /* Stronger shadow for dark mode */
  overflow: hidden;
  z-index: 1000;
  width: 100%; /* Ensures it matches input width */
}

.suggest-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 15px;
  color: #ddd; /* Light grey text */
  transition: background-color 0.2s ease, color 0.2s ease;
  border-bottom: 1px solid #2a2a2a; /* Subtle divider */
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item:hover,
.suggest-item.selected {
  background-color: #2a2a2a; /* Slightly lighter hover state */
  color: #fff; /* White text on hover */
}

/* Material Icons styling */
.suggest-icon {
  margin-right: 12px;
  font-size: 20px;
  color: #888; /* Muted icon color */
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

/* Icon turns blue on hover/select */
.suggest-item:hover .suggest-icon,
.suggest-item.selected .suggest-icon {
  color: #4a78f0; 
}

/* Bold matching text */
.suggest-text b {
  font-weight: 700;
  color: #4a78f0; /* Highlight matches in blue */
}

.suggest-right {
  margin-left: auto;
  font-size: 11px;
  color: #666; /* Subtle label text */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #111;
  padding: 2px 6px;
  border-radius: 4px;
}