/**
 * Aqua Store 2.0.4 — equal product cards + usable buy button
 * Loaded last. Applies to store, sale, home, archive, search.
 */

.grid-4,
.grid-3,
.sale-products-grid,
.store-products-grid {
  align-items: stretch !important;
}

.product-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  overflow: visible !important;
}

.product-card > a:first-child {
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  line-height: 0 !important;
}

.product-card .product-thumb {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  overflow: hidden !important;
}

.product-card .product-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

.product-card .product-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  gap: 8px !important;
  padding: 14px !important;
}

.product-card .meta {
  min-height: 1.2em !important;
  max-height: 1.2em !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.product-card h3 {
  min-height: 2.6em !important;
  max-height: 2.6em !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  overflow: hidden !important;
}

.product-card h3 a {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.product-card .row-between,
.product-card .price {
  min-height: 2.5em !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 6px !important;
}

.product-card .product-actions {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  margin-top: auto !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 2 !important;
}

.product-card .product-actions .buy-form,
.product-card .product-actions > .btn-add-cart {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
}

.product-card .buy-form .qty {
  flex: 0 0 46px !important;
  width: 46px !important;
  height: 44px !important;
}

.product-card .buy-form .btn-add-cart,
.product-card .product-actions > .btn-add-cart {
  flex: 1 1 auto !important;
  min-height: 44px !important;
  height: 44px !important;
  pointer-events: auto !important;
}

@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 767px) {
  .grid-4,
  .grid-3,
  .sale-products-grid,
  .store-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 419px) {
  .grid-4,
  .grid-3,
  .sale-products-grid,
  .store-products-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
