/**
 * asgard-shop-archive.css — v0.8.6 (clean rewrite)
 *
 * Replaces the previous 459-line file. Same external contract:
 *   - Class names preserved: .asgard-shop-archive, .asgard-shop-grid,
 *     .asgard-shop-card, .asgard-archive-buttons, .asgard-buy-button,
 *     .asgard-trial-button, .asgard-view-toggle, .asgard-section-tabs,
 *     .asgard-tab-btn, .asgard-product-section, etc.
 *   - Admin theme overrides via --fa-* CSS vars on the root element still
 *     work — they used to win because we wrote hardcoded fallbacks; they
 *     still win because the local --fa-* tokens read them when set.
 *
 * Match the design language of asgard-product-page-design.css and
 * asgard-checkout.css: scoped tokens, glass cards, primary cyan
 * accents, dark default + light theme override.
 */

/* ============================================================
 *  1. Theme tokens (scoped to .asgard-shop-archive)
 * ============================================================ */

.asgard-shop-archive,
.asgard-shop-archive {
  /* Surfaces */
  --fa-bg: hsl(222 47% 6%);
  --fa-card: hsl(222 47% 9%);
  --fa-glass-bg: hsl(222 47% 9% / 0.8);
  --fa-secondary: hsl(222 47% 14%);
  --fa-input: hsl(222 47% 14%);
  --fa-border: hsl(222 47% 18%);
  --fa-thumb-bg: hsl(222 47% 14%);

  /* Text */
  --fa-fg: hsl(210 40% 98%);
  --fa-muted: hsl(215 20% 55%);

  /* Accents */
  --fa-primary: hsl(199 89% 48%);
  --fa-primary-soft: hsl(199 89% 48% / 0.15);
  --fa-success: hsl(142 71% 45%);
  --fa-subscription-accent: hsl(199 89% 48%);
  --fa-ipbox-accent: hsl(142 71% 45%);

  /* Effects */
  --fa-radius-sm: 0.5rem;
  --fa-radius-md: 0.75rem;
  --fa-radius-lg: 1rem;
  --fa-glow: 0 0 30px hsl(199 89% 48% / 0.3);
  --fa-gradient-primary: linear-gradient(135deg, hsl(199 89% 48%), hsl(217 91% 60%));
  --fa-shadow-card: 0 1px 2px hsl(0 0% 0% / 0.18);
  --fa-shadow-card-hover: 0 12px 24px hsl(0 0% 0% / 0.32);

  /* Grid layout — overridden by inline style from PHP */
  --archive-columns-desktop: 3;
  --archive-columns-tablet: 2;
  --archive-columns-mobile: 1;
  --archive-gap: 24px;
  --archive-image-aspect: 16/9;

  /* When match_home_layout is on (opt-in) the archive lives outside the   */
  /* page-shell and needs its own max-width clamp. Otherwise the page-shell */
  /* (.asgard-page-shell--archive) controls width via CSS variables.    */
  margin-inline: auto;
  padding-inline: 1rem;

  color: var(--fa-fg);
}

.asgard-shop-archive--home-layout,
.asgard-shop-archive--home-layout {
  /* Home-layout (admin opt-in for full-bleed background) keeps the outer */
  /* WP block-group full-width but the inner content still caps at 1280. */
  max-width: 1280px;
}

body.asgard-theme-light .asgard-shop-archive,
body.asgard-theme-light .asgard-shop-archive,
body.asgard-theme-light .asgard-shop-archive,
body.asgard-theme-light .asgard-shop-archive {
  --fa-bg: hsl(210 40% 98%);
  --fa-card: hsl(0 0% 100%);
  --fa-glass-bg: hsl(0 0% 100% / 0.85);
  --fa-secondary: hsl(210 40% 94%);
  --fa-input: hsl(214 32% 91%);
  --fa-border: hsl(214 32% 85%);
  --fa-thumb-bg: hsl(210 40% 94%);
  --fa-fg: hsl(222 47% 11%);
  --fa-muted: hsl(215 20% 40%);
  --fa-shadow-card: 0 1px 3px hsl(222 47% 11% / 0.08);
  --fa-shadow-card-hover: 0 12px 24px hsl(222 47% 11% / 0.12);
}

/* ============================================================
 *  2. Page header
 * ============================================================ */

.asgard-shop-archive .page-header,
.asgard-shop-archive .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.asgard-shop-archive-header-actions,
.asgard-shop-archive-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* "Mitt konto"-shortcut in archive header (renders only when
   asgard_shop_settings.customer_portal_url is set). */
