/* =============================================================
   BRAND MARKETPLACE — mobile / tablet adjustments
   ============================================================= */

@media (max-width: 1024px) {
  .multiplier-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .tier-card {
    padding: var(--space-xl);
  }
}

@media (max-width: 900px) {
  .multiplier-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Match the bento layout's horizontal extent on mobile — listings
     hug the viewport edges with the same minimal padding the homepage
     uses for its bento cards. */
  .listings-section > .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .brand-listings {
    gap: 10px;
  }

  .brand-card {
    padding: 18px;
    border-radius: var(--radius-2xl);
  }

  .brand-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .brand-price-tag {
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
  }

  .brand-metrics-strip {
    grid-template-columns: 1fr 1fr;
  }

  .brand-metric-cell + .brand-metric-cell::before {
    display: none;
  }

  .brand-metric-cell:nth-child(odd) {
    box-shadow: inset -1px 0 0 0 rgba(255, 255, 255, 0.04);
  }

  .brand-metric-cell:nth-child(-n+2) {
    box-shadow:
      inset 0 -1px 0 0 rgba(255, 255, 255, 0.04),
      inset -1px 0 0 0 rgba(255, 255, 255, 0.04);
  }

  .brand-metric-cell:nth-child(2) {
    box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.04);
  }

  .seller-cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .brand-modal {
    padding: 0;
  }

  .brand-modal__panel {
    border-radius: 0;
    min-height: 100vh;
    max-width: 100%;
  }

  .brand-modal__header,
  .modal-pricing-banner,
  .modal-includes,
  .modal-body,
  .brand-modal__footer {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .brand-modal__title-block h2 {
    font-size: var(--text-xl);
  }

  .brand-modal__title-block .brand-logo {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .modal-pricing-banner__group {
    flex-wrap: wrap;
    gap: 18px;
  }

  .modal-pricing-divider {
    display: none;
  }

  .modal-pricing-stat__value {
    font-size: var(--text-2xl);
  }

  .modal-tier-pill {
    align-self: flex-start;
  }

  .metric-pills--grid {
    grid-template-columns: 1fr;
  }

  /* Let each section heading + its subtitle stack instead of the subtitle
     ("Last 3 months + current", etc.) getting clipped beside the title. */
  .modal-section__header {
    flex-wrap: wrap;
  }

  .modal-section__sub {
    margin-left: 0;
  }

  /* Data tables — the Revenue table is 5 columns wide (label + 4 months),
     which overflowed a phone at the desktop cell metrics, so the wrapper
     scrolled and the last column clipped mid-cell (looked "cropped").
     Tighten cell padding + font so the natural width fits a normal phone
     (375px+): the table then fills its wrapper (width:100%) and columns
     spread evenly. min-width:max-content is kept from the base rule, so on
     very narrow (≤320px) screens the wrapper still scrolls rather than
     wrapping the numbers — a graceful fallback, not the default. */
  .data-table th,
  .data-table td {
    padding: 9px 6px;
    font-size: var(--text-xs);
    white-space: nowrap;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    padding-left: 2px;
  }

  .data-table th:last-child,
  .data-table td:last-child {
    padding-right: 2px;
  }

  .traffic-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .traffic-bar__legend {
    justify-content: space-between;
  }

  .brand-modal__footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .brand-modal__footer .btn {
    width: 100%;
  }
}
