.product-grid > .magnet-card-slot { min-width: 0; padding: 0; border: 0; }
.product-rail .magnet-card-slot { scroll-snap-align: start; }
.magnet-card-slot .product-card { height: 100%; }
.magnet-card-slot .product-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
.magnet-card-slot .product-information {
  min-width: 0;
  align-self: stretch;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 8px;
}
.magnet-card-slot .product-price { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.magnet-card-slot .product-price .original-price { white-space: nowrap; padding-inline: 3px; }
.magnet-card-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 7px;
  min-height: 42px;
  padding: 5px clamp(5px, .65vw, 12px);
  border-radius: 9px 9px 9px 4px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
.magnet-card-buy-label { font-size: .93em; white-space: nowrap; }
.magnet-card-buy-price { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.magnet-card-buy-price small { font-size: .77em; font-weight: 400; }
.magnet-card-buy--unavailable { background: var(--paper); color: var(--muted); }
.special-shelf .magnet-card-buy:not(.magnet-card-buy--unavailable) { background: var(--magnet-red); }
.magnet-card-slot .product-card:is(:hover, :focus-visible) .magnet-card-buy:not(.magnet-card-buy--unavailable) { background: var(--accent); }

@media (max-width: 760px) {
  .product-grid:has(> .magnet-card-slot):not(.product-rail) { gap: 11px; }
  .featured-shelf .product-rail:has(> .magnet-card-slot) { grid-auto-columns: min(46%, 235px); }
  .magnet-card-slot .product-card {
    padding: 4px;
    overflow: hidden;
    border-radius: 48% 48% 9px 18px / 12% 12% 9px 18px;
  }
  .magnet-card-slot .product-image {
    border-radius: 48% 48% 8px 8px / 16% 16% 8px 8px;
  }
  .magnet-card-slot .product-image img {
    aspect-ratio: 4 / 4.7;
    object-position: center 39%;
  }
  .magnet-card-slot a[data-category="کیف"] .product-image img { object-position: center 53%; }
  .special-shelf .magnet-card-slot .product-image img { aspect-ratio: 4 / 4.25; }
  .magnet-card-slot .product-meta {
    padding: 7px 4px 5px;
  }
  .magnet-card-slot .product-information { gap: 5px; }
  .magnet-card-slot .product-title {
    min-height: 3em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.5;
    font-size: clamp(.72rem, 3.2vw, .89rem);
    font-weight: 600;
  }
  .magnet-card-slot .product-price {
    font-size: clamp(.65rem, 2.85vw, .83rem);
    line-height: 1.6;
  }
  .magnet-card-buy { min-height: 37px; }
}

@media (max-width: 360px) {
  .magnet-card-buy { flex-direction: column; min-height: 42px; }
  #latest .magnet-card-slot .product-title { display: block; overflow: visible; }
}