.asgard-portal-button,
.asgard-portal-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.6rem;
  background: var(--fa-card, transparent);
  border: 1px solid var(--fa-border, hsl(0 0% 100% / 0.18));
  color: var(--fa-fg, inherit);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.asgard-portal-button:hover,
.asgard-portal-button:hover,
.asgard-portal-button:focus-visible,
.asgard-portal-button:focus-visible {
  background: var(--fa-card-hover, hsl(0 0% 100% / 0.06));
  border-color: var(--fa-accent, hsl(217 91% 60%));
  color: var(--fa-fg, inherit);
}

.asgard-portal-button-icon,
.asgard-portal-button-icon {
  width: 1.05rem;
  height: 1.05rem;
  opacity: 0.85;
}

.asgard-shop-archive .page-title,
.asgard-shop-archive .page-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fa-fg);
}

.asgard-shop-archive .asgard-shop-archive-subtitle,
.asgard-shop-archive .asgard-shop-archive-subtitle,
.asgard-shop-archive .asgard-shop-archive-subtitle,
.asgard-shop-archive .asgard-shop-archive-subtitle {
  font-size: 1rem;
  color: var(--fa-muted);
  margin: 0.5rem 0 0;
}

/* ============================================================
 *  3. Renewal bar (existing customer CTA)
 * ============================================================ */

/* Card layout: text-block on the left, action-stack on the right.
   Wraps to a stacked column on narrow viewports. */
.asgard-renewal-bar,
.asgard-renewal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  border-radius: var(--fa-radius-md);
  background: linear-gradient(
    135deg,
    var(--fa-primary-soft) 0%,
    color-mix(in srgb, var(--fa-primary, hsl(199 89% 48%)) 4%, transparent) 100%
  );
  border: 1px solid color-mix(in srgb, var(--fa-primary, hsl(199 89% 48%)) 28%, transparent);
  color: var(--fa-fg);
}

.asgard-renewal-bar-text,
.asgard-renewal-bar-text {
  flex: 1 1 320px;
  min-width: 0;
}

.asgard-renewal-bar-title,
.asgard-renewal-bar-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--fa-fg);
}

.asgard-renewal-bar-title-icon,
.asgard-renewal-bar-title-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--fa-primary);
  flex: 0 0 auto;
}

.asgard-renewal-bar-description,
.asgard-renewal-bar-description {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: hsl(var(--asgard-muted-foreground, var(--asgard-muted-foreground, 220 9% 56%)));
  max-width: 56ch;
}

.asgard-renewal-bar-actions,
.asgard-renewal-bar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.asgard-renewal-bar-primary,
.asgard-renewal-bar-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: var(--fa-radius-sm);
  background: var(--fa-primary);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.asgard-renewal-bar-primary:hover,
.asgard-renewal-bar-primary:hover,
.asgard-renewal-bar-primary:focus-visible,
.asgard-renewal-bar-primary:focus-visible {
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px hsl(199 89% 48% / 0.35);
  background: hsl(199 89% 44%);
}

.asgard-renewal-bar-primary svg,
.asgard-renewal-bar-primary svg {
  width: 1.05rem;
  height: 1.05rem;
}

@media (max-width: 640px) {
  .asgard-renewal-bar,
  .asgard-renewal-bar {
    padding: 1.1rem 1.25rem;
    gap: 1rem;
  }
  .asgard-renewal-bar-actions,
  .asgard-renewal-bar-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .asgard-renewal-bar-primary,
  .asgard-renewal-bar-primary {
    justify-content: center;
    width: 100%;
  }
}

/* ============================================================
 *  4. View toggle (Grid / List / Showcase)
 * ============================================================ */

.asgard-view-toggle,
.asgard-view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: var(--fa-radius-md);
  background: var(--fa-secondary);
  border: 1px solid var(--fa-border);
}

.asgard-view-toggle .view-toggle-btn,
.asgard-view-toggle .view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--fa-muted);
  cursor: pointer;
  border-radius: var(--fa-radius-sm);
  transition: all 0.15s ease;
}

.asgard-view-toggle .view-toggle-btn:hover,
.asgard-view-toggle .view-toggle-btn:hover { color: var(--fa-fg); }

