/* ─────────────────────────────────────────────────────────────────────
   AVENU — bestseller-grid
   Section head: left = eyebrow chip + h2 ("Bestsellers", Space Grotesk
   display 36px desktop); right = inline row of category sub-tabs (All /
   Men / Women / Footwear), active tab has a 1px black underline. To the
   far right, the "View all →" link (with arrow icon).

   Body uses the shared `.product-grid` from common.css (4-up desktop,
   3-up tablet, 2-up mobile). Cards are rendered by the product-card
   snippet — this stylesheet only owns the head + the placeholder shell.

   Responsive at 1440 / 768 / 375. On mobile the tab row scrolls
   horizontally inside its own track so the section head stays compact.
   ───────────────────────────────────────────────────────────────────── */

.av-bestseller {
  background: var(--color-bg);
}

/* ── Head ────────────────────────────────────────────────────────────── */
.av-bestseller__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.av-bestseller__head-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.av-bestseller__eyebrow {
  color: var(--color-text-muted);
}

.av-bestseller__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);        /* 36px desktop */
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin: 0;
}

.av-bestseller__head-right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-shrink: 0;
}

/* ── Sub-tabs (All / Men / Women / Footwear) ─────────────────────────── */
.av-bestseller__tabs {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.av-bestseller__tab {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.av-bestseller__tab:hover {
  color: var(--color-text);
}
.av-bestseller__tab.is-active {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
}

/* ── View all link ──────────────────────────────────────────────────── */
.av-bestseller__view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-left: var(--space-3);
  white-space: nowrap;
  transition: transform var(--transition-fast), color var(--transition-fast);
}
.av-bestseller__view-all:hover { color: var(--color-text); }
.av-bestseller__view-all:hover svg { transform: translateX(3px); }
.av-bestseller__view-all svg {
  transition: transform var(--transition-fast);
  color: currentColor;
}

/* ── Placeholder card (used when collection has no products) ─────────── */
.product-card--placeholder .product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  font-size: var(--text-3xl);
}

/* ── Tablet (≤ 1024px) ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .av-bestseller__head {
    flex-wrap: wrap;
    gap: var(--space-4);
  }
  .av-bestseller__title { font-size: var(--text-2xl); }
  .av-bestseller__head-right { gap: var(--space-4); }
  .av-bestseller__tabs { gap: var(--space-4); }
}

/* ── Mobile (≤ 768px) ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .av-bestseller__head {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }
  .av-bestseller__head-left {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .av-bestseller__title { font-size: var(--text-2xl); }
  .av-bestseller__head-right {
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
  }
  /* Tabs collapse to a horizontal-scroll row. */
  .av-bestseller__tabs {
    flex: 1 1 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: var(--space-4);
    padding-bottom: 2px;
  }
  .av-bestseller__tabs::-webkit-scrollbar { display: none; }
  .av-bestseller__view-all {
    flex: 0 0 auto;
    margin-left: 0;
  }
}

/* ── Small mobile (≤ 480px) ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .av-bestseller__title { font-size: var(--text-xl); }
  .av-bestseller__tabs { gap: var(--space-3); }
  .av-bestseller__view-all { font-size: var(--text-xs); }
}
