/* IM_PANEL_QUICK_ACCESS_FIX_V1 */
/*
  Arregla los enlaces de "Accesos rápidos" del panel.
  Los convierte en botones separados, legibles y responsive.
*/

html body main a.pm-quick-access-link,
html body .pm-main a.pm-quick-access-link,
html body .pm-panel a.pm-quick-access-link,
html body [class*="panel"] a.pm-quick-access-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  margin: 8px 8px 0 0 !important;
  padding: 0 16px !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #006c61 !important;
  -webkit-text-fill-color: #006c61 !important;
  font-size: 14px !important;
  font-weight: 620 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06) !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease !important;
}

html body main a.pm-quick-access-link:hover,
html body .pm-main a.pm-quick-access-link:hover,
html body .pm-panel a.pm-quick-access-link:hover,
html body [class*="panel"] a.pm-quick-access-link:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(0, 108, 97, .22) !important;
  background: #f6fffd !important;
  color: #00594f !important;
  -webkit-text-fill-color: #00594f !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .09) !important;
}

html body main a.pm-quick-access-link:focus-visible {
  outline: 3px solid rgba(255, 90, 61, .22) !important;
  outline-offset: 2px !important;
}

/* Acción principal: subir producto */
html body main a.pm-quick-access-link[href*="/panel/anuncios/nuevo"],
html body .pm-main a.pm-quick-access-link[href*="/panel/anuncios/nuevo"],
html body .pm-panel a.pm-quick-access-link[href*="/panel/anuncios/nuevo"],
html body [class*="panel"] a.pm-quick-access-link[href*="/panel/anuncios/nuevo"] {
  border-color: transparent !important;
  background: linear-gradient(135deg, #ff5a3d 0%, #ff7a45 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(255, 90, 61, .22) !important;
}

html body main a.pm-quick-access-link[href*="/panel/anuncios/nuevo"]:hover,
html body .pm-main a.pm-quick-access-link[href*="/panel/anuncios/nuevo"]:hover,
html body .pm-panel a.pm-quick-access-link[href*="/panel/anuncios/nuevo"]:hover,
html body [class*="panel"] a.pm-quick-access-link[href*="/panel/anuncios/nuevo"]:hover {
  background: linear-gradient(135deg, #f04d32 0%, #ff6d3b 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Si el navegador soporta :has, ordena el bloque entero */
html body main :is(div, section, article, .card, .pm-card):has(> a.pm-quick-access-link),
html body .pm-main :is(div, section, article, .card, .pm-card):has(> a.pm-quick-access-link) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0 !important;
}

html body main :is(div, section, article, .card, .pm-card):has(> a.pm-quick-access-link) > :is(h1, h2, h3, h4, strong, p):first-child,
html body .pm-main :is(div, section, article, .card, .pm-card):has(> a.pm-quick-access-link) > :is(h1, h2, h3, h4, strong, p):first-child {
  flex: 0 0 100% !important;
  margin-bottom: 4px !important;
}

/* Móvil */
@media (max-width: 640px) {
  html body main a.pm-quick-access-link,
  html body .pm-main a.pm-quick-access-link,
  html body .pm-panel a.pm-quick-access-link,
  html body [class*="panel"] a.pm-quick-access-link {
    width: 100% !important;
    margin: 8px 0 0 0 !important;
  }
}
