/* =========================================
   FEATURED BRANDS HERO — BENTO GRID
   ========================================= */

.brands-hero {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1.35fr;
  height: clamp(380px, calc(50vw - 8px), 700px);
  gap: 2px;
  padding: 8px 8px 4px;
  margin-bottom: 20px;
  background: var(--bg);
  transition: opacity 0.5s ease;
}

/* Card 1: tall left slot */
.hero-card--large {
  grid-column: 1;
  grid-row: 1 / span 2;
}

/* ===== Card base ===== */
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: #efefef;
  -webkit-tap-highlight-color: transparent;
}

.hero-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 0.5s ease, object-position 0.1s ease;
  pointer-events: none;
}

/* Scale image on hover */
.hero-card:hover img {
  transform: scale(1.06);
}

/* ===== Gradient overlay ===== */
.hero-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.0) 55%
  );
  transition: background 0.35s ease;
}

.hero-card:hover .hero-card-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.08) 65%
  );
}

/* ===== Brand name ===== */
.hero-card-brand {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.3px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Slightly larger on the tall feature card */
.hero-card--large .hero-card-brand {
  font-size: 16px;
  margin-bottom: 10px;
}

/* ===== Shop button ===== */
.hero-card-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-card-btn:hover {
  background: rgba(255, 255, 255, 1);
}

.hero-card-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Button slides up + fades in on hover */
.hero-card:hover .hero-card-btn {
  transform: translateY(0);
  opacity: 1;
}

/* Touch: button always visible (no hover state on mobile) */
@media (hover: none) {
  .hero-card-btn {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Mobile — full-screen horizontal carousel ===== */
@media (max-width: 600px) {
  .brands-hero {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - 55px);
    height: calc(100svh - 55px);
    gap: 0;
    padding: 0;
    margin-bottom: 0;
    background: #000;
    scrollbar-width: none;
  }

  .brands-hero::-webkit-scrollbar {
    display: none;
  }

  .hero-card {
    flex: 0 0 100%;
    height: 100%;
    border-radius: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero-card-overlay {
    padding: 20px;
  }

  .hero-card-brand,
  .hero-card--large .hero-card-brand {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .hero-card-btn {
    padding: 8px 20px;
    font-size: 12px;
  }
}

/* ===== Carousel dot indicators ===== */
.brands-hero-dots {
  display: none;
}

@media (max-width: 600px) {
  .brands-hero-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: -22px;
    padding-bottom: 10px;
    position: relative;
    z-index: 5;
    pointer-events: none;
  }

  .brands-hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    transition: background 0.25s ease, width 0.25s ease;
  }

  .brands-hero-dot.active {
    width: 22px;
    background: rgba(255, 255, 255, 0.95);
  }
}
