/* ==========================================================================
   WooGrub — shop.css
   Shop/menu page: page-level layout and any overrides specific to the
   full shop page context (as opposed to component-level card/nav styles).
   ========================================================================== */

/* ── Page shell ──────────────────────────────────────────────────────────── */
.wg-shop-page {
  background-color: var(--wg-bg);
  min-height: 60vh;
}

/* ── Content area ────────────────────────────────────────────────────────── */
.wg-shop-content {
  padding-block: var(--wg-space-6);
  padding-inline: var(--wg-space-4);
  max-width: 1100px;
  margin-inline: auto;
  width: 100%;
}

@media (min-width: 640px) {
  .wg-shop-content {
    padding-inline: var(--wg-space-6);
  }
}

@media (min-width: 768px) {
  .wg-shop-content {
    padding-block: var(--wg-space-8);
    padding-inline: var(--wg-space-8);
  }
}

@media (min-width: 1280px) {
  .wg-shop-content {
    padding-inline: var(--wg-space-12);
  }
}

/* ── Category section spacing ────────────────────────────────────────────── */
/* Fine-tunes the spacing defined in layout.css for the shop context */
.wg-category-section + .wg-category-section {
  margin-block-start: var(--wg-space-10);
  padding-block-start: var(--wg-space-10);
}

/* ── Category title ──────────────────────────────────────────────────────── */
.wg-category-title {
  display: flex;
  align-items: baseline;
  gap: var(--wg-space-3);
}

/* Divider line filling the remaining width next to the category name */
.wg-category-title::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background-color: var(--wg-border);
  align-self: center;
}

/* Product count badge next to category title */
.wg-category-title__count {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--wg-text-muted);
}

/* ── Loading state ───────────────────────────────────────────────────────── */
/* Shown briefly if JS needs to do anything before first render */
.wg-shop-page.is-loading .wg-product-grid {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Out-of-stock badge (if ever shown inline) ───────────────────────────── */
.wg-product-card--out-of-stock {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Dark mode ───────────────────────────────────────────────────────────── */
[data-theme="dark"] .wg-shop-page {
  background-color: var(--wg-bg);
}
