/* Corrección localizada: la etiqueta conserva su nombre accesible. */
.wp-block-search__label.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
/* Cuando se hace visible con teclado: contraste alto y foco conservado. */
a.skip-link:focus {
  color: #0f3d1f !important;
  background: #fff !important;
  outline: 3px solid #0f3d1f !important;
  outline-offset: 3px;
}

/* Portada: recuperar los dos estados sin alterar la cabecera de rutas interiores. */
body.home.arom-site-layout.arom-d-espuma #masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color .25s ease, box-shadow .25s ease;
}
body.home.admin-bar.arom-site-layout.arom-d-espuma #masthead { top: 32px; }
body.home.arom-site-layout.arom-d-espuma #masthead .ast-primary-header-bar {
  background: transparent;
  transition: background-color .25s ease;
}
body.home.arom-site-layout.arom-d-espuma #masthead:not(.esp-header-scrolled) .custom-logo {
  filter: brightness(0) invert(1);
}
body.home.arom-site-layout.arom-d-espuma #masthead:not(.esp-header-scrolled) .menu-item > .menu-link {
  color: #fff;
}
body.home.arom-site-layout.arom-d-espuma #masthead:not(.esp-header-scrolled) .menu-toggle {
  color: #fff;
  border-color: #ffffff60;
}
body.home.arom-site-layout.arom-d-espuma #masthead.esp-header-scrolled {
  background: #fff;
  box-shadow: 0 1px 0 #dce8dc;
  backdrop-filter: none;
}
body.home.arom-site-layout.arom-d-espuma #masthead.esp-header-scrolled .custom-logo { filter: none; }
body.home.arom-site-layout.arom-d-espuma #masthead.esp-header-scrolled .menu-item > .menu-link { color: #173d25; }
body.home.arom-site-layout.arom-d-espuma #masthead.esp-header-scrolled .menu-toggle { color: #173d25; border-color: #173d2540; }
body.home.arom-site-layout.arom-d-espuma #masthead.esp-header-scrolled .menu-toggle .ast-mobile-svg { fill: currentColor; }
body.home.arom-site-layout.arom-d-espuma #masthead .menu-item.esp-menu-cta > .menu-link { color: #fff; }
body.arom-site-layout #masthead #ast-hf-mobile-menu .menu-item:not(.esp-menu-cta) > .menu-link { color: #173d25; }
body.arom-site-layout #masthead #ast-hf-mobile-menu .menu-item:not(.esp-menu-cta) > .menu-link:is(:hover,:focus-visible) { color: #9e3a6b; }
@media(max-width:782px) {
  body.home.admin-bar.arom-site-layout.arom-d-espuma #masthead { top: 46px; }
}
/* WordPress deja de fijar su barra de administración en pantallas pequeñas. */
@media(max-width:600px) {
  body.home.admin-bar.arom-site-layout.arom-d-espuma #masthead.esp-header-scrolled { top: 0; }
}
@media(prefers-reduced-motion:reduce) {
  body.home.arom-site-layout.arom-d-espuma #masthead,
  body.home.arom-site-layout.arom-d-espuma #masthead .ast-primary-header-bar { transition: none; }
}

/* Visor de ficha: el diálogo cabe en la ventana; el zoom se desplaza por dentro. */
dialog.arom-image-viewer {
  box-sizing: border-box;
  width: calc(100vw - 32px);
  max-width: 1400px;
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #d7e5d9;
  border-radius: 16px;
  background: #fff;
  color: #173d25;
  overflow: hidden;
  font-family: InstrumentSans, Arial, sans-serif;
}
dialog.arom-image-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
dialog.arom-image-viewer::backdrop { background: #0a2015c9; }
.arom-viewer-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid #d7e5d9; background: #fff; }
.arom-viewer-toolbar button { min-width: 44px; min-height: 44px; padding: 8px 12px; margin: 0; color: #173d25; border: 1px solid #aec8b3; border-radius: 8px; background: #f7faf5; font: 600 15px/1.2 InstrumentSans,Arial,sans-serif; }
.arom-viewer-toolbar button:hover { background: #e0efdf; }
.arom-viewer-toolbar button:disabled { opacity: .45; cursor: default; }
.arom-viewer-toolbar [hidden] { display: none !important; }
.arom-viewer-navigation { display: flex; gap: 6px; }
.arom-viewer-status { flex: 1 1 auto; font-size: 14px; text-align: center; }
.arom-viewer-viewport { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; background: #f7faf5; }
.arom-viewer-canvas { display: grid; place-items: center; box-sizing: border-box; padding: 20px; }
.arom-viewer-canvas img { display: block; max-width: none !important; max-height: none !important; object-fit: contain !important; transform: none !important; user-select: none; }
.arom-viewer-viewport.is-zoomed { cursor: grab; }
.arom-viewer-viewport.is-dragging { cursor: grabbing; }
.arom-image-viewer :focus-visible { outline: 3px solid #ad4479; outline-offset: -3px; }
@media(max-width:480px) {
  dialog.arom-image-viewer { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .arom-viewer-toolbar { gap: 5px; padding: 8px; }
  .arom-viewer-toolbar button { padding-inline: 8px; }
  .arom-viewer-status { flex-basis: 100%; order: 2; }
}
