/* ─── Category chips ─────────────────────────────── */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }
  .categories::-webkit-scrollbar { display: none; }
}

.category-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.14s ease,
    box-shadow 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.category-chip:hover {
  background: rgba(37, 99, 235, 0.07);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
}

body.dark .category-chip:hover {
  background: rgba(59, 130, 246, 0.12);
}

.category-chip.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.dark .category-chip.active {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.2);
  color: #fff;
}

/* ─── Hero ─────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 18px;
  margin-bottom: 20px;
}

.hero {
  grid-template-columns: 1fr;
}

.hero-main {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.hero-main h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-main > p {
  max-width: 700px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
  margin: 0;
}

.hero-aside,
.premium-gradient-card,
.hero-badge,
.hero-stats {
  display: none;
}

.hero-buttons {
  margin-top: 16px;
  gap: 10px;
}

.hero-buttons .btn {
  min-height: 42px;
}

body.dark .hero-main {
  background: linear-gradient(180deg, rgba(46, 47, 56, 0.96), rgba(35, 36, 44, 0.92));
}

@media (max-width: 900px) {
  .hero-main {
    padding: 18px;
  }
}

.home-search-strip {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.home-search-strip-form {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
}

.home-search-strip-copy h2 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 4px;
}

.home-search-strip-copy p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.home-search-strip-fields {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr) minmax(140px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
}

.home-search-strip-btn {
  min-width: 110px;
  height: 48px;
}

/* Quiet, cozy quick search: one clear action instead of a heavy filter panel. */
.home-search-strip {
  max-width: 760px;
  margin: 0 auto 22px;
  padding: 10px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 252, 0.86));
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.home-search-strip-form {
  grid-template-columns: 1fr;
  gap: 0;
}

.home-search-strip-copy,
.home-search-strip-fields select,
.home-search-strip-fields input[type="number"] {
  display: none;
}

.home-search-strip-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.home-search-strip-fields input[type="text"],
.home-search-strip-fields .smart-search-input {
  min-height: 48px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 12px 0 18px;
  font-size: 14px;
}

.home-search-strip-fields input[type="text"]:focus,
.home-search-strip-fields .smart-search-input:focus {
  outline: none;
}

.home-search-strip-btn {
  min-width: 104px;
  height: 46px;
  border-radius: 999px;
}

body.dark .home-search-strip {
  background:
    linear-gradient(180deg, rgba(31, 34, 40, 0.92), rgba(22, 24, 29, 0.9));
  border-color: rgba(244, 241, 232, 0.1);
}

.hero-single-column {
  grid-template-columns: 1fr;
}

.hero-main-banner {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  overflow: visible;
}

.hero-banner-shell {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  min-height: 420px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.14);
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
}

.hero-banner-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.26)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%);
  pointer-events: none;
}

.hero-banner-image {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

.hero-banner-actions {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-banner-actions .btn {
  min-width: 170px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
}

.home-search-strip-editorial {
  padding: 14px 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 244, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.home-search-strip-editorial .home-search-strip-form {
  grid-template-columns: 1fr;
  gap: 0;
}

.home-search-strip-fields-editorial {
  grid-template-columns: minmax(260px, 2.2fr) minmax(180px, 1fr) minmax(140px, 0.8fr) auto;
}

.hero-minimal {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.hero-editorial {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.hero-main {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 248, 0.98));
  color: var(--text);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.hero-main-minimal {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 251, 0.98));
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-main-editorial {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.72)),
    linear-gradient(135deg, rgba(217, 119, 6, 0.22), transparent 44%),
    url("/images/f2962eb2-de58-4287-baff-3afe2656a6d9.webp") center/cover no-repeat;
  color: #f8fafc;
  border: none;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.14);
}

.hero-main-editorial p {
  color: rgba(248, 250, 252, 0.86);
  max-width: 620px;
}

.hero-badge-editorial {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
}

.hero-badge {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: rgba(37, 99, 235, 0.07);
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.hero-badge-neutral {
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.07);
}

