:root {
  --cs-toolbar-offset: 0px;
  --cs-sticky-header-height: 0px;
  --cs-payment-disable-height: 0px;
}

/* Sticky puede fallar si algún ancestro tiene overflow hidden/auto/scroll */
.layout-container,
.layout-content,
.region-content,
main {
  overflow: visible;
}

/* Header completo sticky */
.user-logged-in .layout-container > header[role="banner"] {
  position: sticky;
  top: var(--cs-toolbar-offset);
  z-index: 300;
}

/* Bloque de aviso de límite de compra, debajo del header */
#block-clinicstore2026-custompaymentdisableblock {
  position: sticky;
  top: calc(var(--cs-toolbar-offset) + var(--cs-sticky-header-height));
  z-index: 290;
  background: #fff;
}

/* Tabs/local tasks, debajo del aviso */
#block-clinicstore2026-tabs {
  position: sticky;
  top: calc(
    var(--cs-toolbar-offset) +
    var(--cs-sticky-header-height) +
    var(--cs-payment-disable-height)
  );
  z-index: 280;
  background: #fff;
}

/* Sombra suave para separar las capas sticky */
.user-logged-in .layout-container > header[role="banner"],
#block-clinicstore2026-custompaymentdisableblock,
#block-clinicstore2026-tabs {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* El toolbar de administración debe quedar siempre por encima del header sticky */
#toolbar-administration,
#toolbar-bar,
.toolbar-tray,
.toolbar-menu-administration {
  z-index: 1000;
}
