/* ==========================================================================
   Home
   Hero banner, featured categories, and the product-rail layout used by
   every homepage section (flash deals, featured, latest, popular, best
   sellers all share the same rail markup with a different title).
   ========================================================================== */

/* --------------------------------------------------------------------- */
/* Hero                                                                   */
/* --------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background-color: var(--color-primary);
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.35) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero__inner {
  max-width: 640px;
}

.hero__eyebrow {
  color: var(--color-accent);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.hero__title {
  color: #fff;
  margin-bottom: var(--space-4);
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-md);
  margin-bottom: var(--space-6);
  max-width: 48ch;
}

.hero__cta {
  padding: var(--space-4) var(--space-6);
}

/* --------------------------------------------------------------------- */
/* Featured categories                                                    */
/* --------------------------------------------------------------------- */
.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
}

.category-card__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(var(--color-secondary-rgb), 0.08);
  color: var(--color-secondary);
}

.category-card__icon svg {
  width: 24px;
  height: 24px;
}

.category-card__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
}

/* --------------------------------------------------------------------- */
/* Product rail                                                           */
/* --------------------------------------------------------------------- */
.product-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: var(--space-5);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.product-rail > .product-card {
  scroll-snap-align: start;
}

.product-rail::-webkit-scrollbar {
  height: 6px;
}

.product-rail::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------- */
/* Featured brands                                                        */
/* --------------------------------------------------------------------- */
.brands__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.brands__logo {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  transition: color var(--duration-fast) var(--ease-out);
}

.brands__logo:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------- */
/* Testimonials                                                           */
/* --------------------------------------------------------------------- */
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.testimonial-card__quote {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
}

.testimonial-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-card__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
}

.testimonial-card__name {
  font-style: normal;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--color-primary);
  display: block;
}

/* --------------------------------------------------------------------- */
/* Newsletter                                                             */
/* --------------------------------------------------------------------- */
.newsletter {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8);
}

.newsletter__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.newsletter__inner h2 {
  margin-bottom: var(--space-2);
}

.newsletter__inner > div:first-child {
  max-width: 420px;
}

.newsletter__form {
  display: flex;
  gap: var(--space-3);
  width: 100%;
  max-width: 420px;
}

.newsletter__form input {
  flex: 1;
  height: 48px;
  padding-inline: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-sm);
}

.newsletter__form input:focus-visible {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-focus);
}

.newsletter__form .btn {
  padding-inline: var(--space-6);
}

