/*
 * First Cradle Shop category navigation — v1.7
 * Presentation-only. Does not modify categories, links, counts, inventory,
 * city filters, product search or the request-booking flow.
 *
 * The Astra child theme deliberately sets mobile category pills to a
 * horizontally scrolling, non-wrapping flex row. On small screens this
 * hides most choices off-screen. Override only that navigation region.
 */
@media (max-width: 921px) {
  .fc-shop-filters .fc-category-chips {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    flex-wrap: wrap !important;
    align-items: stretch;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: auto;
    padding: 0 0 4px !important;
    box-sizing: border-box;
  }

  .fc-shop-filters .fc-category-chips > .fc-chip {
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    padding: 10px 9px !important;
    border-radius: 16px;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.3;
    scroll-snap-align: none !important;
  }

  /* If the total number of categories is odd, avoid a lone half-width tile. */
  .fc-shop-filters .fc-category-chips > .fc-chip:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .fc-shop-filters .fc-category-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .fc-shop-filters .fc-category-chips > .fc-chip:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (min-width: 768px) and (max-width: 921px) {
  .fc-shop-filters .fc-category-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .fc-shop-filters .fc-category-chips > .fc-chip:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/*
 * v1.8 — The existing Astra header city selector is the single city control.
 * The child theme outputs a second, static .fc-selected-city label inside
 * the Shop search form. Hide only that redundant label, at ALL widths.
 * Do not hide or change the global city selector or city-based filtering.
 */
/* This stylesheet is enqueued only for WooCommerce Shop/category archives. */
.fc-shop-filters .fc-search-form > .fc-selected-city {
  display: none !important;
}