.asgard-view-toggle .view-toggle-btn.active,
.asgard-view-toggle .view-toggle-btn.active {
  background: var(--fa-card);
  color: var(--fa-primary);
  box-shadow: 0 1px 2px hsl(0 0% 0% / 0.15);
}

.asgard-view-toggle .view-toggle-btn svg,
.asgard-view-toggle .view-toggle-btn svg { width: 16px; height: 16px; }

.asgard-view-toggle .sr-only,
.asgard-view-toggle .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
 *  5. Section tabs (subscriptions / IPBox / All)
 * ============================================================ */

.asgard-section-tabs,
.asgard-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--fa-border);
}

.asgard-tab-btn,
.asgard-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--fa-muted);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  margin-bottom: -1px;
}

.asgard-tab-btn:hover,
.asgard-tab-btn:hover { color: var(--fa-fg); }

.asgard-tab-btn.active,
.asgard-tab-btn.active {
  color: var(--fa-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--fa-primary);
}

.asgard-tab-btn .asgard-tab-count,
.asgard-tab-btn .asgard-tab-count,
.asgard-tab-btn .asgard-tab-count,
.asgard-tab-btn .asgard-tab-count {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--fa-secondary);
  color: var(--fa-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.asgard-tab-btn.active .asgard-tab-count,
.asgard-tab-btn.active .asgard-tab-count,
.asgard-tab-btn.active .asgard-tab-count,
.asgard-tab-btn.active .asgard-tab-count {
  background: var(--fa-primary-soft);
  color: var(--fa-primary);
}

.asgard-tab-panel,
.asgard-tab-panel { animation: fa-archive-fade 0.2s ease; }

@keyframes fa-archive-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
 *  6. Section titles (separate-blocks mode)
 * ============================================================ */

.asgard-product-section,
.asgard-product-section { margin-bottom: 3rem; }

.asgard-product-section .asgard-section-title,
.asgard-product-section .asgard-section-title,
.asgard-product-section .asgard-section-title,
.asgard-product-section .asgard-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  color: var(--fa-fg);
}

.asgard-section-title--subscription {
  border-bottom: 2px solid var(--fa-subscription-accent);
}

.asgard-section-title--ipbox,
.asgard-section-title--ipbox {
  border-bottom: 2px solid var(--fa-ipbox-accent);
}

/* ============================================================
 *  7. Dropdown filter
 * ============================================================ */

.asgard-section-filter,
.asgard-section-filter {
  margin-bottom: 1.5rem;
}

.asgard-filter-select,
.asgard-filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-sm);
  background: var(--fa-input);
  color: var(--fa-fg);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
}

.asgard-filter-select:focus,
.asgard-filter-select:focus {
  outline: none;
  border-color: var(--fa-primary);
  box-shadow: 0 0 0 3px hsl(199 89% 48% / 0.15);
}

/* ============================================================
 *  8. Grid system (responsive)
 *     PHP writes the actual column counts inline (some browsers ignore
 *     repeat(var(--n), 1fr)). We provide safe defaults here.
 * ============================================================ */

.asgard-shop-grid,
.asgard-shop-grid {
  display: grid;
  gap: var(--archive-gap, 24px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .asgard-shop-grid,
  .asgard-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .asgard-shop-grid,
  .asgard-shop-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: calc(var(--archive-gap, 24px) * 0.75);
  }
}

.asgard-view-list.asgard-shop-grid,
.asgard-view-list.asgard-shop-grid,
.asgard-view-list.asgard-shop-grid,
.asgard-view-list.asgard-shop-grid { grid-template-columns: 1fr; }

/* ============================================================
 *  9. Product card
 * ============================================================ */

.asgard-shop-card,
.asgard-shop-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: var(--fa-radius-md);
  background: var(--fa-glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--fa-border);
  box-shadow: var(--fa-shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  list-style: none;
}

.asgard-shop-card:hover,
.asgard-shop-card:hover {
  transform: translateY(-2px);
  border-color: hsl(199 89% 48% / 0.5);
  box-shadow: var(--fa-shadow-card-hover);
}

.asgard-shop-card-thumb,
.asgard-shop-card-thumb {
  display: block;
  border-radius: var(--fa-radius-sm);
  overflow: hidden;
  background: var(--fa-thumb-bg);
  aspect-ratio: var(--archive-image-aspect, 16/9);
  /* Even on a wide column, cap thumb height so cards don't tower. */
  max-height: 240px;
  margin-bottom: 0.875rem;
}