/* Marketplace-inspired B2B homepage */
.marketplace-hero { background:#f4f6f8; padding: 18px 0 28px; }
.marketplace-hero__grid { display:grid; grid-template-columns:240px minmax(0,1fr) 220px; gap:14px; min-height:430px; }
.marketplace-categories, .marketplace-hero__side { background:#fff; border-radius:10px; padding:18px; border:1px solid #e9edf1; }
.marketplace-categories strong { display:block; margin-bottom:10px; font-size:15px; }
.marketplace-categories a {
  display:flex; gap:10px; align-items:center; justify-content:space-between; min-height:38px;
  color:#344150; font-size:13px; border-radius:6px; padding-inline:6px; margin-inline:-6px;
  opacity:0; transform:translateX(-10px);
  animation:cat-item-in .45s var(--ease-out) forwards;
  transition:background .2s ease, padding-left .2s ease, color .2s ease;
}
.marketplace-categories a:nth-child(2) { animation-delay:.05s; }
.marketplace-categories a:nth-child(3) { animation-delay:.10s; }
.marketplace-categories a:nth-child(4) { animation-delay:.15s; }
.marketplace-categories a:nth-child(5) { animation-delay:.20s; }
.marketplace-categories a:nth-child(6) { animation-delay:.25s; }
.marketplace-categories a:nth-child(7) { animation-delay:.30s; }
.marketplace-categories a:nth-child(8) { animation-delay:.35s; }
.marketplace-categories a:hover { background:#fff3ec; color:#d95000; padding-left:12px; }
.marketplace-categories a:hover span:last-child { transform:translateX(3px); }
.marketplace-categories a span:last-child { transition:transform .2s var(--ease-out); }
.marketplace-categories svg { width:17px; height:17px; color:#e95b14; transition:transform .25s var(--ease-out), color .2s ease; }
.marketplace-categories a:hover svg { color:#d95000; transform:scale(1.15) rotate(-6deg); }
.marketplace-categories__all {
  color:#df5000 !important; font-weight:700; margin-top:8px; display:inline-block;
  opacity:0; animation:cat-item-in .45s var(--ease-out) forwards; animation-delay:.4s;
  transition:transform .2s var(--ease-out);
}
.marketplace-categories__all:hover { transform:translateX(4px); }
@keyframes cat-item-in { to { opacity:1; transform:translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .marketplace-categories a, .marketplace-categories__all { opacity:1; transform:none; animation:none; }
}
.marketplace-hero__feature { border-radius:10px; padding:54px clamp(28px,5vw,70px); color:#fff; background:radial-gradient(circle at 83% 20%, rgba(255,184,91,.52), transparent 20%), linear-gradient(117deg,#0B1F4D 0%,#1D4ED8 54%,#3B6BE0 100%); overflow:hidden; position:relative; }
.marketplace-hero__feature::after { content:''; position:absolute; width:260px; height:260px; right:-72px; bottom:-98px; border:34px solid rgba(255,255,255,.12); border-radius:50%; }
.marketplace-kicker { color:#e95b14; font-size:11px; font-weight:800; letter-spacing:.08em; margin-bottom:10px; }
.marketplace-hero__feature .marketplace-kicker { color:#ffd1a8; }
.marketplace-hero h1 { max-width:650px; color:#fff; font-size:clamp(32px,4vw,52px); line-height:1.08; letter-spacing:-.04em; margin-bottom:16px; }
.marketplace-hero__feature > p:not(.marketplace-kicker) { max-width:540px; color:rgba(255,255,255,.82); line-height:1.65; }
.marketplace-hero__actions { display:flex; align-items:center; gap:22px; margin-top:28px; }
.marketplace-hero .btn { background:#ff6a00; border-color:#ff6a00; border-radius:6px; }
.marketplace-text-link { color:#d95000; font-size:14px; font-weight:700; }
.marketplace-hero .marketplace-text-link { color:#fff; }
.marketplace-hero__terms { display:flex; flex-wrap:wrap; gap:14px; margin-top:42px; font-size:12px; color:rgba(255,255,255,.78); }
.marketplace-hero__side { display:flex; flex-direction:column; gap:14px; }
.marketplace-side-card {
  flex:1; border-radius:8px; padding:18px; background:#e9f2f4;
  display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between;
  opacity:0; transform:translateY(18px);
  animation:fade-in-up .6s var(--ease-out) forwards; animation-delay:.15s;
  transition:transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.marketplace-hero__side .marketplace-side-card:nth-child(2) { animation-delay:.3s; }
.marketplace-side-card:hover { transform:translateY(-4px); box-shadow:0 14px 26px -14px rgba(23,32,43,.24); }
.marketplace-side-card--orange { background:#fff0e8; }
.marketplace-side-card span, .marketplace-supplier-card span { color:#d95000; font-size:10px; letter-spacing:.07em; font-weight:800; }
.marketplace-side-card strong { font-size:18px; line-height:1.25; color:#17202b; }
.marketplace-side-card a { font-size:13px; font-weight:700; color:#17202b; display:inline-flex; align-items:center; gap:4px; transition:gap .2s var(--ease-out); }
.marketplace-side-card a:hover { gap:8px; }

/* Rotating product thumbnail — two stacked <img> crossfaded every 2s by wireCardRotator() in home.js */
.side-card__media { position:relative; width:100%; height:100px; border-radius:8px; overflow:hidden; background:#fff; margin-bottom:14px; }
.side-card__media-img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:10px;
  opacity:0; transform:scale(1.06);
  transition:opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.side-card__media-img.is-active { opacity:1; transform:scale(1); }
@media (prefers-reduced-motion: reduce) {
  .marketplace-side-card { opacity:1; transform:none; animation:none; }
  .side-card__media-img { transition:none; }
}
.marketplace-trust { display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin-top:24px; margin-bottom:28px; background:#fff; border:1px solid #e8ecf0; border-radius:10px; }
.marketplace-trust div { padding:19px 22px; border-right:1px solid #e8ecf0; }
.marketplace-trust div:last-child { border:0; }
.marketplace-trust b, .marketplace-trust span { display:block; }
.marketplace-trust b { font-size:14px; margin-bottom:4px; }
.marketplace-trust span { color:var(--color-text-muted); font-size:12px; line-height:1.4; }
.marketplace-supplier-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.marketplace-supplier-card { border:1px solid #e6eaee; border-radius:10px; overflow:hidden; background:#fff; transition:box-shadow .2s ease,transform .2s ease; }
.marketplace-supplier-card:hover { transform:translateY(-3px); box-shadow:0 12px 25px rgba(15,32,48,.12); }
.marketplace-supplier-card img { width:100%; height:160px; object-fit:cover; background:#f3f5f6; }
.marketplace-supplier-card div { padding:14px; }
.marketplace-supplier-card h3 { font-size:14px; line-height:1.4; margin:6px 0; min-height:40px; }
.marketplace-supplier-card p { color:var(--color-text-muted); font-size:12px; min-height:34px; }
.marketplace-supplier-card a { display:block; margin-top:12px; color:#d95000; font-size:13px; font-weight:700; }
.marketplace-suppliers .section-head h2 { margin-bottom:0; }
.marketplace-suppliers .section-head h2::after { background:#ff6a00; }
.product-rail { grid-auto-columns:minmax(210px,1fr); }
.product-card { border-radius:8px; }
.product-card__price { color:#d95000; }

/* Stagger the reveal animation across a row of feature cards */
.marketplace-trust .reveal:nth-child(1) { --reveal-delay: 0s; }
.marketplace-trust .reveal:nth-child(2) { --reveal-delay: 0.08s; }
.marketplace-trust .reveal:nth-child(3) { --reveal-delay: 0.16s; }
.marketplace-trust .reveal:nth-child(4) { --reveal-delay: 0.24s; }
.marketplace-supplier-grid .reveal:nth-child(1) { --reveal-delay: 0s; }
.marketplace-supplier-grid .reveal:nth-child(2) { --reveal-delay: 0.1s; }
.marketplace-supplier-grid .reveal:nth-child(3) { --reveal-delay: 0.2s; }
.marketplace-supplier-grid .reveal:nth-child(4) { --reveal-delay: 0.3s; }
.category-grid .reveal:nth-child(1) { --reveal-delay: 0s; }
.category-grid .reveal:nth-child(2) { --reveal-delay: 0.06s; }
.category-grid .reveal:nth-child(3) { --reveal-delay: 0.12s; }
.category-grid .reveal:nth-child(4) { --reveal-delay: 0.18s; }
.category-grid .reveal:nth-child(5) { --reveal-delay: 0.24s; }
.category-grid .reveal:nth-child(6) { --reveal-delay: 0.3s; }
.category-grid .reveal:nth-child(7) { --reveal-delay: 0.36s; }

/* --------------------------------------------------------------------- */
/* Infinite product loop (marquee)                                       */
/* --------------------------------------------------------------------- */
.product-marquee {
  overflow: hidden;
  padding-block: var(--space-2);
  /* fade the two edges so cards don't appear to clip abruptly */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.product-marquee__track {
  display: flex;
  gap: var(--space-5);
  width: max-content;
  animation: marquee-loop var(--marquee-duration, 42s) linear infinite;
}

/* Pause the loop on hover/focus so shoppers can actually click a card */
.product-marquee:hover .product-marquee__track,
.product-marquee:focus-within .product-marquee__track {
  animation-play-state: paused;
}

.product-marquee__track > .product-card {
  flex: 0 0 240px;
  width: 240px;
}

.product-marquee--reverse .product-marquee__track {
  animation-direction: reverse;
}

/* --------------------------------------------------------------------- */
/* Hero carousel — the marketplace-hero__feature panel now rotates       */
/* through several slides instead of showing one static banner.          */
/* --------------------------------------------------------------------- */
.hero-carousel {
  position: relative;
  overflow: hidden;
}

/* When the feature panel hosts a carousel, each slide supplies its own
   padding/background — reset the panel's own so they don't stack. */
.marketplace-hero__feature.hero-carousel {
  padding: 0;
  background: none;
}

.marketplace-hero__feature.hero-carousel::after {
  display: none;
}

.hero-carousel__slide {
  position: absolute;
  inset: 0;
  padding: 78px clamp(28px, 5vw, 70px);
  color: #fff;
  background: radial-gradient(circle at 83% 20%, rgba(255, 184, 91, .52), transparent 20%), linear-gradient(117deg, #0B1F4D 0%, #1D4ED8 54%, #3B6BE0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity .5s ease, transform .5s ease, visibility 0s linear .5s;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-carousel__slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity .5s ease, transform .5s ease;
}

.hero-carousel__slide--b002 { background: radial-gradient(circle at 83% 20%, rgba(255, 138, 61, .5), transparent 20%), linear-gradient(117deg, #451a03 0%, #9a3412 54%, #c2410c 100%); }
.hero-carousel__slide--b003 { background: radial-gradient(circle at 83% 20%, rgba(120, 255, 214, .35), transparent 20%), linear-gradient(117deg, #052E1C 0%, #0F5C3A 54%, #16A34A 100%); }

/* When a banner has an actual uploaded photo (--slide-image, set inline by
   home.js), paint it behind the text with a left-to-right dark scrim so the
   white heading/copy stays readable over any image. Sits on ::after at a
   negative z-index so it paints behind the slide's normal-flow text content
   but above the slide's own gradient background. */
.hero-carousel__slide.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 24, .82) 0%, rgba(8, 12, 24, .5) 48%, rgba(8, 12, 24, .18) 100%),
    var(--slide-image) center / cover no-repeat;
}

/* Scrolling product strips pinned to the top and bottom edges of the hero
   panel — sit behind the dots/arrows (z-index 1 vs 2) and above every
   slide. Persist across slide changes since they live outside
   .hero-carousel__slide. Each chip is a real link to its product page. */
.hero-carousel__marquee {
  position: absolute;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: rgba(8, 12, 24, .38);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.hero-carousel__marquee--top { top: 0; }
.hero-carousel__marquee--bottom { bottom: 0; }

.hero-carousel__marquee-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  padding-inline: 16px;
  animation: marquee-loop 26s linear infinite;
}

/* Scroll the top strip the opposite way so the two read as a deliberate
   pair rather than a duplicate. */
.hero-carousel__marquee--top .hero-carousel__marquee-track {
  animation-direction: reverse;
}

/* Hovering or keyboard-focusing any chip stops the whole strip so it can
   actually be read and clicked. */
.hero-carousel__marquee:hover .hero-carousel__marquee-track,
.hero-carousel__marquee:focus-within .hero-carousel__marquee-track {
  animation-play-state: paused;
}

.hero-carousel__marquee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.hero-carousel__marquee-item:hover,
.hero-carousel__marquee-item:focus-visible {
  background: rgba(255, 255, 255, .26);
  border-color: rgba(255, 255, 255, .4);
  transform: translateY(-2px);
}

.hero-carousel__marquee-item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hero-carousel__marquee-item img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.hero-carousel__marquee-item span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__marquee-track { animation: none; }
}

.hero-carousel__dots {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, width .2s ease;
}

.hero-carousel__dot.is-active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

.hero-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}

.hero-carousel__arrow:hover { background: rgba(255, 255, 255, .32); }
.hero-carousel__arrow--prev { left: 14px; }
.hero-carousel__arrow--next { right: 14px; }
.hero-carousel__arrow svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__slide { transition: opacity .3s ease; transform: none; }
}

/* --------------------------------------------------------------------- */
/* Flash sale — orange banner + live countdown timer                     */
/* --------------------------------------------------------------------- */
.flash-sale__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  background: linear-gradient(100deg, #ff6a00, #ff9a3c);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  color: #fff;
  margin-bottom: var(--space-6);
}

.flash-sale__head h2 {
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.flash-sale__bolt {
  width: 22px;
  height: 22px;
  animation: flash-pulse 1.4s ease-in-out infinite;
}

@keyframes flash-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: .75; }
}

.flash-sale__timer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.flash-sale__timer-label {
  font-size: var(--fs-sm);
  opacity: .9;
}

.flash-sale__timer-units {
  display: flex;
  gap: 6px;
}

.flash-sale__timer-unit {
  background: rgba(15, 23, 42, .28);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  min-width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.flash-sale__timer-unit strong {
  display: block;
  font-size: var(--fs-md);
  line-height: 1;
}

.flash-sale__timer-unit span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .85;
}

.flash-sale__cta {
  background: #fff;
  color: #c2410c;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .flash-sale__timer { margin-left: 0; width: 100%; justify-content: space-between; }
}


@media (max-width:1023px) {
  .marketplace-hero__grid { grid-template-columns:1fr 200px; }
  .marketplace-categories { display:none; }
}
@media (max-width:767px) {
  .marketplace-hero { padding-top:0; }
  .marketplace-hero__grid { grid-template-columns:1fr; }
  .marketplace-hero__side { display:none; }
  .marketplace-hero__feature { min-height:350px; padding:42px 28px; border-radius:0; }
  .hero-carousel__slide { padding:64px 22px; }
  .hero-carousel__marquee { height:46px; }
  .hero-carousel__marquee-item img { width:24px; height:24px; }
  .hero-carousel__marquee-item span { max-width:120px; font-size:11px; }
  .marketplace-trust { grid-template-columns:1fr 1fr; border-radius:0; margin-top:0; }
  .marketplace-trust div:nth-child(2) { border-right:0; }
  .marketplace-trust div:nth-child(-n+2) { border-bottom:1px solid #e8ecf0; }
  .marketplace-supplier-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .marketplace-supplier-card img { height:120px; }
}

/* --------------------------------------------------------------------- */
/* Dark mode — marketplace homepage overrides.                           */
/* This section (unlike the rest of the design system) was built with    */
/* fixed brand hex values instead of --color-* tokens, so dark mode      */
/* needs explicit overrides here rather than inheriting them for free.   */
/* --------------------------------------------------------------------- */
[data-theme="dark"] .marketplace-hero { background: var(--color-bg); }

[data-theme="dark"] .marketplace-categories,
[data-theme="dark"] .marketplace-hero__side {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .marketplace-categories a { color: var(--color-text); }
[data-theme="dark"] .marketplace-categories a:hover { background: rgba(255, 106, 0, .16); color: #ff8a3d; }
[data-theme="dark"] .marketplace-categories__all { color: #ff8a3d !important; }

[data-theme="dark"] .marketplace-side-card { background: #12262c; }
[data-theme="dark"] .marketplace-side-card--orange { background: #2a1810; }
[data-theme="dark"] .marketplace-side-card strong,
[data-theme="dark"] .marketplace-side-card a { color: var(--color-text); }
[data-theme="dark"] .side-card__media { background: var(--color-surface); }

[data-theme="dark"] .marketplace-trust {
  background: var(--color-surface);
  border-color: var(--color-border);
}
[data-theme="dark"] .marketplace-trust div { border-color: var(--color-border); }

[data-theme="dark"] .marketplace-supplier-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}
[data-theme="dark"] .marketplace-supplier-card img { background: #1b2740; }

@media (max-width: 767px) {
  [data-theme="dark"] .marketplace-trust div:nth-child(-n+2) { border-bottom-color: var(--color-border); }
}
