/* Imágenes de catálogo: usar el espacio de la tarjeta sin recortar la pieza. */
.shopPage .productMedia img,
.homePage .productMedia img {
  width: 94% !important;
  height: 94% !important;
  object-fit: contain !important;
  object-position: center !important;
  image-rendering: auto !important;
}
.shopPage .productMedia img.is-tall,
.homePage .productMedia img.is-tall {
  width: 83% !important;
  height: 96% !important;
}
.shopPage .productMedia img.is-wide,
.homePage .productMedia img.is-wide {
  width: 98% !important;
  height: 84% !important;
}
.shopPage .productMedia img.is-squareish,
.homePage .productMedia img.is-squareish {
  width: 94% !important;
  height: 94% !important;
}
.productPageBody .detailMedia img {
  width: 93% !important;
  height: 93% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  image-rendering: auto !important;
}
.productPageBody .detailMedia img.is-tall {
  width: 80% !important;
  height: 96% !important;
}
.productPageBody .detailMedia img.is-wide {
  width: 98% !important;
  height: 82% !important;
}

/* El botón ocupa espacio real dentro de la tarjeta y nunca queda recortado. */
.productCard {
  display: flex !important;
  flex-direction: column;
  height: auto !important;
  overflow: visible !important;
  contain: layout style !important;
}
.productCard .productMedia { flex: 0 0 auto; }
.productCard .productBody {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
  padding-bottom: 18px;
}
.productCard .productAction {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: min(100%, 210px);
  min-height: 46px;
  margin: 16px auto 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
  transform: translateY(12px) scale(.96) !important;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility .25s ease, box-shadow .2s ease !important;
}
@media (hover: hover) and (pointer: fine) {
  .productCard:hover .productAction,
  .productCard:focus-within .productAction {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    transform: translateY(0) scale(1) !important;
  }
  .productCard .productAction:hover { transform: translateY(-2px) scale(1.02) !important; }
}
@media (hover: none), (pointer: coarse), (max-width: 780px) {
  .productCard .productAction {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    transform: none !important;
    width: 100%;
    margin-top: 12px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .productCard .productAction { transition: none !important; }
}

.productCard .productAction { white-space: nowrap !important; font-size: 11px !important; }
.productCard .productAction::before,
.productCard .productAction::after { content: none !important; display: none !important; }

/* Centrar el botón respecto de la tarjeta completa, sin depender del ancho del cuerpo. */
.productCard {
  position: relative !important;
  padding-bottom: 76px !important;
}
.productCard .productBody {
  width: 100% !important;
  box-sizing: border-box;
  padding-left: 16px !important;
  padding-right: 16px !important;
}
.productCard .productAction {
  position: absolute !important;
  left: 50% !important;
  bottom: 16px !important;
  width: calc(100% - 32px) !important;
  max-width: 210px;
  margin: 0 !important;
  box-sizing: border-box;
  text-align: center !important;
  transform: translate(-50%, 12px) scale(.96) !important;
}
@media (hover: hover) and (pointer: fine) {
  .productCard:hover .productAction,
  .productCard:focus-within .productAction { transform: translate(-50%, 0) scale(1) !important; }
  .productCard .productAction:hover { transform: translate(-50%, -2px) scale(1.02) !important; }
}
@media (hover: none), (pointer: coarse), (max-width: 780px) {
  .productCard .productAction { transform: translate(-50%, 0) !important; }
}
@media (max-width: 390px) {
  .productCard .productAction { width: calc(100% - 20px) !important; font-size: 9px !important; }
}

/* Botón fijo dentro de la tarjeta: sin desplazamiento al pasar, enfocar o seleccionar. */
.productCard {
  padding-bottom: 0 !important;
}
.productCard .productBody {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: center !important;
}
.productCard .productBody .productAction,
.productCard:hover .productBody .productAction,
.productCard:focus-within .productBody .productAction,
.productCard .productBody .productAction:hover,
.productCard .productBody .productAction:focus-visible,
.productCard .productBody .productAction:active {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 210px !important;
  margin: auto auto 0 !important;
  transform: none !important;
}

/* Acción principal moderna y estable. */
.productCard .productBody .productAction {
  min-height: 48px !important;
  padding: 11px 15px !important;
  gap: 9px !important;
  border: 1px solid rgba(255, 255, 255, .3) !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #086ff1 0%, #0459cf 100%) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  letter-spacing: -.01em !important;
  box-shadow: 0 8px 18px rgba(5, 89, 207, .22), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
  transition: background .18s ease, box-shadow .18s ease, filter .18s ease !important;
}
.productCard .productBody .productAction .productActionIcon {
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  padding: 4px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .16) !important;
  box-sizing: border-box !important;
}
.productCard:hover .productBody .productAction,
.productCard:focus-within .productBody .productAction,
.productCard .productBody .productAction:hover {
  background: linear-gradient(135deg, #087cff 0%, #064fc0 100%) !important;
  box-shadow: 0 10px 22px rgba(5, 89, 207, .3), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
  filter: saturate(1.06) !important;
  transform: none !important;
}
.productCard .productBody .productAction:active {
  background: linear-gradient(135deg, #055fcf 0%, #0349aa 100%) !important;
  box-shadow: 0 4px 10px rgba(5, 73, 170, .22), inset 0 2px 4px rgba(0, 26, 77, .18) !important;
  filter: none !important;
  transform: none !important;
}
.productCard .productBody .productAction:focus-visible {
  outline: 3px solid rgba(8, 124, 255, .32) !important;
  outline-offset: 3px !important;
}
@media (max-width: 480px) {
  .productCard .productBody .productAction {
    min-height: 44px !important;
    padding: 9px 10px !important;
    gap: 6px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
  }
  .productCard .productBody .productAction .productActionIcon {
    width: 21px !important;
    height: 21px !important;
    flex-basis: 21px !important;
  }
}
