/*
 * Dhaka wishlist: the bedroom wall. The saved pieces are posters pasted on a dark painted wall,
 * each held by a strip of tape and hung a little crooked, the price on a yellow sticker in the
 * corner and "remove" as the corner you peel. Named lists are spray-painted tags over the wall.
 * The empty wall has its line sprayed on in yellow. Built by shop.js.
 */
.wishlist-page {
  max-width: 76rem;
  margin: 0 auto;
}
.dk-wish-head {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
  margin: 0.5rem 0 1.5rem;
}
.dk-wish-head .dk-tape {
  margin-left: 0.2rem;
}

/* ── The wall ── */
.wishlist-page > [data-wishlist-page] {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2.25rem) clamp(1.75rem, 4vw, 2.75rem);
  border: 3px solid var(--dk-asphalt);
  border-radius: 10px;
  background:
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.05) 0 0.8px, transparent 1px) 0 0 / 7px
      7px,
    radial-gradient(60% 50% at 85% 15%, rgb(230 51 122 / 0.18), transparent 70%),
    radial-gradient(50% 45% at 10% 90%, rgb(14 138 126 / 0.22), transparent 70%),
    #232327;
  box-shadow: none;
  color: #fff;
}
.wish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1rem;
  margin: 0;
  padding: 0.5rem 0 0;
  list-style: none;
}
@media (min-width: 640px) {
  .wish-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.25rem 1.5rem;
  }
}
@media (min-width: 1000px) {
  .wish-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* Each saved piece: a poster with tape on top. */
.wish-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.55rem 0.75rem;
  border: 0;
  border-radius: 2px;
  background: var(--dk-paper);
  color: var(--dk-asphalt);
  box-shadow: 0 10px 18px -8px rgb(0 0 0 / 0.65);
  rotate: -1.6deg;
  transition:
    rotate 0.25s var(--ease),
    translate 0.25s var(--ease);
}
.wish-card:nth-child(even) {
  rotate: 1.4deg;
}
.wish-card:nth-child(3n) {
  rotate: -0.6deg;
}
.wish-card:hover,
.wish-card:focus-within {
  rotate: 0deg;
  translate: 0 -4px;
}
.wish-card::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: -0.7rem;
  left: 50%;
  width: 4.6rem;
  height: 1.35rem;
  translate: -50% 0;
  background: rgb(255 212 59 / 0.82);
  clip-path: polygon(4% 0, 96% 8%, 100% 100%, 0 92%);
  rotate: -3deg;
}
.wish-card:nth-child(even)::before {
  background: rgb(230 51 122 / 0.78);
  rotate: 4deg;
}
.wish-card-media {
  display: block;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--dk-paper-2);
}
.wish-card-media img,
.wish-card-media .no-image {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
}
.wish-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 0.25rem;
  color: var(--dk-asphalt);
  font-family: var(--dk-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}
.wish-card-title:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
}
/* The price sticker, slapped on the poster's corner. */
.wish-card-price {
  position: absolute;
  z-index: 1;
  top: 0.15rem;
  right: -0.5rem;
  padding: 0.2rem 0.55rem 0.1rem;
  border: 2px solid var(--dk-asphalt);
  border-radius: 6px;
  background: var(--dk-yellow);
  color: var(--dk-asphalt);
  font-family: var(--dk-head);
  font-size: 1rem;
  font-weight: 800;
  rotate: 6deg;
}
.wish-card-remove {
  align-self: flex-start;
  min-height: 2.75rem;
  margin-top: auto;
  padding: 0 0.1rem;
  color: var(--muted);
  font-family: var(--dk-head);
  font-weight: 600;
  text-decoration-thickness: 1.5px;
}
.wish-card-remove:hover {
  color: var(--danger);
}
@media (prefers-reduced-motion: reduce) {
  .wish-card,
  .wish-card:nth-child(n) {
    rotate: none;
    transition: none;
  }
}

/* Notes on the wall. */
[data-wishlist-page] > .note:not(.wish-empty, .is-loading) {
  margin: 1.75rem 0 0;
  padding: 0.6rem 0.9rem;
  border-left: 4px solid var(--dk-yellow);
  background: rgb(255 255 255 / 0.06);
  color: #e7e1d8;
  font-family: var(--dk-head);
  font-size: 0.95rem;
}
[data-wishlist-page] > .note:first-child:not(.wish-empty, .is-loading) {
  margin: 0 0 1.5rem;
}
[data-wishlist-page] > .note.is-loading {
  min-height: 12rem;
  margin: 0;
  color: #fff;
  background: none;
}
[data-wishlist-page] > .problem {
  margin: 0;
  padding: 0.8rem 1rem;
  border: 2px solid #ffb3a8;
  border-radius: 6px;
  color: #ffd2cb;
}
/* The empty wall: the line sprayed on it. */
[data-wishlist-page] > .note.wish-empty {
  display: grid;
  justify-items: center;
  gap: 1rem;
  max-width: 30rem;
  margin: 0 auto;
  padding: 2rem 0.5rem 1.5rem;
  border: 0;
  background: none;
  color: var(--dk-yellow);
  font-family: var(--dk-head);
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  text-shadow:
    0 0 6px rgb(255 212 59 / 0.55),
    0 0 18px rgb(255 212 59 / 0.25);
}
[data-wishlist-page] > .note.wish-empty::before {
  content: '';
  width: 6.5rem;
  height: 6rem;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 96'%3E%3Cpath d='M52 86S10 60 10 32a20 20 0 0 1 42-9 20 20 0 0 1 42 9c0 28-42 54-42 54z' fill='none' stroke='%23e6337a' stroke-width='7' stroke-linejoin='round' stroke-dasharray='14 5'/%3E%3Cpath d='M28 88v6M52 92v4M78 86v8' stroke='%23e6337a' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgb(230 51 122 / 0.6));
}

/* Named lists: spray-painted tags. */
.wish-lists:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  background: none;
}
.wish-list-chip {
  min-height: 2.75rem;
  padding: 0.4rem 1rem 0.3rem;
  border: 2px solid var(--dk-asphalt);
  border-radius: 6px;
  background: #fff;
  color: var(--dk-asphalt);
  font-family: var(--dk-head);
  font-weight: 700;
}
.wish-list-chip:hover {
  background: var(--dk-paper-2);
}
.wish-list-chip[aria-pressed='true'] {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 3px 3px 0 var(--dk-asphalt);
}
.wish-list-chip.wish-list-new {
  border-style: dashed;
  background: transparent;
}
.wish-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}
.wish-list-actions .link {
  min-height: 2.75rem;
  color: #fff;
}
[data-wishlist-page] .wish-list-actions .button.secondary {
  box-shadow: 4px 4px 0 var(--dk-yellow);
}
[data-wishlist-page] > .button.wish-move {
  margin-top: 1.75rem;
  box-shadow: 4px 4px 0 var(--dk-yellow);
}

/* The way back to the shop, under the wall. */
.dk-wish-cta {
  display: flex;
  width: fit-content;
  margin: 2rem auto 0;
}
.wishlist-page:has(.wish-empty) .dk-wish-cta {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 4px 4px 0 var(--dk-asphalt);
}
