/* TrackRestocks Stage 28 (preview): big product pictures on item cards and the product page.
   A white picture panel runs across the top of each card, edge to edge, like the cards on other restock sites.
   Target photos carry a lot of white space, so each item has its own zoom (--s28-fit, set inline from S28_PHOTOS).
   Items with no picture get a neutral panel of the same size, so every row lines up. */

.s28-card { --s28-r: 16px; border-radius: var(--s28-r); }
.s22-card.s28-card { gap: 12px; }

/* the panel: full-bleed to the card's top and side edges (cancels the card padding) */
.s28-pic { position: relative; display: block; overflow: hidden; height: 300px;
  margin: -18px -18px 4px; border-radius: calc(var(--s28-r) - 1px) calc(var(--s28-r) - 1px) 0 0;
  background: #fff; isolation: isolate; text-decoration: none; }
.s28-pic img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 22px 26px 30px; box-sizing: border-box;
  object-fit: contain; transform: var(--s28-fit, scale(1)); transform-origin: 50% 50%;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.s28-card:hover .s28-pic img, .s28-pic:focus-visible img { transform: var(--s28-fit, scale(1)) scale(1.05); }
/* items with their own zoom (S28_PHOTOS) were framed edge to edge, so only a thin margin: the zoom crops Target's white space */
.s28-pic img[style*="--s28-fit"] { padding: 16px 18px 22px; }
/* a soft floor so the product sits on something, not floating on white */
.s28-pic::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, rgba(244,244,247,0), rgba(236,236,241,.9)); }
.s28-pic.is-none::after { content: none; }

.s28-credit { position: absolute; right: 10px; bottom: 8px; z-index: 2; font-size: 11px; line-height: 1;
  color: #6B6B76; letter-spacing: .01em; }

/* in-stock badge on the picture (only when a saved check found it in stock) */
.s28-badge { position: absolute; left: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1;
  background: #0B1F17; color: #6EE7B7; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.s28-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34D399;
  box-shadow: 0 0 0 3px rgba(52,211,153,.25); }

/* no picture: same size, neutral, says so */
.s28-none { display: none; }
.s28-pic.is-none { background: #EDEDF1; }
.s28-pic.is-none .s28-none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #6B6B76; font-size: 13.5px; font-weight: 600; }
.s28-pic.is-none .s28-none svg { color: #9A9AA6; }
.s28-pic.is-none .s28-credit { display: none; }

/* category + full name under the picture: never cut off */
.s28-id { min-width: 0; }
.s28-id .s22-title { font-size: 17.5px; line-height: 1.3; overflow-wrap: anywhere; }
.s28-id .s22-title a { display: inline; -webkit-line-clamp: unset; white-space: normal; overflow: visible; }
.s28-id .s22-tags { margin-bottom: 4px; }

/* card lift on hover, a touch stronger than before */
.s28-card { transition: border-color .15s, transform .2s, box-shadow .2s; }
.s28-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(0,0,0,.6); }

@media (min-width: 600px) { .s28-pic { height: 320px; } }
@media (min-width: 900px) {
  .s28-pic { height: 340px; margin: -20px -20px 4px; }
  .s28-pic img { padding: 26px 30px 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .s28-pic img, .s28-card { transition: none; }
  .s28-card:hover .s28-pic img, .s28-pic:focus-visible img { transform: var(--s28-fit, scale(1)); }
  .s28-card:hover { transform: none; }
}

/* product page: the same panel, larger, at the top of the side box */
.s28-aside { overflow: hidden; }
.s28-pic.s28-pic-page { height: auto; aspect-ratio: 1 / 1; max-height: 460px; margin: -20px -20px 18px; border-radius: 15px 15px 0 0;
  border-bottom: 1px solid #E5E5EA; }
.s28-pic.s28-pic-page img { padding: 28px 34px 38px; }
.s28-pic.s28-pic-page:hover img { transform: var(--s28-fit, scale(1)) scale(1.04); }
.s28-pic.s28-pic-page.is-none { aspect-ratio: 4 / 3; }
@media (prefers-reduced-motion: reduce) { .s28-pic.s28-pic-page:hover img { transform: var(--s28-fit, scale(1)); } }
.s28-pic.s28-pic-page img[style*="--s28-fit"] { padding: 14px 16px 22px; }
@media (min-width: 1024px) { .s28-aside { position: sticky; top: 76px; } }
