/* =========================================================================
   STAFF PAGE BACKGROUNDS (monitoring pages, Admin Office)
   Loaded only when a background has been uploaded for the page group
   (body.has-page-bg). The header, category bar and footer stay exactly as
   on every other page; the image shows only in the page area, and the page
   content sits on a light sheet so it stays readable on any artwork.
   ========================================================================= */

body.has-page-bg { background: #f6f1e6; }

/* z-index -1 in the root stacking context: under the page content and
   under the opaque header and footer, above the page colour. */
.pg-bg {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.pg-bg__img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
  display: block;
}

body.page-bg--sheet .site-main {
  max-width: 1260px;
  padding: var(--space-6) var(--space-5) var(--space-7);
}
.pg-sheet {
  min-width: 0;
  background: rgba(251, 248, 240, 0.96);
  border: 1px solid rgba(160, 135, 90, 0.25);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(16, 36, 30, 0.06), 0 18px 48px rgba(15, 61, 44, 0.14);
  padding: var(--space-6) var(--space-6) var(--space-7);
}
/* Panels inside the sheet keep their own white surface. */
.pg-sheet .panel { box-shadow: 0 1px 2px rgba(16, 36, 30, 0.04); }

@media (max-width: 720px) {
  body.page-bg--sheet .site-main { padding: var(--space-3) var(--space-2) var(--space-6); }
  .pg-sheet { border-radius: 16px; padding: var(--space-4) var(--space-3) var(--space-5); }
}
@media print {
  .pg-bg { display: none; }
  .pg-sheet { background: none; border: 0; box-shadow: none; padding: 0; }
}

/* ---- Buyer (storefront) pages: the layout stays exactly as it is; a soft
   ivory veil over the image keeps headings and text readable. ---- */
.pg-bg--veil::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.66), rgba(250, 246, 238, 0.58));
}
/* The catalogue's own page background (Store settings) gives way to the buyer one. */
body.page-bg--veil.catalogue-page { background-image: none !important; }
