/**
 * M6 mobile refinement patch.
 * Intentionally scoped to the IRPremium shop archive and small screens only.
 */
@media (max-width: 700px) {
  body.irp-shop-active {
    overflow-x: hidden;
  }

  body.irp-shop-active .irp-shop {
    --irp-shop-mobile-edge: 12px;
    font-size: 13px;
  }

  body.irp-shop-active .irp-shop a,
  body.irp-shop-active .irp-shop a:hover,
  body.irp-shop-active .irp-shop-card-link,
  body.irp-shop-active .irp-shop-card-link:hover,
  body.irp-shop-active .irp-shop-card h2 {
    text-decoration: none !important;
  }

  body.irp-shop-active .irp-shop-container {
    width: min(calc(100% - 24px), 520px) !important;
  }

  body.irp-shop-active .irp-shop-hero {
    padding: 16px 0 18px !important;
  }

  body.irp-shop-active .irp-shop-hero::before {
    width: 340px;
    height: 340px;
    left: -155px;
    top: -195px;
    opacity: .72;
  }

  body.irp-shop-active .irp-shop-breadcrumb {
    gap: 5px;
    font-size: 10px !important;
    line-height: 1.6;
  }

  body.irp-shop-active .irp-shop-hero-grid {
    gap: 10px;
    margin-top: 8px;
  }

  body.irp-shop-active .irp-shop-kicker {
    font-size: 10.5px !important;
    line-height: 1.7;
    font-weight: 700;
  }

  body.irp-shop-active .irp-shop-hero h1 {
    margin: 2px 0 4px !important;
    font-size: clamp(23px, 7vw, 27px) !important;
    line-height: 1.35 !important;
    letter-spacing: -.35px;
    font-weight: 800 !important;
  }

  body.irp-shop-active .irp-shop-hero p {
    max-width: 100%;
    margin: 0 !important;
    font-size: 11.5px !important;
    line-height: 1.85 !important;
  }

  body.irp-shop-active .irp-shop-search {
    height: 46px !important;
    gap: 7px;
    margin-top: 12px !important;
    padding: 4px 8px 4px 11px !important;
    border-radius: 14px !important;
  }

  body.irp-shop-active .irp-shop-search svg {
    width: 17px;
    min-width: 17px;
  }

  body.irp-shop-active .irp-shop-search input {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    font-size: 12.5px !important;
    line-height: 36px !important;
  }

  body.irp-shop-active .irp-shop-search button {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 10px !important;
    padding: 0 14px !important;
    font-size: 11.5px !important;
    line-height: 36px !important;
  }

  body.irp-shop-active .irp-shop-filterbar {
    box-shadow: 0 7px 22px -23px rgba(20, 44, 65, .85);
  }

  body.irp-shop-active .irp-shop-filterbar-inner {
    gap: 7px;
    padding: 8px var(--irp-shop-mobile-edge) !important;
  }

  body.irp-shop-active .irp-shop-filter-open {
    height: 34px !important;
    min-height: 34px !important;
    gap: 5px;
    border-radius: 10px !important;
    padding: 0 10px !important;
    font-size: 10.5px !important;
    white-space: nowrap;
  }

  body.irp-shop-active .irp-shop-filter-open svg {
    width: 13px;
  }

  body.irp-shop-active .irp-shop-chips {
    gap: 6px;
  }

  body.irp-shop-active .irp-shop-chips a {
    padding: 5px 10px !important;
    border-radius: 999px !important;
    font-size: 10.5px !important;
    line-height: 1.55 !important;
    font-weight: 600 !important;
  }

  body.irp-shop-active .irp-shop-results {
    padding: 13px 0 38px !important;
  }

  body.irp-shop-active .irp-shop-results-head {
    gap: 10px;
    margin-bottom: 10px !important;
    font-size: 10.5px !important;
    line-height: 1.7;
  }

  body.irp-shop-active .irp-shop-results-head strong {
    font-size: 12px !important;
  }

  body.irp-shop-active .irp-shop-sort select {
    width: auto;
    max-width: 118px;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 9px !important;
    border-radius: 10px !important;
    font-size: 10.5px !important;
    line-height: 34px !important;
  }

  body.irp-shop-active .irp-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.irp-shop-active .irp-shop-card {
    min-width: 0;
    border-radius: 16px !important;
    border-color: rgba(209, 221, 231, .82);
    box-shadow: 0 9px 24px -23px rgba(20, 44, 65, .72) !important;
    transform: none !important;
  }

  body.irp-shop-active .irp-shop-card:hover {
    transform: none !important;
    box-shadow: 0 9px 24px -23px rgba(20, 44, 65, .72) !important;
  }

  body.irp-shop-active .irp-shop-card-badge {
    top: 7px !important;
    right: 7px !important;
    padding: 3px 7px !important;
    border-radius: 999px !important;
    font-size: 8.5px !important;
    line-height: 1.55 !important;
    box-shadow: 0 5px 15px -12px rgba(16, 46, 69, .8);
  }

  body.irp-shop-active .irp-shop-card-body {
    min-height: 132px !important;
    padding: 0 10px 10px !important;
  }

  body.irp-shop-active .irp-shop-card-icon {
    width: 38px !important;
    height: 38px !important;
    margin-top: -19px !important;
    border-width: 2px !important;
    border-radius: 11px !important;
    box-shadow: 0 7px 15px -11px rgba(22, 40, 58, .7) !important;
  }

  body.irp-shop-active .irp-shop-card h2 {
    display: -webkit-box !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 6px 0 1px !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12.5px !important;
    line-height: 1.55 !important;
    letter-spacing: -.12px;
    font-weight: 700 !important;
    overflow-wrap: anywhere;
  }

  body.irp-shop-active .irp-shop-card-meta {
    gap: 3px 6px !important;
    min-height: 16px;
    font-size: 8.8px !important;
    line-height: 1.6 !important;
  }

  body.irp-shop-active .irp-shop-card-price {
    margin-top: auto !important;
    padding-top: 7px !important;
  }

  body.irp-shop-active .irp-shop-card-price small {
    font-size: 8.5px !important;
    line-height: 1.5 !important;
  }

  body.irp-shop-active .irp-shop-card-price strong {
    display: -webkit-box !important;
    max-height: 34px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 10.5px !important;
    line-height: 1.62 !important;
    font-weight: 700 !important;
    overflow-wrap: anywhere;
  }

  body.irp-shop-active .irp-shop-pagination {
    margin-top: 20px !important;
  }

  body.irp-shop-active .irp-shop-pagination ul {
    gap: 5px;
  }

  body.irp-shop-active .irp-shop-pagination a,
  body.irp-shop-active .irp-shop-pagination span {
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    font-size: 10.5px !important;
  }

  body.irp-shop-active .irp-shop-request {
    padding-bottom: 40px !important;
  }

  body.irp-shop-active .irp-shop-request .irp-shop-container {
    padding: 17px !important;
    border-radius: 18px !important;
  }

  body.irp-shop-active .irp-shop-request span {
    font-size: 9px !important;
  }

  body.irp-shop-active .irp-shop-request h2 {
    margin: 2px 0 3px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  body.irp-shop-active .irp-shop-request p {
    font-size: 10px !important;
    line-height: 1.8 !important;
  }

  body.irp-shop-active .irp-shop-request a {
    margin-top: 11px !important;
    padding: 9px 13px !important;
    border-radius: 11px !important;
    font-size: 11px !important;
  }

  body.irp-shop-active .irp-shop-drawer {
    height: min(78vh, 660px) !important;
    border-radius: 20px 20px 0 0 !important;
  }

  body.irp-shop-active .irp-shop-drawer-head {
    padding: 14px 16px !important;
  }

  body.irp-shop-active .irp-shop-drawer-head span {
    font-size: 9px !important;
  }

  body.irp-shop-active .irp-shop-drawer-head strong {
    font-size: 15px !important;
  }

  body.irp-shop-active .irp-shop-drawer-head button {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    font-size: 19px !important;
  }

  body.irp-shop-active .irp-shop-drawer-form {
    gap: 12px !important;
    padding: 14px 16px max(18px, env(safe-area-inset-bottom)) !important;
  }

  body.irp-shop-active .irp-shop-drawer-form > label > span,
  body.irp-shop-active .irp-shop-drawer-form legend {
    margin-bottom: 5px !important;
    font-size: 10.5px !important;
  }

  body.irp-shop-active .irp-shop-drawer input[type="search"],
  body.irp-shop-active .irp-shop-drawer input[type="number"],
  body.irp-shop-active .irp-shop-drawer select {
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
  }

  body.irp-shop-active .irp-shop-drawer fieldset label {
    padding: 8px !important;
    border-radius: 10px !important;
    font-size: 10.5px !important;
  }

  body.irp-shop-active .irp-shop-switch {
    padding: 9px !important;
    border-radius: 11px !important;
  }

  body.irp-shop-active .irp-shop-switch small {
    font-size: 8.8px !important;
  }

  body.irp-shop-active .irp-shop-drawer-actions a,
  body.irp-shop-active .irp-shop-drawer-actions button {
    height: 42px !important;
    border-radius: 11px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 390px) {
  body.irp-shop-active .irp-shop-container {
    width: calc(100% - 18px) !important;
  }

  body.irp-shop-active .irp-shop-grid {
    gap: 7px !important;
  }

  body.irp-shop-active .irp-shop-card-body {
    min-height: 126px !important;
    padding-inline: 9px !important;
  }

  body.irp-shop-active .irp-shop-card h2 {
    min-height: 36px !important;
    max-height: 36px !important;
    font-size: 11.8px !important;
  }

  body.irp-shop-active .irp-shop-card-price strong {
    font-size: 10px !important;
  }
}

/**
 * Keep product artwork fully visible on every shop-card breakpoint.
 * Storefront artwork uses a 1200x1200 square canvas, so the cover frame is
 * square too: the full image renders edge-to-edge with no cropping and no
 * letterboxing. The important overrides intentionally win over any cached or
 * legacy fixed-height cover rules.
 */
body.irp-shop-active .irp-shop-card-cover {
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
}

body.irp-shop-active .irp-shop-card-cover > img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
}
