/*
 * Grocery wishlist: the pantry shelf. The list is a wooden shelf unit: each saved product stands in
 * a glass jar (a gingham cloth tied over its lid, a glint on the glass) on a plank, its price on a
 * yellow shelf-edge label. Named lists are kraft jar labels; an empty list is an empty shelf with
 * one empty jar. Built by shop.js (ul.wish-grid > li.wish-card).
 */
.wishlist-page.gw-page {
  max-width: 70rem;
}
.gw-page > [data-wishlist-page] {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

/* ── The shelf unit ── */
.gw-page .wish-grid {
  --plank: 0.8rem;
  --pad: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.9rem;
  margin: 0 0 1.25rem;
  padding: 1.4rem var(--pad) 0;
  border: 0.65rem solid #8a6238;
  border-bottom-width: 0.9rem;
  border-radius: 6px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgb(120 80 40 / 0.05) 0 2px, #0000 2px 34px),
    linear-gradient(180deg, #f1e2c6, #ead6b2);
  box-shadow:
    inset 0 10px 18px -10px rgb(60 30 10 / 0.45),
    0 18px 30px -22px rgb(60 30 10 / 0.6);
}
@media (min-width: 640px) {
  .gw-page .wish-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    --pad: 1.2rem;
    gap: 0 1.4rem;
  }
}
@media (min-width: 980px) {
  .gw-page .wish-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.gw-page .wish-card {
  position: relative;
  justify-items: center;
  align-content: start;
  gap: 0.45rem;
  padding: 1.1rem 0.25rem calc(var(--plank) + 1.4rem);
  text-align: center;
  animation: rise 0.4s var(--ease) backwards;
}
.gw-page .wish-card:nth-child(2) {
  animation-delay: 0.05s;
}
.gw-page .wish-card:nth-child(3) {
  animation-delay: 0.1s;
}
/* The plank under each row: every card's plank runs the shelf's whole width (the shelf clips
   it), so a row with empty places still has its plank. */
.gw-page .wish-card::after {
  content: '';
  position: absolute;
  left: -100vw;
  right: -100vw;
  bottom: 0.6rem;
  height: var(--plank);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.25), #0000 40%),
    linear-gradient(90deg, #a77945, #b98a54 40%, #a1723f);
  box-shadow: 0 6px 6px -3px rgb(60 30 10 / 0.35);
}
/* The jar. */
.gw-page .wish-card-media {
  position: relative;
  width: min(100%, 10.5rem);
  aspect-ratio: 5 / 6;
  overflow: visible;
  padding: 0.45rem;
  border: 2px solid rgb(255 255 255 / 0.95);
  border-radius: 1.1rem 1.1rem 1.5rem 1.5rem;
  background: rgb(255 255 255 / 0.5);
  box-shadow:
    inset 0 0 0 1px rgb(60 70 60 / 0.12),
    inset 0 -10px 14px -10px rgb(60 70 60 / 0.25),
    0 8px 10px -8px rgb(60 30 10 / 0.5);
  transition: translate 0.25s var(--ease);
}
.gw-page .wish-card-media img,
.gw-page .wish-card-media .no-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0.8rem 0.8rem 1.15rem 1.15rem;
  background: var(--accent-soft);
  object-fit: cover;
}
/* The lid with its gingham cloth. */
.gw-page .wish-card-media::before {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  top: -1rem;
  height: 1.05rem;
  border-radius: 5px 5px 2px 2px;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.55) 0 5px, #0000 5px 10px),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.55) 0 5px, #0000 5px 10px), #c0392b;
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.15);
}
/* The glint on the glass. */
.gw-page .wish-card-media::after {
  content: '';
  position: absolute;
  left: 13%;
  top: 14%;
  width: 0.4rem;
  height: 42%;
  border-radius: var(--pill);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.85), rgb(255 255 255 / 0.1));
  pointer-events: none;
}
.gw-page .wish-card:hover .wish-card-media {
  translate: 0 -4px;
}
.gw-page .wish-card-title {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.gw-page .wish-card-title:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}
/* The price on a shelf-edge label. */
.gw-page .wish-card-price {
  padding: 0.12rem 0.7rem;
  border-radius: 3px;
  background: var(--sun);
  color: var(--memo-ink);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.15);
}
.gw-page .wish-card-remove {
  justify-self: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  color: var(--kraft-ink);
  font-size: 0.85rem;
  font-weight: 600;
}
.gw-page .wish-card-remove:hover {
  color: var(--danger);
}
/* Notes under the shelf (the guest note, a shared list's note). */
.gw-page [data-wishlist-page] > .note:not(.is-loading, .wish-empty) {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.gw-page [data-wishlist-page] > .note:not(.is-loading, .wish-empty)::before {
  content: '';
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  border-radius: 50% 0 50% 50%;
  background: var(--accent);
  rotate: -45deg;
}
.gw-page [data-wishlist-page] > .problem {
  padding: 0.75rem 1rem;
  border-left: 5px solid var(--danger);
  border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--danger) 8%, white);
}

/* ── An empty list: an empty shelf with one empty jar ── */
.gw-page .wish-empty {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 2rem 1.25rem 2.4rem;
  border: 0.65rem solid #8a6238;
  border-bottom-width: 0.9rem;
  border-radius: 6px;
  background:
    linear-gradient(90deg, #a77945, #b98a54 40%, #a1723f) 0 calc(100% - 1.5rem) / 100% 0.8rem
      no-repeat,
    linear-gradient(180deg, #f1e2c6, #ead6b2);
  box-shadow: inset 0 10px 18px -10px rgb(60 30 10 / 0.45);
  color: var(--kraft-ink);
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem);
  font-weight: 700;
  text-align: center;
}
.gw-page .wish-empty::before {
  content: '';
  width: 6.5rem;
  height: 7.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 60' fill='none' stroke-linejoin='round'%3E%3Crect x='10' y='2' width='32' height='9' rx='2' fill='%23c0392b'/%3E%3Cpath d='M14 4.5v4M19 4.5v4M24 4.5v4M29 4.5v4M34 4.5v4M38 4.5v4' stroke='%23fff' stroke-opacity='.6' stroke-width='2'/%3E%3Cpath d='M9 11h34a5 5 0 0 1 5 5v35a7 7 0 0 1-7 7H11a7 7 0 0 1-7-7V16a5 5 0 0 1 5-5z' fill='%23ffffff' fill-opacity='.55' stroke='%238a948d' stroke-width='2'/%3E%3Cpath d='M11 19v20' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* ── Named lists: kraft jar labels ── */
.gw-page .wish-lists {
  gap: 0.55rem;
}
.gw-page .wish-list-chip {
  min-height: 2.75rem;
  padding: 0.35rem 1.05rem;
  border: 1.5px solid var(--kraft-deep);
  border-radius: 6px;
  background: #f6ead2;
  color: var(--kraft-ink);
  font-weight: 700;
}
.gw-page .wish-list-chip:hover {
  background: var(--kraft);
}
.gw-page .wish-list-chip[aria-pressed='true'] {
  border-color: var(--accent-ink);
  background: var(--accent);
  color: #fff;
}
.gw-page .wish-list-new {
  border-style: dashed;
  background: transparent;
}
.gw-page .wish-move {
  min-height: 3rem;
}

/* The way back to shopping. */
.gw-cta {
  display: flex;
  gap: 0.5rem;
  width: fit-content;
  min-height: 3.1rem;
  margin: 0.5rem auto 0;
  padding-inline: 1.6rem;
}
.gw-cta .icon {
  width: 1.15rem;
  height: 1.15rem;
}
