/* Payslashes Sprint 28 — additive storefront refinement. Built on Sprint 27 without replacing its card engine. */
article.pcv2-card > .pcv2-media {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%) !important;
  isolation: isolate;
}
article.pcv2-card .pcv2-image-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  padding: 10px !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #fff !important;
}
article.pcv2-card .pcv2-main-img,
article.pcv2-card .pcv2-hover-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: none !important;
  transform-origin: center !important;
  transition: opacity .24s ease, transform .28s ease !important;
}
article.pcv2-card:hover .pcv2-main-img { transform: scale(1.045) !important; }
article.pcv2-card .pcv2-hover-img { transform: scale(1.02) !important; }
article.pcv2-card:hover .pcv2-hover-img { transform: scale(1.055) !important; }

article.pcv2-card .pcv2-wishlist.is-animating {
  animation: psWishlistPulse .34s ease;
}
@keyframes psWishlistPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

article.pcv2-card .pcv2-compare {
  position: absolute !important;
  left: 12px !important;
  bottom: 12px !important;
  z-index: 8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border: 1px solid #d7e1ec !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.94) !important;
  color: #24436f !important;
  box-shadow: 0 7px 18px rgba(15,23,42,.10) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  backdrop-filter: blur(8px);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}
article.pcv2-card .pcv2-compare:hover,
article.pcv2-card .pcv2-compare:focus-visible {
  transform: translateY(-2px) !important;
  border-color: #0b9466 !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.14) !important;
  outline: none !important;
}
article.pcv2-card .pcv2-compare .ps-svg-icon { width: 14px; height: 14px; }

article.pcv2-card .pcv2-stock.is-low {
  background: #fff7e6 !important;
  color: #9a5800 !important;
  border: 1px solid #f3d49a !important;
}
article.pcv2-card .pcv2-stock.is-ready::before {
  content: "✓";
  margin-right: 4px;
  font-weight: 900;
}

.ps-storefront-toast {
  position: fixed;
  left: 50%;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 76px));
  z-index: 99999;
  transform: translate(-50%, 18px);
  min-width: min(320px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  background: #10233f;
  color: #fff;
  box-shadow: 0 18px 46px rgba(15,23,42,.28);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.ps-storefront-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 767px) {
  article.pcv2-card .pcv2-image-link { padding: 7px !important; }
  article.pcv2-card .pcv2-compare { left: 8px !important; bottom: 8px !important; min-height: 30px !important; padding: 0 8px !important; }
  article.pcv2-card .pcv2-compare span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  article.pcv2-card .pcv2-main-img,
  article.pcv2-card .pcv2-hover-img,
  article.pcv2-card .pcv2-compare,
  .ps-storefront-toast { transition: none !important; animation: none !important; }
}

