/*
 * Glow wishlist: the display cloches. Each saved product (shop.js: ul.wish-grid > li.wish-card)
 * stands under a glass bell jar — a domed top with a knob, a sheen across the glass — on a little
 * rose-gold stand; title and price sit under it like a boutique card. The named lists are pill tabs.
 */
.wishlist-page {
  max-width: 72rem;
  margin: 0 auto;
}
body:has(main .wishlist-page) {
  background:
    radial-gradient(
        40rem 24rem at 100% 0,
        color-mix(in oklab, var(--lilac) 50%, transparent),
        transparent 70%
      )
      no-repeat,
    radial-gradient(
        30rem 22rem at 0 0,
        color-mix(in oklab, var(--peach) 42%, transparent),
        transparent 70%
      )
      no-repeat,
    var(--bg);
}

/* The named lists: pill tabs. */
.wish-lists {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
}
.wish-list-chip {
  min-height: 2.75rem;
  padding: 0.35rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.wish-list-chip:hover {
  border-color: var(--accent);
}
.wish-list-chip[aria-pressed='true'] {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.18), transparent 55%), var(--accent);
  color: var(--on-accent);
}
.wish-list-new {
  border-style: dashed;
  color: var(--accent-hover);
}
.wish-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 1.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.wish-list-actions .button {
  min-height: 2.75rem;
  padding-block: 0.4rem;
}
.wish-list-actions .link {
  min-height: 2.75rem;
}
[data-wishlist-page] > .note:not(.wish-empty, .is-loading) {
  margin: 0 0 1.5rem;
  padding: 0.7rem 1rem;
  border-radius: var(--r);
  background: var(--accent-mist);
  color: var(--ink-2);
}
[data-wishlist-page] > .problem {
  padding: 1rem;
  border-radius: var(--r);
  background: color-mix(in oklab, var(--danger) 7%, var(--surface));
}
[data-wishlist-page] > .note.is-loading {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 3.5rem 0;
  text-align: center;
}
[data-wishlist-page] > .note.is-loading::before {
  content: '';
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 25%, var(--accent-soft) 0);
  mask: radial-gradient(circle, transparent 0.85rem, #000 0.9rem);
  animation: spin 1s linear infinite;
}

/* ── The cloches ── */
.wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: 2.2rem 1rem;
  margin: 0 0 2rem;
  padding: 1rem 0 0;
  list-style: none;
}
@media (min-width: 720px) {
  .wish-grid {
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 2.75rem 1.75rem;
  }
}
.wish-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.2rem;
  container-type: inline-size;
  text-align: center;
  animation: rise 0.4s var(--ease) backwards;
}
.wish-card:nth-child(2) {
  animation-delay: 0.05s;
}
.wish-card:nth-child(3) {
  animation-delay: 0.1s;
}
/* The bell jar: a glass dome over the picture. */
.wish-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-bottom: 1.35rem;
  border: 0.32rem solid rgb(255 255 255 / 0.85);
  border-radius: 50% 50% 0.7rem 0.7rem / 40% 40% 0.7rem 0.7rem;
  background: linear-gradient(160deg, var(--tint), var(--sunken));
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 24px 30px -24px rgb(122 40 78 / 0.55);
}
.wish-card-media img,
.wish-card-media .no-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  transition: scale 0.6s var(--ease);
}
.wish-card-media .no-image {
  background: linear-gradient(140deg, var(--peach), var(--lilac));
}
.wish-card:hover .wish-card-media img {
  scale: 1.04;
}
/* Its knob. */
.wish-card-media::before {
  content: '';
  position: absolute;
  top: -1.05rem;
  left: 50%;
  z-index: 1;
  width: 1.3rem;
  height: 1.3rem;
  translate: -50% 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 0.15rem, transparent 0.45rem),
    linear-gradient(135deg, #f6e2b4, #c49a52);
  box-shadow: 0 3px 6px rgb(90 60 20 / 0.35);
}
/* Its stand. */
.wish-card-media::after {
  content: '';
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: calc(-0.32rem - 1rem);
  height: 0.85rem;
  border-radius: 0.2rem 0.2rem 50% 50% / 0.2rem 0.2rem 100% 100%;
  background: linear-gradient(180deg, #f6ded2, #d8a691 55%, #b97c68);
  box-shadow: 0 10px 14px -8px rgb(90 40 40 / 0.45);
}
/* The sheen across the glass. */
.wish-card::after {
  content: '';
  position: absolute;
  top: 9cqw;
  left: 12cqw;
  width: 13cqw;
  height: 62cqw;
  border-radius: 50% 0 0 50% / 30% 0 0 30%;
  border-left: 0.25rem solid rgb(255 255 255 / 0.7);
  filter: blur(0.5px);
  pointer-events: none;
}
.wish-card-title {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--ink);
  font-family: var(--font-round);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.wish-card-title:hover {
  color: var(--accent-hover);
}
.wish-card-price {
  color: var(--accent-hover);
  font-family: var(--font-round);
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wish-card-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.wish-card-remove::before {
  content: '';
  width: 0.95rem;
  height: 0.95rem;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 1.2-.3 2.3-.8 3.3M15 17l5 5M20 17l-5 5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.wish-card-remove:hover {
  color: var(--danger);
}

/* ── Nothing saved yet: an empty cloche, a sparkle under the glass ── */
[data-wishlist-page]:has(> .wish-empty) {
  display: grid;
  justify-items: center;
  gap: 1rem;
  max-width: 32rem;
  margin: 0.5rem auto 0;
  padding: clamp(2rem, 6vw, 3rem) 1.5rem;
  border-radius: 2rem;
  background:
    radial-gradient(70% 60% at 50% 0, var(--accent-mist), transparent 70%), var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 60px -44px rgb(122 40 78 / 0.5);
  text-align: center;
}
[data-wishlist-page] > .wish-empty {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin: 0;
  color: var(--ink-2);
  font-family: var(--font-round);
  font-size: 1.2rem;
  line-height: 1.45;
}
[data-wishlist-page] > .wish-empty::before {
  content: '';
  width: 6rem;
  height: 7rem;
  background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 45%, white), var(--accent));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 112' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='48' cy='9' r='5'/%3E%3Cpath d='M18 92V48a30 30 0 0 1 60 0v44'/%3E%3Cpath d='M10 92h76l-6 10H16Z'/%3E%3Cpath d='M28 46a20 20 0 0 1 10-14' stroke-opacity='.6'/%3E%3Cpath d='M48 58c.8 6 3.2 8.4 9 9-5.8.6-8.2 3-9 9-.8-6-3.2-8.4-9-9 5.8-.6 8.2-3 9-9Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.wish-continue {
  min-width: 13rem;
}
@media (prefers-reduced-motion: reduce) {
  .wish-card {
    animation: none;
  }
}
/* "Continue shopping": under the cloches, or inside the empty card. */
.gl-wish-cta {
  display: flex;
  width: fit-content;
  margin: 0.5rem auto 0;
}
.wishlist-page:has(.wish-empty) [data-wishlist-page] {
  padding-bottom: calc(clamp(2rem, 6vw, 3rem) + 4rem);
}
.wishlist-page:has(.wish-empty) .gl-wish-cta {
  position: relative;
  margin-top: calc(-1 * (clamp(2rem, 6vw, 3rem) + 3.1rem));
}