.hero h1 {
  font-size: clamp(34px, 4.8vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  margin-bottom: 16px;
  max-width: 10ch;
}

.hero p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 62ch;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  padding: 16px 18px;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.hero-stat strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.hero-stat span,
.hero-stat p {
  font-size: 13px;
  line-height: 1.45;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-aside > .card {
  padding: 20px;
}

.hero-aside-minimal {
  gap: 16px;
}

.hero-aside-editorial {
  gap: 18px;
}

.hero-note-card {
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.04), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.hero-editorial-visual {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-editorial-image-wrap {
  position: relative;
  min-height: 290px;
  background: #f4f4f5;
}

.hero-editorial-image {
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
  display: block;
}

.hero-editorial-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  color: #111827;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-editorial-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.premium-gradient-card-editorial {
  background:
    linear-gradient(145deg, #111827, #1f2937 60%, #374151);
  color: #f8fafc;
}

.premium-gradient-card-editorial .premium-label,
.premium-gradient-card-editorial .premium-text {
  color: rgba(248, 250, 252, 0.76);
}

.premium-gradient-card-chatgpt {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(32, 33, 35, 0.98), rgba(41, 42, 49, 0.98));
  border-color: rgba(37, 99, 235, 0.16);
  color: #f5f5f5;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}

.premium-gradient-card-chatgpt .premium-label {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-gradient-card-chatgpt .premium-title {
  margin-top: 14px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.premium-gradient-card-chatgpt .premium-text {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
}

.premium-gradient-card-chatgpt .btn-light {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #202123;
  border-color: rgba(255, 255, 255, 0.08);
}

.premium-gradient-card-chatgpt .btn-light:hover {
  background: #ffffff;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.search-submit-full {
  width: 100%;
  margin-top: 12px;
}

.smart-search-card {
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 249, 247, 0.98));
}

.smart-search-input,
.smart-search-field {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.smart-search-input:focus,
.smart-search-field:focus {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.smart-search-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.home-page .favorite-fab {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(32, 33, 35, 0.74);
  color: white;
  display: grid;
  place-items: center;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease;
  z-index: 3;
}

.favorite-fab:hover {
  transform: scale(1.04);
}

body.dark .home-page .favorite-fab {
  background: rgba(15, 23, 42, 0.88);
  color: white;
}

.product-card .sold-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  top: auto;
  right: auto;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  z-index: 3;
}

.product-card-sold .product-title,
.product-card-sold .price {
  opacity: 0.82;
}

@media (max-width: 1100px) {
  .home-search-strip-form,
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-editorial {
    grid-template-columns: 1fr;
  }

  .home-search-strip-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-main {
    padding: 24px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search-grid {
    grid-template-columns: 1fr;
  }

  .home-search-strip {
    padding: 14px;
  }

  .home-search-strip-fields {
    grid-template-columns: 1fr;
  }

  .home-search-strip-fields-editorial {
    grid-template-columns: 1fr;
  }

  .home-search-strip-btn {
    width: 100%;
  }

  .hero-main-editorial {
    min-height: 340px;
  }

  .hero-banner-shell,
  .hero-banner-image {
    min-height: 320px;
  }

  .hero-banner-actions {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 700px) {
  .hero h1 {
    font-size: 29px;
  }

  .hero-main {
    padding: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 13px;
    line-height: 1.55;
  }

  .hero-buttons {
    margin-top: 16px;
    gap: 10px;
  }

  .hero-stat {
    padding: 14px;
  }

  .hero-stat strong {
    font-size: 20px;
  }

  .favorite-fab {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .hero-main {
    padding: 16px;
    border-radius: 20px;
  }
}

body.dark .hero-main {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(52, 53, 65, 0.96), rgba(43, 44, 52, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .hero-stat {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.dark .smart-search-card {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(52, 53, 65, 0.94), rgba(43, 44, 52, 0.98));
}

body.dark .smart-search-input,
body.dark .smart-search-field {
  background: rgba(64, 65, 79, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ─── Recently Viewed ────────────────────────────────────────────────────────── */

.recently-viewed-section {
  margin-bottom: 28px;
}

.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.rv-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rv-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.rv-card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2, #f3f4f6);
}

.rv-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rv-card-info {
  padding: 10px;
}

.rv-card-title {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 3px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rv-card-price {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: var(--primary, #2563eb);
}

.rv-clear-btn {
  font-size: 13px;
  padding: 6px 12px;
}

@media (max-width: 480px) {
  .recently-viewed-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .rv-card-info {
    padding: 7px 8px;
  }
}

/* ─── Home Favorites Row ──────────────────────────────────────────────────────── */

.fav-home-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 8px;
}

.fav-home-row::-webkit-scrollbar {
  display: none;
}

.fav-home-card {
  flex: 0 0 140px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fav-home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.fav-home-card--sold {
  opacity: 0.6;
}

.fav-home-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2, #f3f4f6);
}

.fav-home-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fav-home-sold-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}

.fav-home-card-info {
  padding: 10px;
}

.fav-home-card-title {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 3px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fav-home-card-price {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: var(--primary, #2563eb);
}


/* === Redesign pass: home usability === */
.home-search-strip-fields > * {
  min-width: 0;
}

.home-search-strip-fields .btn,
.home-search-strip-btn {
  min-height: 46px;
}

@media (max-width: 960px) {
  .home-search-strip-form,
  .home-search-strip-fields,
  .home-search-strip-fields-editorial {
    grid-template-columns: 1fr;
  }

  .home-search-strip {
    padding: 14px;
  }

  .home-search-strip-copy h2 {
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .hero,
  .hero-minimal,
  .hero-editorial {
    gap: 14px;
  }

  .hero-main {
    border-radius: 22px;
    padding: 22px;
  }

  .hero-banner-shell,
  .hero-banner-image {
    min-height: 300px;
  }

  .hero-banner-actions {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .hero-banner-actions .btn,
  .home-search-strip-fields .btn,
  .hero-buttons .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}


/* ─── Category Card Grid ────────────────────────────────────────────── */

.cat-section {
  margin: 28px 0;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.cat-section {
  margin-bottom: 26px;
}

@media (max-width: 980px) {
  .cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78));
  border: 1px solid rgba(226, 232, 240, 0.86);
  text-decoration: none;
  color: var(--text, #0f172a);
  font-weight: 650;
  font-size: 13px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
  text-align: center;
  min-height: 112px;
  overflow: hidden;
  position: relative;
}

.cat-card::before {
  content: "";
  position: absolute;
  inset: auto 12px -34px;
  height: 62px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  filter: blur(16px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--primary, #2563eb);
}

.cat-card:hover::before {
  opacity: 1;
}

.cat-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(226, 232, 240, 0.74)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(14, 165, 233, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 20px rgba(15, 23, 42, 0.08);
  font-size: 24px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.cat-card-label {
  line-height: 1.35;
  position: relative;
  word-break: break-word;
  z-index: 1;
}

.cat-card-main {
  min-height: 132px;
  background:
    radial-gradient(circle at 16% 10%, rgba(37, 99, 235, 0.15), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.92));
  border-color: rgba(37, 99, 235, 0.18);
}

.cat-card-main .cat-card-icon {
  width: 56px;
  height: 56px;
  color: #1d4ed8;
}

@media (max-width: 600px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .fav-home-card {
    flex-basis: 132px;
  }

  .cat-card {
    padding: 14px 8px;
    font-size: 12px;
    min-height: 94px;
  }
  .cat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    font-size: 21px;
  }
}

.cat-card-icon svg,
.product-card-category-icon svg {
  width: 23px;
  height: 23px;
}

.product-card-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-category-icon {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.product-card-seller-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.product-card-premium-seller {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 999px;
  background: rgba(240, 253, 250, 0.92);
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.product-card-lead-chip {
  border-color: rgba(15, 23, 42, 0.1);
  background: #fff7ed;
  color: #9a3412;
}

.product-card-price-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-card-price-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.dark .cat-card {
  background:
    radial-gradient(circle at 24% 12%, rgba(122, 167, 255, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(30, 32, 38, 0.96), rgba(18, 19, 23, 0.92));
  border-color: rgba(244, 241, 232, 0.1);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

body.dark .cat-card-icon {
  background:
    linear-gradient(145deg, rgba(244, 241, 232, 0.1), rgba(122, 167, 255, 0.08)),
    rgba(12, 14, 18, 0.52);
  color: #7aa7ff;
  box-shadow: inset 0 1px 0 rgba(244, 241, 232, 0.08), 0 10px 22px rgba(0, 0, 0, 0.22);
}

body.dark .product-card-category-chip {
  background: rgba(244, 241, 232, 0.06);
  border-color: rgba(244, 241, 232, 0.1);
}

body.dark .product-card-lead-chip {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.22);
  color: #fdba74;
}

#productsList .product-image-wrap {
  aspect-ratio: 4 / 5;
}

#productsList .product-card {
  align-self: start;
}

#productsList .product-card-promoted {
  border-color: rgba(15, 23, 42, 0.07);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

#productsList .product-card-premium {
  border-color: rgba(15, 23, 42, 0.07);
}

#productsList .product-card-sponsored {
  border-color: rgba(15, 23, 42, 0.07);
}

#productsList .product-badge {
  top: 9px;
  left: 9px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.86), rgba(20, 184, 166, 0.76));
  color: #ffffff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 7px 16px rgba(15, 118, 110, 0.16);
}

#productsList .product-badge-promoted {
  letter-spacing: 0.06em;
}

#productsList .product-badge-featured {
  border-color: rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 253, 245, 0.84));
  color: #047857;
  box-shadow: 0 8px 18px rgba(4, 120, 87, 0.14);
}

#productsList .product-badge-premium {
  border-color: rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(204, 251, 241, 0.88));
  color: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

#productsList .product-badge-sponsored {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(20, 184, 166, 0.82));
  color: #f8fafc;
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.24);
}

#productsList .new-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: calc(100% - 72px);
  min-height: 0;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.38);
  color: rgba(255, 255, 255, 0.88);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

#productsList .product-body {
  gap: 6px;
  padding: 12px 13px 14px;
}

#productsList .product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 0;
}

