/* =========================================================
   Homepage: Shop by Seller
   ========================================================= */
.bn-shops-section {
  --bn-shop-accent: var(--bn-primary);
  --bn-shop-ink: var(--bn-text);
  --bn-shop-muted: var(--bn-muted);
  padding-top: 8px;
}

.bn-shops-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.bn-shops-eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--bn-shop-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bn-shops-title {
  margin: 0 0 4px;
  color: var(--bn-shop-ink);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  font-weight: 800;
}

.bn-shops-desc {
  margin: 0;
  color: var(--bn-shop-muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.bn-shops-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e2e8e5;
  background: #fff;
  color: var(--bn-shop-ink) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.bn-shops-link:hover {
  border-color: var(--bn-shop-accent);
  color: var(--bn-shop-accent) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.bn-shops-link i {
  font-size: 11px;
}

.bn-shops-grid {
  display: grid;
  grid-template-columns: repeat(var(--bn-shop-cols, 4), minmax(0, 1fr));
  gap: 18px;
}

/* Few sellers: keep cards a sane width and align them with the section heading */
.bn-shops-grid--sparse {
  justify-content: start;
  grid-template-columns: repeat(var(--bn-shop-cols, 2), minmax(240px, 340px));
}

.bn-shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #ebeff2;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.bn-shop-card:hover {
  transform: translateY(-4px);
  border-color: var(--bn-primary-tint);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.11);
}

.bn-shop-card__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  font-size: 0;
  border-radius: inherit;
}

.bn-shop-card__top,
.bn-shop-card__name,
.bn-shop-card__footer {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.bn-shop-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.bn-shop-card__avatar {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #eef2f0;
  background: #f8fafc;
}

.bn-shop-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.bn-shop-card__initials {
  font-size: 22px;
  font-weight: 800;
  color: var(--bn-shop-accent);
}

.bn-shop-card__verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 157, 88, 0.1);
  color: #0f9d58;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bn-shop-card__name {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.bn-shop-card__name a {
  pointer-events: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--bn-shop-ink);
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.bn-shop-card:hover .bn-shop-card__name a {
  color: var(--bn-shop-accent);
}

.bn-shop-card__footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed #e8edf1;
}

.bn-shop-card__count {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bn-shop-muted);
}

.bn-shop-card__btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--bn-shop-accent);
  background: #fff;
  color: var(--bn-shop-accent) !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.bn-shop-card__btn i {
  font-size: 10px;
  transition: transform 0.25s ease;
}

.bn-shop-card:hover .bn-shop-card__btn {
  background: var(--bn-shop-accent);
  color: #fff !important;
}

.bn-shop-card:hover .bn-shop-card__btn i {
  transform: translateX(3px);
}

@media (max-width: 1199px) {
  .bn-shops-grid,
  .bn-shops-grid--sparse {
    grid-template-columns: repeat(min(var(--bn-shop-cols, 3), 3), minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 991px) {
  .bn-shops-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .bn-shops-grid,
  .bn-shops-grid--sparse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .bn-shops-grid,
  .bn-shops-grid--sparse {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    margin-right: -15px;
    padding-right: 15px;
  }

  .bn-shops-grid::-webkit-scrollbar,
  .bn-shops-grid--sparse::-webkit-scrollbar {
    display: none;
  }

  .bn-shops-grid .bn-shop-card,
  .bn-shops-grid--sparse .bn-shop-card {
    flex: 0 0 78%;
    width: 78%;
    max-width: 320px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .bn-shop-card {
    padding: 14px;
    border-radius: 14px;
  }

  .bn-shop-card:hover {
    transform: none;
  }

  .bn-shop-card__hit {
    -webkit-user-drag: none;
  }

  .bn-shop-card__avatar {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }

  .bn-shop-card__footer {
    padding-top: 10px;
  }
}
