/* A common product grid for discovery, saved items and search. */
.sf-grid,
#resultCards, #favoriteCards, #photoGrid, #giftCards, #rakGroups .rak-product-grid {
  --sf-gap: clamp(10px, 1.6vw, 22px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 22px var(--sf-gap);
}
#resultCards > .empty, #favoriteCards > .empty, #photoGrid > p, #giftCards > .empty { grid-column: 1 / -1; }
.sf-tile {
  --sf-ink: #252825;
  --sf-muted: #656963;
  min-width: 0;
  position: relative;
  color: var(--sf-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.4;
}
.sf-tile button, .sf-tile a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.sf-tile .sf-item {
  display: block;
  width: 100%;
  min-width: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}
.sf-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f0f0ec;
  border-radius: 5px;
}
.sf-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sf-photo > small {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 4px;
  background: #fffffff2;
  border-radius: 2px;
  color: #53574f;
  font-size: .75rem;
}
.sf-info { display: grid; gap: 2px; margin-top: 8px; }
.sf-brand {
  color: var(--sf-muted);
  font-size: clamp(.75rem, 1.5vw, .80rem);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .01em;
}
.sf-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 2.8em;
  font-size: clamp(.875rem, 1.9vw, 1rem);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.sf-price-row { display: flex; align-items: center; min-height: 42px; position: relative; padding-right: 31px; }
.sf-price { display: flex; flex-direction: column; min-width: 0; }
.sf-price strong {
  font-size: clamp(1rem, 2.35vw, 1.23rem);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -.025em;
}
.sf-range small, .sf-caption { color: var(--sf-muted); font-size: .75rem; line-height: 1.4; }
.sf-range strong { font-size: 1rem; overflow-wrap: anywhere; }
.sf-tile .sf-heart {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 50% -4px auto auto;
  transform: translateY(-50%);
  padding: 0;
  width: 40px;
  height: 44px;
  background: transparent;
  color: #737871;
}
.sf-heart svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linejoin: round; }
.sf-heart[aria-pressed="true"] { color: #ad483e; }
.sf-heart[aria-pressed="true"] svg { fill: currentColor; }
.sf-actions { display: flex; align-items: center; flex-wrap: wrap; column-gap: 9px; border-top: 1px solid #e4e5df; }
.sf-tile .sf-compare, .sf-tile .sf-buy {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  color: #545d55;
  background: transparent;
  font-size: .875rem;
  font-weight: 650;
}
.sf-tile .sf-buy { color: #294436; text-decoration: underline; text-underline-offset: 3px; }
.sf-tile .sf-compare[aria-pressed="true"] { color: #25583e; }
.sf-tile .sf-caption { display: block; margin: 0 0 6px; }
.sf-tile .store-prices { margin: 0 0 6px; }
.sf-store-note .sf-price-row { min-height: 0; }
.sf-store-note .sf-heart { top: 4px; transform: none; }
.sf-store-note .store-prices > div:first-child { padding-right: 32px; }
.sf-no-image { border-block-start: 1px solid #dde0d9; padding-top: 4px; }
.sf-no-image .sf-info { margin-top: 6px; }
.sf-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip-path: inset(50%); white-space: nowrap; overflow: hidden; }
@media (min-width: 1060px) {
  #resultCards, #favoriteCards, #photoGrid, #giftCards, #rakGroups .rak-product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sf-grid, #resultCards, #favoriteCards, #photoGrid, #giftCards { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 17px; }
  #rakGroups .rak-product-grid, #favoriteCards:has(.sf-store-note) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-price-row { padding-right: 28px; }
  .sf-tile .sf-heart { right: -5px; }
}
@media (max-width: 650px) {
  .sf-grid, #resultCards, #favoriteCards, #photoGrid, #giftCards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