#productsList .condition-badge {
  margin-right: 0;
  padding: 3px 7px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

#productsList .condition-badge--new {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

#productsList .condition-badge--used {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

#productsList .product-title {
  min-height: 0;
}

#productsList .product-bottom {
  margin-top: 0;
  padding-top: 0;
}

#productsList .product-image-wrap > img,
#productsList .product-image-wrap > .lazy-img,
#productsList .product-image-wrap > div {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

@media (max-width: 700px) {
  #productsList.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #productsList .product-card {
    border-radius: 18px;
    overflow: hidden;
  }

  #productsList .product-image-wrap img,
  #productsList .product-image-wrap > div {
    height: 100% !important;
  }

  #productsList .product-body {
    gap: 6px;
    padding: 8px 9px 10px;
  }

  #productsList .product-meta {
    font-size: 10px;
    gap: 5px;
    min-height: 0;
  }

  #productsList .product-card-category-chip {
    display: none;
  }

  #productsList .product-card-category-icon svg {
    width: 15px;
    height: 15px;
  }

  #productsList .product-card-seller-line {
    font-size: 10px;
  }

  #productsList .product-title {
    font-size: 13px;
    line-height: 1.26;
    min-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #productsList .product-bottom {
    align-items: flex-end;
    flex-direction: row;
    gap: 6px;
  }

  #productsList .price {
    font-size: 16px;
  }

  #productsList .product-bottom .btn {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  #productsList.grid {
    grid-template-columns: 1fr;
  }
}

