/*
 * FOK shop layout stability layer.
 * Keeps fixed-header anchors visible and prevents the featured card actions
 * from overflowing at desktop, tablet and mobile widths.
 */
html {
  overflow-x: clip;
}

.fok-public #shop {
  scroll-margin-top: calc(var(--header-height, 80px) + 28px);
  background: var(--fok-paper-2, #e7e2d8);
}

/* Keep the translated, closed cart panel inside its viewport container. */
.fok-public .cart-drawer {
  overflow: clip;
}

.fok-public .product-card .product-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.fok-public .product-card .product-bottom > :not(.button) {
  grid-column: 1 / -1;
  min-width: 0;
}

.fok-public .product-card .product-bottom > .button {
  width: 100%;
  min-width: 0;
  margin-left: 0;
  padding-inline: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

@media (max-width: 420px) {
  .fok-public .product-card .product-bottom {
    grid-template-columns: minmax(0, 1fr);
  }

  .fok-public .product-card .product-bottom > :not(.button) {
    grid-column: 1;
  }
}

/* Public shop cards: retain the existing light brand surface with explicit,
   paired text/background colours instead of inherited dark-theme colours. */
.fok-public #shop .product-card { color: #10141a; }
.fok-public #shop .product-card p,
.fok-public #shop .product-card .product-meta span,
.fok-public #shop .product-card .product-price small {
  color: #3d4856 !important;
}
.fok-public #shop .product-card .button.ghost {
  color: #10141a !important;
  background: #fffdf8 !important;
  border-color: #646c77 !important;
}
.fok-public #shop .product-card .button.ghost:hover,
.fok-public #shop .product-card .button.ghost:focus-visible {
  color: #fffdf8 !important;
  background: #10141a !important;
  border-color: #10141a !important;
}
.fok-public #shop .product-card .button.red {
  color: #fffdf8 !important;
  background: #10141a !important;
  border-color: #10141a !important;
}
.fok-public #shop .product-card .button.red:hover,
.fok-public #shop .product-card .button.red:focus-visible {
  color: #fffdf8 !important;
  background: #303844 !important;
  border-color: #303844 !important;
}
.fok-public #shop .product-card .button:focus-visible {
  outline: 3px solid #2149c9;
  outline-offset: 3px;
}

/* Purchase links land at actual product choices, below the fixed header. */
.fok-public #shop-products {
  scroll-margin-top: calc(var(--header-height, 80px) + 28px);
}