/* Sprint 31: compact dynamic badge priority and collision safety */
.pcv2-badges {
    display: flex;
    flex-wrap: nowrap;
    gap: .42rem;
    max-width: calc(100% - 4.5rem);
    overflow: hidden;
}
.pcv2-badge {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pcv2-badge.out,
.pcv2-badge.limited,
.pcv2-badge.discount {
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .pcv2-badges { max-width: calc(100% - 3.65rem); gap: .3rem; }
    .pcv2-badge { max-width: 6.7rem; }
}


/* Sprint 33: controlled badge density and unclipped commerce footer */
article.pcv2-card .pcv2-badges {
  right: 4.65rem !important;
  max-width: calc(100% - 5.25rem) !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  align-items: center !important;
}
article.pcv2-card .pcv2-badge {
  max-width: 8.6rem !important;
  flex: 0 1 auto !important;
}
article.pcv2-card .pcv2-badge-more {
  flex: 0 0 auto !important;
  min-width: 2rem !important;
  justify-content: center !important;
  padding-inline: .55rem !important;
  background: #e8f5f1 !important;
  color: #0f766e !important;
  border: 1px solid rgba(15,118,110,.18) !important;
}
article.pcv2-card .pcv2-stock-row {
  display: grid !important;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: .45rem !important;
  overflow: visible !important;
}
article.pcv2-card .pcv2-stock,
article.pcv2-card .pcv2-shipping {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
article.pcv2-card .pcv2-commerce {
  padding-bottom: .7rem !important;
}
article.pcv2-card .pcv2-actions {
  margin-top: .15rem !important;
  padding-bottom: .05rem !important;
}
article.pcv2-card:hover,
article.pcv2-card:focus-within {
  border-color: rgba(16,185,129,.45) !important;
  box-shadow: 0 18px 38px rgba(15,23,42,.10) !important;
}
@media (max-width: 767px) {
  article.pcv2-card .pcv2-badges {
    right: 3.75rem !important;
    max-width: calc(100% - 4.2rem) !important;
    gap: .28rem !important;
  }
  article.pcv2-card .pcv2-badge { max-width: 5.8rem !important; }
  article.pcv2-card .pcv2-stock-row {
    grid-template-columns: 1fr !important;
    gap: .3rem !important;
  }
  article.pcv2-card .pcv2-stock,
  article.pcv2-card .pcv2-shipping {
    width: 100% !important;
    text-align: center !important;
  }
}

/* Sprint 34: balanced short rails and fully readable commerce chips */
@media (min-width: 768px) {
  [data-product-slider].is-short-rail,
  .ps-product-slider-track.is-short-rail,
  [data-product-slider]:not(:has(> :nth-child(4))),
  .ps-product-slider-track:not(:has(> :nth-child(4))) {
    justify-content: center !important;
    overflow-x: hidden !important;
    scroll-snap-type: none !important;
  }

  [data-product-slider].is-short-rail > *,
  .ps-product-slider-track.is-short-rail > *,
  [data-product-slider]:not(:has(> :nth-child(4))) > *,
  .ps-product-slider-track:not(:has(> :nth-child(4))) > * {
    flex: 0 0 clamp(250px, 24vw, 290px) !important;
    width: clamp(250px, 24vw, 290px) !important;
    min-width: clamp(250px, 24vw, 290px) !important;
    max-width: clamp(250px, 24vw, 290px) !important;
  }
}

article.pcv2-card .pcv2-badges {
  right: 3.85rem !important;
  max-width: calc(100% - 4.45rem) !important;
  gap: .32rem !important;
}
article.pcv2-card .pcv2-badge {
  max-width: 7.8rem !important;
  min-height: 21px !important;
  padding: 3px 6px !important;
  font-size: 9.5px !important;
}
article.pcv2-card .pcv2-badge-more {
  min-width: 1.8rem !important;
  padding-inline: .45rem !important;
}

article.pcv2-card > .pcv2-body,
article.pcv2-card .pcv2-commerce {
  overflow: visible !important;
}
article.pcv2-card .pcv2-delivery {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 28px !important;
  height: 28px !important;
  line-height: 1.15 !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
}
article.pcv2-card .pcv2-delivery span {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.15 !important;
}
article.pcv2-card .pcv2-delivery .ps-svg-icon {
  flex: 0 0 auto !important;
}
article.pcv2-card .pcv2-stock-row {
  display: flex !important;
  grid-template-columns: none !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: .35rem !important;
  overflow: visible !important;
  min-width: 0 !important;
}
article.pcv2-card .pcv2-stock,
article.pcv2-card .pcv2-shipping {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: calc(50% - .18rem) !important;
  min-width: 0 !important;
  padding-inline: 7px !important;
  font-size: 9.5px !important;
  line-height: 1.1 !important;
  text-align: left !important;
}
article.pcv2-card .pcv2-actions {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 767px) {
  article.pcv2-card .pcv2-badges {
    right: 3.35rem !important;
    max-width: calc(100% - 3.75rem) !important;
  }
  article.pcv2-card .pcv2-badge {
    max-width: 5.2rem !important;
    font-size: 8.5px !important;
  }
  article.pcv2-card .pcv2-delivery {
    min-height: 26px !important;
    height: 26px !important;
  }
  article.pcv2-card .pcv2-stock-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .25rem !important;
  }
  article.pcv2-card .pcv2-stock,
  article.pcv2-card .pcv2-shipping {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* Sprint 35: premium card consistency, accessible badge overflow and stronger action hierarchy */
article.pcv2-card {
  --pcv2-stage-height: 244px;
  isolation: isolate;
}
article.pcv2-card .pcv2-media,
article.pcv2-card .pcv2-image-link {
  min-height: var(--pcv2-stage-height) !important;
  height: var(--pcv2-stage-height) !important;
}
article.pcv2-card .pcv2-image-link {
  display: grid !important;
  place-items: center !important;
  padding: 18px 18px 34px !important;
  background: linear-gradient(180deg,#fff 0%,#fbfdff 100%) !important;
}
article.pcv2-card .pcv2-main-img,
article.pcv2-card .pcv2-hover-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: calc(var(--pcv2-stage-height) - 52px) !important;
  object-fit: contain !important;
  object-position: center !important;
}
article.pcv2-card .pcv2-title {
  min-height: 2.8em !important;
}
article.pcv2-card .pcv2-title a {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
}
article.pcv2-card .pcv2-badge-more {
  appearance: none !important;
  cursor: pointer !important;
  font: inherit !important;
}
article.pcv2-card .pcv2-badge-more:focus-visible {
  outline: 2px solid #0f766e !important;
  outline-offset: 2px !important;
}
article.pcv2-card .pcv2-badge-popover {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 132px;
  max-width: 210px;
  padding: 8px;
  border: 1px solid rgba(15,118,110,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 32px rgba(15,23,42,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  pointer-events: none;
}
article.pcv2-card .pcv2-badge-popover.is-open,
article.pcv2-card .pcv2-badge-more:hover + .pcv2-badge-popover,
article.pcv2-card .pcv2-badge-more:focus-visible + .pcv2-badge-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
article.pcv2-card .pcv2-badge-popover-item {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  background: #e8f5f1;
  color: #0f766e;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}
article.pcv2-card .pcv2-preview,
article.pcv2-card .pcv2-wishlist {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-color: #d8e3ef !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.08) !important;
}
article.pcv2-card .pcv2-compare {
  min-height: 36px !important;
  border-color: #d8e3ef !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.08) !important;
}
article.pcv2-card .pcv2-delivery,
article.pcv2-card .pcv2-stock,
article.pcv2-card .pcv2-shipping {
  min-height: 28px !important;
  align-items: center !important;
}
article.pcv2-card .pcv2-stock-row {
  flex-wrap: wrap !important;
}
article.pcv2-card .pcv2-stock,
article.pcv2-card .pcv2-shipping {
  max-width: 100% !important;
}
article.pcv2-card .pcv2-buy {
  box-shadow: 0 8px 18px rgba(5,150,105,.16) !important;
}
article.pcv2-card .pcv2-cart {
  background: #fff !important;
  color: #087a58 !important;
  border: 1px solid #10a774 !important;
}
article.pcv2-card .pcv2-cart:hover,
article.pcv2-card .pcv2-cart:focus-visible {
  background: #effcf7 !important;
}
article.pcv2-card .pcv2-view {
  background: transparent !important;
  color: #243b5a !important;
  border-color: #d4dfeb !important;
}
@media (min-width: 768px) {
  .ps-product-slider-shell.is-underfilled > [data-product-slider],
  .ps-product-slider-shell.is-underfilled > .ps-product-slider-track {
    justify-content: center !important;
    width: 100% !important;
    overflow: hidden !important;
  }
}
@media (max-width: 767px) {
  article.pcv2-card { --pcv2-stage-height: 190px; }
  article.pcv2-card .pcv2-image-link { padding: 12px 10px 32px !important; }
  article.pcv2-card .pcv2-main-img,
  article.pcv2-card .pcv2-hover-img { max-height: calc(var(--pcv2-stage-height) - 42px) !important; }
  article.pcv2-card .pcv2-badge-popover { max-width: 160px; }
}