/* Final override for the home quick search after older responsive rules. */
.home-search-strip.home-search-strip,
.home-search-strip.card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 10px;
  border-radius: 999px;
}

.home-search-strip .home-search-strip-copy,
.home-search-strip select,
.home-search-strip input[type="number"] {
  display: none !important;
}

.home-search-strip .home-search-strip-form,
.home-search-strip .home-search-strip-fields,
.home-search-strip .home-search-strip-fields-editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 560px) {
  .home-search-strip.home-search-strip,
  .home-search-strip.card {
    border-radius: 24px;
    padding: 10px;
  }

  .home-search-strip .home-search-strip-form,
  .home-search-strip .home-search-strip-fields,
  .home-search-strip .home-search-strip-fields-editorial {
    grid-template-columns: 1fr;
  }
}

/* Dark theme finish: keep the storefront calm, deep and readable. */
body.dark .home-page,
body.dark .container.page {
  color: var(--text);
}

body.dark .hero-main:not(.hero-main-editorial),
body.dark .hero-note-card,
body.dark .smart-search-card,
body.dark .home-search-strip,
body.dark .home-search-strip-editorial {
  border-color: rgba(226, 232, 240, 0.1);
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.11), transparent 30%),
    linear-gradient(180deg, rgba(18, 23, 30, 0.96), rgba(10, 13, 18, 0.94));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}

