:root {
  --primary: #5b5cf0;
  --secondary: #16c79a;
  --dark: #101828;
  --muted: #667085;
  --card-border: rgba(15, 23, 42, 0.08);
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dark);
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(91, 92, 240, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 92, 240, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

a {
  text-decoration: none;
}

.top-strip {
  background: linear-gradient(90deg, #0f172a, #1e293b);
  color: #fff;
  font-size: 0.92rem;
}

.main-navbar {
  top: 0;
  z-index: 1040;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--primary) !important;
  font-size: 1.55rem;
}

.search-box {
  width: 100%;
  max-width: 520px;
  position: relative;
}

.search-box input {
  border-radius: 50px;
  padding: 0.9rem 1rem 0.9rem 2.9rem;
  border: 1px solid #d0d5dd;
  box-shadow: none;
}

.search-box .search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 1rem;
}

.icon-pill {
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  color: var(--dark);
}

.category-sticky-bar {
  position: sticky;
  top: 83px;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.category-scroll {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.85rem 0;
  scrollbar-width: thin;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #344054;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.category-chip:hover,
.category-chip.active {
  background: rgba(91, 92, 240, 0.1);
  color: var(--primary);
  border-color: rgba(91, 92, 240, 0.15);
}

.custom-breadcrumb .breadcrumb-item a {
  color: var(--muted);
}

.custom-breadcrumb .breadcrumb-item.active {
  color: var(--dark);
  font-weight: 600;
}

.listing-hero,
.filter-card,
.toolbar-card,
.product-card,
.listing-banner,
.cart-summary {
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.listing-hero {
  padding: 2rem;
  background:
    radial-gradient(circle at top right, rgba(22, 199, 154, 0.2), transparent 30%),
    radial-gradient(circle at bottom left, rgba(91, 92, 240, 0.24), transparent 34%),
    linear-gradient(135deg, #0f172a, #1d4ed8 60%, #5b5cf0);
  color: #fff;
}

.listing-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.1;
}

.listing-text {
  color: rgba(255, 255, 255, 0.86);
  max-width: 760px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.metric-box {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.metric-box h5 {
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-b2b {
  background: #e8f0ff;
  color: #2449d8;
}

.tag-b2c {
  background: #eafbf6;
  color: #0f8c67;
}

.tag-banner-dark {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.filter-sidebar {
  position: sticky;
  top: 145px;
}

.filter-card {
  padding: 1.25rem;
}

.filter-card-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 1rem;
}

.filter-group {
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.filter-group:last-child {
  border-bottom: 0;
}

.filter-title {
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.sidebar-promo {
  border-radius: 1.25rem;
  padding: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #ec4899, #f97316);
  box-shadow: 0 18px 45px rgba(236, 72, 153, 0.18);
}

.toolbar-card {
  padding: 1rem 1.2rem;
}

.sort-select {
  min-width: 210px;
  border-radius: 999px;
}

.view-toggle {
  display: inline-flex;
  gap: 0.5rem;
}

.view-btn {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 1.1rem;
}

.view-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.active-chip {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 600;
}

.product-card {
  overflow: hidden;
  transition: all 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.08);
}

.product-image {
  height: 200px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.product-gradient-1 {
  background: linear-gradient(135deg, #5b5cf0, #7c3aed);
}

.product-gradient-2 {
  background: linear-gradient(135deg, #16c79a, #0ea5e9);
}

.product-gradient-3 {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.product-gradient-4 {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.product-card .card-body {
  padding: 1.2rem;
}

.wishlist-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 1.1rem;
  cursor: pointer;
}

.rating {
  color: #f59e0b;
  font-size: 0.92rem;
}

.price {
  font-weight: 800;
  font-size: 1.1rem;
}

.old-price {
  color: #98a2b3;
  text-decoration: line-through;
  margin-left: 0.5rem;
  font-size: 0.95rem;
}

.small-muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.listing-banner {
  padding: 2rem;
  color: #fff;
  background: linear-gradient(135deg, #111827, #4f46e5, #06b6d4);
  box-shadow: 0 14px 40px rgba(79, 70, 229, 0.18);
}

.custom-pagination .page-link {
  border: none;
  margin: 0 0.25rem;
  border-radius: 999px !important;
  color: var(--dark);
  padding: 0.75rem 1rem;
}

.custom-pagination .page-item.active .page-link {
  background: var(--primary);
  color: #fff;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #4a4ad8;
  border-color: #4a4ad8;
}

.btn-outline-dark:hover {
  background: var(--dark);
}

.offcanvas {
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.cart-thumb {
  width: 58px;
  height: 58px;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.2rem;
}

.cart-summary {
  padding: 1rem;
  background: #f8fafc;
}

footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.82);
}

footer a {
  color: rgba(255, 255, 255, 0.74);
}

footer a:hover {
  color: #fff;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-line {
  border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 991.98px) {
  .category-sticky-bar {
    top: 72px;
  }

  .filter-sidebar {
    position: static;
  }

  .listing-title {
    font-size: 2rem;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .listing-title {
    font-size: 1.7rem;
  }

  .listing-hero {
    padding: 1.5rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .sort-select {
    min-width: 100%;
  }
}