/*
 * Sosanh24h Astra Child v3.2.39
 * Further compact homepage/category product cards on mobile.
 * Presentation only. Keep colors, product data, links and compare logic unchanged.
 */
@media (max-width: 740px) {
  .ss-live-prices .ss24-wrap .ss24-grid,
  .ss-category-results .ss24-wrap .ss24-grid,
  .ss24-home-product-list .ss24-wrap .ss24-grid,
  .ss-elementor-slot-homepage .ss24-wrap .ss24-grid {
    gap: 10px !important;
  }

  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card {
    padding: 7px !important;
    border-radius: 10px !important;
  }

  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image {
    flex-basis: 120px !important;
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    margin: 0 0 4px !important;
    padding: 0 0 25px !important;
  }

  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image > img,
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image > .ss24-image-placeholder:not([hidden]) {
    height: 90px !important;
    max-height: 90px !important;
  }

  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > h3 {
    flex-basis: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 0 4px !important;
    font-size: 12px !important;
    line-height: 1.36 !important;
  }

  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-price,
  .ss-live-prices .ss24-wrap .ss24-card.ss24-hover-card > .ss24-price,
  .ss-category-results .ss24-wrap .ss24-card.ss24-hover-card > .ss24-price {
    flex-basis: 21px !important;
    min-height: 21px !important;
    max-height: 28px !important;
    margin: 0 0 1px !important;
    font-size: clamp(12px, 3.1vw, 13px) !important;
    line-height: 1.14 !important;
    letter-spacing: -0.22px !important;
    white-space: nowrap !important;
  }

  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-shop-count {
    min-height: 17px !important;
    margin: 1px 0 0 !important;
    font-size: 11px !important;
    line-height: 1.22 !important;
  }
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-shop-count[data-ss24-count]::before {
    font-size: 10px !important;
    margin-right: 3px !important;
  }

  /* Make the orange compare button hug the text more tightly. */
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image .ss24-hover-compare,
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > a.ss24-buy.ss24-compare-action {
    bottom: 1px !important;
    min-height: 22px !important;
    width: max-content !important;
    max-width: calc(100% - 6px) !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.08px !important;
    box-shadow: none !important;
  }

  /* Single-store blue buy button on cards: also more compact. */
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > a.ss24-buy:not(.ss24-compare-action) {
    min-height: 22px !important;
    width: max-content !important;
    max-width: 100% !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    line-height: 1.08 !important;
    margin-top: auto !important;
  }

  /* Tighten generic card interior spacing if these blocks exist. */
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-coupon-hint,
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-card-stores {
    margin: 2px 0 !important;
  }
}

@media (max-width: 370px) {
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card {
    padding: 6px !important;
  }
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image {
    flex-basis: 114px !important;
    height: 114px !important;
    min-height: 114px !important;
    max-height: 114px !important;
  }
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image > img,
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image > .ss24-image-placeholder:not([hidden]) {
    height: 86px !important;
    max-height: 86px !important;
  }
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > .ss24-product-image .ss24-hover-compare,
  .ss24-wrap .ss24-grid > .ss24-card.ss24-hover-card > a.ss24-buy:not(.ss24-compare-action) {
    padding: 2px 5px !important;
  }
}