body.dark .hero-main:not(.hero-main-editorial) p,
body.dark .home-search-strip-copy p,
body.dark .smart-search-note,
body.dark .product-card-seller-line,
body.dark .product-card-price-note {
  color: rgba(203, 213, 225, 0.78);
}

body.dark .product-card-premium-seller {
  border-color: rgba(45, 212, 191, 0.25);
  background: rgba(20, 83, 45, 0.24);
  color: #99f6e4;
}

body.dark .hero-stat {
  border-color: rgba(226, 232, 240, 0.1);
  background: rgba(15, 23, 42, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.dark .smart-search-input,
body.dark .smart-search-field,
body.dark .home-search-strip-fields input[type="text"],
body.dark .home-search-strip-fields .smart-search-input {
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(2, 6, 23, 0.28);
  color: var(--text);
}

body.dark #productsList .product-card {
  border-color: rgba(226, 232, 240, 0.1);
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(18, 23, 30, 0.94), rgba(10, 13, 18, 0.98));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}

body.dark #productsList .product-card:hover {
  border-color: rgba(139, 183, 255, 0.24);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.38);
}

body.dark #productsList .product-card-promoted {
  border-color: rgba(244, 241, 232, 0.1);
}

body.dark #productsList .product-card-premium {
  border-color: rgba(244, 241, 232, 0.1);
}

body.dark #productsList .product-card-sponsored {
  border-color: rgba(244, 241, 232, 0.1);
}

body.dark #productsList .product-image-wrap {
  border-color: rgba(226, 232, 240, 0.09);
  background: rgba(2, 6, 23, 0.42);
}

body.dark #productsList .product-badge {
  border-color: rgba(187, 247, 208, 0.3);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(20, 184, 166, 0.72));
  color: #ecfdf5;
}

body.dark #productsList .product-badge-featured {
  border-color: rgba(153, 246, 228, 0.28);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(15, 23, 42, 0.58));
  color: rgba(153, 246, 228, 0.96);
}

body.dark #productsList .product-badge-premium {
  border-color: rgba(153, 246, 228, 0.32);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.26), rgba(15, 23, 42, 0.62));
  color: #99f6e4;
}

body.dark #productsList .product-badge-sponsored {
  border-color: rgba(248, 250, 252, 0.16);
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.16), rgba(20, 184, 166, 0.42));
  color: #ffffff;
}

body.dark #productsList .new-badge {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(2, 6, 23, 0.44);
  color: rgba(248, 250, 252, 0.84);
}

body.dark #productsList .condition-badge {
  border-color: rgba(226, 232, 240, 0.12);
}

body.dark #productsList .condition-badge--new {
  background: rgba(45, 212, 191, 0.09);
  color: rgba(153, 246, 228, 0.86);
}

body.dark #productsList .condition-badge--used {
  background: rgba(251, 191, 36, 0.1);
  color: rgba(253, 230, 138, 0.88);
}

body.dark #productsList .price,
body.dark #productsList .product-title {
  color: #f8fafc;
}

/* Marketplace card hierarchy: photo, title and price first; metadata second. */
#productsList .product-title {
  order: 1;
}

#productsList .product-bottom {
  order: 2;
}

#productsList .product-meta {
  order: 3;
  margin-top: 2px;
}

#productsList .product-card-seller-line {
  order: 4;
  margin-top: 0;
  min-width: 0;
}

#productsList .product-card-seller-line > span:first-child {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsList .product-card-delivery-group {
  max-width: 100%;
}

#productsList .product-card-delivery-chip,
#productsList .product-card-delivery-more,
#productsList .condition-badge,
#productsList .product-card-lead-chip {
  opacity: 0.86;
}

@media (max-width: 700px) {
  #productsList .product-card-seller-line {
    display: none;
  }

  #productsList .product-meta {
    margin-top: 0;
  }

  #productsList .product-card-delivery-chip,
  #productsList .product-card-delivery-more,
  #productsList .condition-badge,
  #productsList .product-card-lead-chip {
    min-height: 19px;
    padding-inline: 5px;
    font-size: 8px;
  }
}