.asgard-shop-card-thumb img,
.asgard-shop-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asgard-card-content,
.asgard-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.asgard-operator-badge,
.asgard-operator-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 9999px;
  background: var(--fa-primary-soft);
  color: var(--fa-primary);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

/* Selling badge (admin-set free text, e.g. "Mest sålda 🔥"). Meant to pop more
   than the operator badge — solid accent fill, no uppercase so emoji/casing
   read naturally. Hidden when the label is empty (not rendered server-side). */
.asgard-product-badge,
.asgard-product-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.5rem;
  border-radius: 9999px;
  background: var(--fa-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.asgard-shop-card .entry-title,
.asgard-shop-card .entry-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.375rem;
  line-height: 1.3;
  color: var(--fa-fg);
}

.asgard-shop-card .entry-title a,
.asgard-shop-card .entry-title a {
  color: var(--fa-fg);
  text-decoration: none;
}

.asgard-shop-card .entry-title a:hover,
.asgard-shop-card .entry-title a:hover { color: var(--fa-primary); }

.asgard-shop-card .price,
.asgard-shop-card .price {
  margin: 0 0 0.875rem;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--fa-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.asgard-shop-card .price.price--muted,
.asgard-shop-card .price.price--muted {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--fa-muted);
  background: none;
  -webkit-text-fill-color: var(--fa-muted);
}

/* ============================================================
 *  10. Card buttons (Köp / Testa)
 * ============================================================ */

.asgard-archive-buttons,
.asgard-archive-buttons {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-top: auto;
  width: 100%;
}

.asgard-buy-button,
.asgard-buy-button,
.asgard-trial-button,
.asgard-trial-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: var(--fa-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease;
  border: 1px solid transparent;
  text-align: center;
  line-height: 1.2;
}

.asgard-buy-button,
.asgard-buy-button {
  background: var(--fa-gradient-primary);
  color: white;
  border-color: transparent;
}

.asgard-buy-button:hover,
.asgard-buy-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--fa-primary, hsl(199 89% 48%)) 40%, transparent);
  color: white;
}

.asgard-trial-button,
.asgard-trial-button {
  background: transparent;
  color: var(--fa-primary);
  border-color: hsl(199 89% 48% / 0.5);
}

.asgard-trial-button:hover,
.asgard-trial-button:hover {
  background: var(--fa-primary-soft);
  border-color: var(--fa-primary);
  color: var(--fa-primary);
}

/* ============================================================
 *  11. List view — horizontal layout for each card
 * ============================================================ */

.asgard-view-list .asgard-shop-card,
.asgard-view-list .asgard-shop-card,
.asgard-view-list .asgard-shop-card,
.asgard-view-list .asgard-shop-card {
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
}

.asgard-view-list .asgard-shop-card-thumb,
.asgard-view-list .asgard-shop-card-thumb,
.asgard-view-list .asgard-shop-card-thumb,
.asgard-view-list .asgard-shop-card-thumb {
  flex: 0 0 200px;
  margin-bottom: 0;
  aspect-ratio: var(--archive-image-aspect, 16/9);
}

.asgard-view-list .asgard-card-content,
.asgard-view-list .asgard-card-content,
.asgard-view-list .asgard-card-content,
.asgard-view-list .asgard-card-content {
  padding: 0;
}

.asgard-view-list .asgard-archive-buttons,
.asgard-view-list .asgard-archive-buttons,
.asgard-view-list .asgard-archive-buttons,
.asgard-view-list .asgard-archive-buttons {
  margin-top: auto;
  max-width: 320px;
}

@media (max-width: 640px) {
  .asgard-view-list .asgard-shop-card,
  .asgard-view-list .asgard-shop-card,
  .asgard-view-list .asgard-shop-card,
  .asgard-view-list .asgard-shop-card { flex-direction: column; }
  .asgard-view-list .asgard-shop-card-thumb,
  .asgard-view-list .asgard-shop-card-thumb,
  .asgard-view-list .asgard-shop-card-thumb,
  .asgard-view-list .asgard-shop-card-thumb {
    flex: 0 0 auto;
    margin-bottom: 0.875rem;
  }
}

/* ============================================================
 *  12. Empty state
 * ============================================================ */

.asgard-empty-state,
.asgard-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  border-radius: var(--fa-radius-lg);
  background: var(--fa-glass-bg);
  border: 1px solid var(--fa-border);
}

.asgard-empty-msg,
.asgard-empty-msg {
  font-size: 1.125rem;
  color: var(--fa-fg);
  margin: 0 0 1rem;
}

