/* ─────────────────────────────────────────────────────────────────────
   AVENU — shop-by-size
   Section head: title ("Shop by Fit") + small subtitle.
   Body: horizontal row of 6 small clickable size-chip tiles. Each chip
   is a square (1:1) ~80px on desktop / ~56px on mobile, with a centered
   Space Grotesk semibold number.

   Default state: light gray bg + 1px subtle border.
   Hover:         black bg + white text.
   Active:        solid black + white text (visual demo only).

   Responsive at 1440 / 768 / 375 — chips wrap to 2 rows of 3 on mobile.
   ───────────────────────────────────────────────────────────────────── */

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

/* ── Head ────────────────────────────────────────────────────────────── */
.av-size__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-5);
}
.av-size__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin: 0;
}
.av-size__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Row of chip tiles ───────────────────────────────────────────────── */
.av-size__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ── Chip tile ───────────────────────────────────────────────────────── */
.av-size__chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-heading);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}
.av-size__chip:hover {
  background: var(--color-primary);
  color: var(--color-primary-text);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.av-size__chip.is-active {
  background: var(--color-primary);
  color: var(--color-primary-text);
  border-color: var(--color-primary);
}
.av-size__chip.is-active:hover {
  /* Already inverted — keep it crisp without doubling the transform. */
  transform: translateY(-1px);
}

.av-size__chip-label {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ── Tablet (≤ 1024px) ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .av-size__title { font-size: var(--text-2xl); }
  .av-size__chip {
    width: 72px;
    height: 72px;
  }
  .av-size__chip-label { font-size: 22px; }
}

/* ── Mobile (≤ 768px) ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .av-size__title { font-size: var(--text-2xl); }
  .av-size__head { margin-bottom: var(--space-4); }
  /* Chips wrap to 2 rows of 3 (3 columns × 2 rows). */
  .av-size__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
  }
  .av-size__chip {
    width: 100%;
    height: 0;
    padding-bottom: 100%;          /* 1:1 via padding trick so the grid cell drives width */
  }
  .av-size__chip-label {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
  }
}

/* ── Small mobile (≤ 480px) ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .av-size__chip-label { font-size: 20px; }
}
