/* PFL-PRODUCTION-POLISH-R384
 * Targeted mobile navigation, storefront-density, ambient-continuity, and
 * prelaunch-note corrections. This layer is intentionally narrow and
 * removable; it does not alter product, commerce, legal, or lot data.
 */

/* Preserve the shared Home atmosphere on internal pages without running the
 * animated canvas there. The fixed CSS texture has no animation loop. */
html body:not(.home) .pfl-site-ambient {
  background-image:
    radial-gradient(rgba(150, 175, 205, .055) 1px, transparent 1.7px),
    radial-gradient(1700px 1120px at 50% -10%, #20384f 0%, #16273d 47%, #101e30 100%) !important;
  background-position: 0 0, 0 0 !important;
  background-repeat: repeat, no-repeat !important;
  background-size: 32px 32px, 100% 100% !important;
}

/* A fixed body is required to preserve the document position while the
 * full-screen mobile drawer is open. JavaScript supplies the saved offset. */
@media (max-width: 880px) {
  html.pfl-r384-nav-locked {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  html.pfl-r384-nav-locked body {
    position: fixed !important;
    inset-inline: 0 !important;
    top: var(--pfl-r384-scroll-offset, 0px) !important;
    width: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none;
  }
}

/* Keep the product bottle dominant on phone-width catalog views. The former
 * 390px breakpoint halved card width after a one-pixel viewport change. */
@media (min-width: 390px) and (max-width: 519px) {
  html body.pfl-quality-r328.page-id-520 #inner-wrap #pfl-home .pfl-shop-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }

  html body.pfl-quality-r328.page-id-520 #inner-wrap #pfl-home .pfl-shop-card-meta {
    gap: 12px !important;
    padding: 18px !important;
  }

  html body.pfl-quality-r328.page-id-520 #inner-wrap #pfl-home .pfl-shop-card-head {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    min-block-size: 0 !important;
  }

  html body.pfl-quality-r328.page-id-520 #inner-wrap #pfl-home .pfl-shop-card-name {
    font-size: 18px !important;
    line-height: 1.2 !important;
    overflow-wrap: normal !important;
  }

  html body.pfl-quality-r328.page-id-520 #inner-wrap #pfl-home .pfl-shop-card-price {
    font-size: 16px !important;
  }

  html body.pfl-quality-r328.page-id-520 #inner-wrap #pfl-home .pfl-shop-card-status {
    min-block-size: 0 !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  html body.pfl-quality-r328.page-id-520 #inner-wrap #pfl-home .pfl-shop-card-action {
    min-height: 44px !important;
    padding-inline: 12px !important;
    font-size: 13.5px !important;
  }
}

/* This sentence carries release-status meaning and must not read like legal
 * fine print on a phone. */
@media (max-width: 640px) {
  html body.home #pfl-home-r256.pfl-home-r256 .pfl-r281-proof-note {
    max-width: 48ch !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
    letter-spacing: .045em !important;
  }

  html body:not(.home) .pfl-site-ambient {
    background-size: 36px 36px, 100% 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.pfl-r384-nav-locked {
    scroll-behavior: auto !important;
  }
}