.asgard-empty-state p,
.asgard-empty-state p {
  color: var(--fa-muted);
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
}

.asgard-empty-state a,
.asgard-empty-state a {
  color: var(--fa-primary);
  text-decoration: underline;
}

/* ============================================================
 *  13. Pagination (WP default styling override)
 * ============================================================ */

.asgard-shop-archive .pagination,
.asgard-shop-archive .pagination,
.asgard-shop-archive .nav-links,
.asgard-shop-archive .nav-links,
.asgard-shop-archive .navigation,
.asgard-shop-archive .navigation {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.asgard-shop-archive .page-numbers,
.asgard-shop-archive .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: var(--fa-radius-sm);
  background: var(--fa-secondary);
  color: var(--fa-fg);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--fa-border);
}

.asgard-shop-archive .page-numbers:hover,
.asgard-shop-archive .page-numbers:hover { border-color: var(--fa-primary); }

.asgard-shop-archive .page-numbers.current,
.asgard-shop-archive .page-numbers.current {
  background: var(--fa-primary);
  color: white;
  border-color: var(--fa-primary);
}

/* ============================================================
 *  14. Home-layout match (full-width hero stretch)
 * ============================================================ */

.asgard-shop-archive--home-layout,
.asgard-shop-archive--home-layout {
  margin-block: 1.5rem 2rem;
  margin-inline: 0;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
}

/* ============================================================
 *  15. Mobile tweaks
 * ============================================================ */

@media (max-width: 640px) {
  .asgard-shop-archive .page-header,
  .asgard-shop-archive .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .asgard-shop-archive .page-title,
  .asgard-shop-archive .page-title {
    font-size: 1.5rem;
  }

  .asgard-shop-card,
  .asgard-shop-card { padding: 0.875rem; }
  .asgard-shop-card .entry-title,
  .asgard-shop-card .entry-title { font-size: 1rem; }
}

/* ============================================================
 *  12. IPBox section — premium "hardware" treatment on the shop
 *      landing so the box choice matches the gold [asgard_pricing]
 *      tables above. Scoped to the landing's separate-blocks ipbox
 *      section only; tabs/all/list views keep the default blue theme.
 * ============================================================ */
.asgard-product-section[data-section-type="ipbox"],
.asgard-product-section[data-section-type="ipbox"] {
  /* Brand kit can override via --fa-box-accent (set on .asgard-shop-archive). */
  --fa-box-gold: var(--fa-box-accent, #e3b23c);
}

/* A lone box product should read as an intentional showcase, not a stray
   1/3-width card. Centre and cap the card width; extra boxes still flow. */
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-grid,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-grid,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-grid,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center;
}

.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card {
  background: var(--fa-box-card-bg, radial-gradient(130% 130% at 0% 0%, #1c1f29 0%, #14161c 62%));
  border-color: rgba(255, 255, 255, 0.08);
}
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card:hover {
  border-color: color-mix(in srgb, var(--fa-box-gold) 55%, transparent);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb {
  background: var(--fa-box-thumb-bg, #0f1116);
  border: 1px solid rgba(255, 255, 255, 0.06);
  /* IPBox products are physical devices shot as tall, upright renders (e.g. the
     Formuler box is 658x1920). A 16/9 frame with object-fit:cover crops the box
     away to an invisible middle strip. Use a squarer frame and contain so the
     whole device is always visible, centred on the dark thumb background. */
  aspect-ratio: 1 / 1;
  max-height: 360px;
}
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb img,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb img,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb img,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card-thumb img {
  object-fit: contain;
  object-position: center;
  padding: 0.75rem;
}
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a {
  color: #f5f5f7;
}
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .entry-title a:hover {
  color: var(--fa-box-gold);
}
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .price,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .price,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .price,
.asgard-product-section[data-section-type="ipbox"] .asgard-shop-card .price {
  background: none;
  -webkit-text-fill-color: var(--fa-box-gold);
  color: var(--fa-box-gold);
  font-size: 1.05rem;
}
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button,
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button,
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button,
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button {
  background: var(--fa-box-gold);
  color: var(--fa-box-button-fg, #1a1205);
  border-radius: 999px;
}
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button:hover,
.asgard-product-section[data-section-type="ipbox"] .asgard-buy-button:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--fa-box-gold, #e3b23c) 40%, transparent);
  color: var(--fa-box-button-fg, #1a1205);
}
