/* FC Ecom Suite 7.0.219 / Product Base 0.3.202.
 * Shell geometry only. Printed before the shop markup and reused as an asset.
 * Desktop columns must be identical before/after JS; card internals are untouched.
 */
@media (min-width: 1230px) {
  :is(.brxe-fc-shop-grid, .fcepb-fc-shop-grid) [data-fluent-cart-product-wrapper-inner][data-live-filter="1"] {
    display: grid !important;
    grid-template-columns: var(--fcepb-desktop-sidebar-width, clamp(220px, 22%, 280px)) minmax(0, 1fr) !important;
    column-gap: var(--fcepb-desktop-sidebar-gap, 30px) !important;
    grid-auto-flow: row !important;
    align-items: start !important;
  }
  :is(.brxe-fc-shop-grid, .fcepb-fc-shop-grid) [data-live-filter="1"] > [data-fluent-cart-shop-app-filter-wrapper] {
    grid-area: 1 / 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: block !important;
  }
  :is(.brxe-fc-shop-grid, .fcepb-fc-shop-grid) [data-live-filter="1"] > [data-fluent-cart-shop-app-product-list] {
    grid-area: 1 / 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* Conceal the outgoing popup before JS runs at the boundary. Clipping cannot
     be undone by legacy inline visibility/opacity writes during staging. */
  .fcepb-compact-filter-shell,
  [data-fluent-cart-shop-app-filter-wrapper][data-fcepb-compact-filter-open="1"],
  [data-fluent-cart-shop-app-filter-wrapper][data-fcepb-desktop-return-staging] {
    clip-path: inset(100%) !important;
    pointer-events: none !important;
  }
}
/* Popover changes the paint layer, never FluentCart's DOM parent. */
[data-fluent-cart-shop-app-filter-wrapper][data-fcepb-filter-popover-owned]::backdrop {
  background: transparent !important;
  pointer-events: none !important;
}

/* 7.0.220: keep the in-place popup content aligned with its shell header on
 * every resize, even when compact mode and popup health remain unchanged.
 * Geometry changes through CSS, without closing/reopening or moving the form.
 * Desktop rules and the desktop-return controller above remain unchanged.
 */
@media (max-width: 1229px) {
  [data-fluent-cart-shop-app-filter-wrapper][data-fcepb-compact-filter-open="1"] {
    --fcepb-compact-filter-panel-width: min(420px, 100vw);
  }
}
@media (max-width: 767px) {
  [data-fluent-cart-shop-app-filter-wrapper][data-fcepb-compact-filter-open="1"] {
    --fcepb-compact-filter-panel-width: 100vw;
  }
}
