/* The basket: the nav button, picking several templates, the basket page and its little black cat. */

/* ---------- nav basket button ---------- */
.basket-btn {
  position: relative; flex: none; width: 44px; height: 44px; margin-left: 10px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(182, 120, 255, 0.12); color: var(--lilac);
  transition: background 0.2s, box-shadow 0.2s;
}
.basket-btn:hover { background: rgba(182, 120, 255, 0.26); box-shadow: 0 0 20px rgba(182, 120, 255, 0.5); }
.basket-btn svg { width: 25px; height: 25px; filter: drop-shadow(0 0 6px rgba(255, 150, 240, 0.65)); }
.basket-count {
  position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px;
  display: none; place-items: center; font: 900 0.72rem/1 var(--font-body); color: #fff;
  background: linear-gradient(180deg, #ff9eea, #c04bd8); border: 2px solid #12042a; box-shadow: 0 0 12px rgba(255, 120, 230, 0.85);
}
.basket-btn.has-items .basket-count { display: grid; }
.basket-btn.has-items { border-color: rgba(255, 170, 240, 0.6); }
.basket-btn.bump { animation: basket-bump 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes basket-bump { 30% { transform: scale(1.3) rotate(-10deg); } 60% { transform: scale(0.92) rotate(5deg); } }
.fly-ghost {
  position: fixed; z-index: 300; pointer-events: none; object-fit: contain; border-radius: 14px;
  background: radial-gradient(70% 60% at 50% 45%, rgba(214, 186, 245, 0.7), rgba(60, 20, 100, 0.9));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 140, 230, 0.6);
}

/* ---------- picking several templates ---------- */
.tpl-pick {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; line-height: 1; color: #fff;
  background: rgba(10, 2, 24, 0.78); border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55); transition: transform 0.15s, background 0.2s;
}
.tpl-pick:hover { transform: scale(1.14); background: rgba(var(--accent-rgb), 0.65); }
.tpl-card.picked .tpl-pick { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: #fff; }
.tpl-card.just-picked { animation: picked-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
/* the "Add to basket" button on template cards (home page and Templates page) */
.tpl-add {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 999px;
  font: 900 0.66rem/1.1 var(--font-label); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white) 0%, var(--accent) 40%, color-mix(in srgb, var(--accent) 55%, #2a0055) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: filter 0.15s, transform 0.15s;
}
.tpl-add svg { width: 15px; height: 15px; flex: none; }
.tpl-add:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tpl-card.picked .tpl-add { background: rgba(var(--accent-rgb), 0.18); color: var(--lilac); border-color: var(--line); box-shadow: none; }
@keyframes picked-pop { 40% { transform: scale(1.05); } }

.pick-tray {
  position: sticky; bottom: 14px; z-index: 20; margin: 26px auto 0; max-width: 860px;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 14px; border-radius: 22px;
  background: rgba(20, 5, 40, 0.94); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-rgb), 0.28);
}
.pick-tray.has-picks { border-color: rgba(var(--accent-rgb), 0.85); }
.pt-thumbs { display: flex; align-items: center; min-width: 46px; }
.pt-thumb {
  position: relative; width: 46px; height: 56px; margin-left: -14px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.7); background: radial-gradient(70% 60% at 50% 45%, rgba(214, 186, 245, 0.65), rgba(60, 20, 100, 0.95));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); animation: pt-in 0.32s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.pt-thumb:first-child { margin-left: 0; }
.pt-thumb:nth-child(even) { transform: rotate(4deg); }
.pt-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pt-thumb i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 900; background: rgba(40, 0, 60, 0.65); opacity: 0; transition: opacity 0.15s; }
.pt-thumb:hover i, .pt-thumb:focus-visible i { opacity: 1; }
@keyframes pt-in { from { transform: translateY(12px) scale(0.5); opacity: 0; } }
.pt-empty { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--accent-rgb), 0.14); color: var(--accent-2); }
.pt-empty svg { width: 20px; height: 20px; }
.pt-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.pick-tray .btn { flex: none; }

.pick-stack { display: flex; flex: none; align-items: center; }
.pick-stack .tpl-img, .picked-tpl .pick-stack .tpl-img {
  width: 66px; margin-left: -30px; border-radius: 12px; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.55); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.pick-stack .tpl-img:first-child { margin-left: 0; }
.pick-stack .tpl-img:nth-child(2) { transform: rotate(5deg); }
.pick-stack .tpl-img:nth-child(3) { transform: rotate(-4deg); }
.pick-stack .tpl-img:nth-child(4) { transform: rotate(3deg); }
.pick-more { margin-left: 8px; font-weight: 900; color: var(--accent-2); }

.pick-notes { display: grid; gap: 10px; }
.pick-note { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; background: rgba(var(--accent-rgb), 0.08); border: 1px solid var(--line-soft); }
.pick-note .tpl-img { width: 48px; flex: none; border-radius: 10px; overflow: hidden; }
.pick-note > div:last-child { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pick-note .input { padding: 8px 12px; }

.confirm-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 22px; }
.cp-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: rgba(var(--accent-rgb), 0.1); border: 1px solid var(--line); }
.cp-card .tpl-img { width: 64px; flex: none; border-radius: 10px; overflow: hidden; }
.cp-meta { min-width: 0; }
.cp-note { color: var(--lilac); font-style: italic; margin-top: 2px; }

.added-panel { padding: 40px 28px 34px; }
.added-icon {
  width: 88px; height: 88px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; color: #ffd2f6;
  background: radial-gradient(circle at 40% 35%, rgba(255, 180, 240, 0.4), rgba(var(--accent-rgb), 0.15) 70%);
  box-shadow: 0 0 44px rgba(255, 140, 230, 0.5); animation: float 3.5s ease-in-out infinite;
}
.added-icon svg { width: 48px; height: 48px; }

/* ---------- basket page ---------- */
.basket-wrap { padding-bottom: 50px; }
.basket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 34px; align-items: start; }
.basket-list { display: grid; gap: 34px; }
.basket-group { padding: 24px; }
.bg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.bg-name { font-family: var(--font-display); font-weight: 900; font-size: 2.1rem; line-height: 1.1; }
.bg-head .price-tag { font-size: 1.6rem; }
.bg-head .price-tag.quote { font-size: 0.8rem; }
.bg-lines { display: grid; gap: 12px; }
.bg-more { display: inline-block; margin-top: 16px; font-weight: 800; color: var(--accent-2); }
/* templates added from the Templates page: the designer is picked at checkout */
.basket-group.unpicked { border-style: dashed; border-color: rgba(255, 170, 240, 0.55); }
.bg-hint { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 14px; }
.bg-hint svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.bg-more:hover { text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.9); }

.basket-line {
  position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 12px 46px 12px 12px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.13), rgba(var(--accent-rgb), 0.04)); border: 1px solid var(--line-soft);
  transition: transform 0.28s ease, opacity 0.28s ease, border-color 0.2s, box-shadow 0.2s; animation: line-in 0.4s ease both;
}
.basket-line:hover { border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.22); }
.basket-line.leaving { opacity: 0; transform: translateX(46px) scale(0.95); }
.basket-line.gone .bl-img, .basket-line.gone .bl-top { opacity: 0.55; }
.basket-line.line-error { border-color: var(--bad); box-shadow: 0 0 0 2px rgba(255, 143, 168, 0.4); }
@keyframes line-in { from { opacity: 0; transform: translateY(8px); } }
.bl-img {
  position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(70% 60% at 50% 45%, rgba(214, 186, 245, 0.55), rgba(120, 80, 170, 0.25) 60%, transparent 85%);
}
.bl-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.25s; }
.bl-img.photo img { object-fit: cover; }
.bl-img img.back { opacity: 0; }
.basket-line:hover .bl-img.flip img.back { opacity: 1; }
.basket-line:hover .bl-img.flip img.front { opacity: 0; }
.bl-img > svg { width: 40px; height: 40px; }
.bl-body { min-width: 0; display: grid; gap: 4px; align-content: start; }
.bl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bl-top .tpl-code { font-size: 1rem; overflow-wrap: anywhere; }
.bl-top .price-tag { font-size: 1.35rem; }
.bl-top .price-tag.quote { font-size: 0.8rem; }
.bl-sub { color: var(--muted); font-size: 0.86rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.bl-sub .badge { position: static; }
.bl-desc { margin: 4px 0 0; color: var(--lilac); font-size: 0.86rem; font-style: italic; overflow-wrap: anywhere; }
.bl-gone { margin: 4px 0 0; color: var(--bad); font-size: 0.86rem; font-weight: 700; }
.bl-note { margin-top: 6px; padding: 8px 12px; font-size: 0.88rem; }
.bl-remove {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(10, 2, 24, 0.7); color: var(--lilac); cursor: pointer; transition: background 0.2s, transform 0.2s, color 0.2s;
}
.bl-remove:hover { background: rgba(255, 143, 168, 0.28); color: #fff; transform: rotate(90deg); }

.basket-summary { position: sticky; top: 86px; padding: 26px 26px 20px; }
.bs-title { font-size: 0.95rem; margin-bottom: 14px; text-align: center; }
.bs-rows { display: grid; gap: 8px; }
.bs-row { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.bs-row .dot { margin-right: 8px; }
.bs-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.bs-total .price-tag { font-size: 2.1rem; text-align: right; }
.bs-total small { display: block; margin-top: 4px; font: 700 0.7rem var(--font-body); letter-spacing: 0.04em; color: var(--muted); text-shadow: none; }
.bs-fine { margin: 8px 0 14px; }
.bs-perks {
  list-style: none; margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; display: grid; gap: 8px; font-size: 0.9rem;
  background: rgba(var(--accent-rgb), 0.08); border: 1px solid var(--line-soft);
}
.bs-perks li { display: flex; gap: 10px; align-items: center; }
.bs-perks svg { width: 20px; height: 20px; flex: none; color: #c9b6ff; }
.basket-summary .notice { margin-bottom: 10px; }
.bs-after { margin: 14px 0 0; }
.bs-clear { display: block; margin: 8px auto 0; color: var(--faint); }

/* The cat walks along the glowing line, then jumps up onto the Order now button. */
.cat-stage { position: relative; display: flex; justify-content: flex-end; padding-top: 76px; margin-top: 6px; }
.cat-stage::after {
  content: ""; position: absolute; left: -12px; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.75) 30%, rgba(255, 160, 240, 0.85));
  box-shadow: 0 0 10px rgba(255, 140, 230, 0.6);
}
.cat-perch { position: relative; }
.order-now { padding: 15px 26px; font-size: 0.92rem; }

/* ---------- double-check before ordering ---------- */
.modal.rv-modal { width: min(760px, 100%); }
.review { display: grid; gap: 16px; }
.rv-label { text-align: center; margin-top: 4px; }
.rv-designers { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.rv-designer {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; cursor: pointer; text-align: left;
  color: var(--ink); border: 1px solid var(--line); background: rgba(var(--accent-rgb), 0.08); transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.rv-designer:hover { background: rgba(var(--accent-rgb), 0.18); }
.rv-designer.on {
  border-color: #fff; background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.5), rgba(var(--accent-rgb), 0.22));
  box-shadow: 0 0 0 2px var(--accent-2), 0 0 26px rgba(var(--accent-rgb), 0.45);
}
.rv-designer > span:not(.tick) { display: grid; line-height: 1.25; }
.rv-designer small { color: var(--muted); font-size: 0.8rem; }
.rv-designer.on small { color: #fff; }
.rv-designer .tick {
  margin-left: auto; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 0.8rem;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); opacity: 0; transform: scale(0.6); transition: all 0.2s;
}
.rv-designer.on .tick { opacity: 1; transform: none; }
.dot.mixed { background: linear-gradient(90deg, #c58bff 50%, #3d7bff 50%); color: #8a8aff; }
.rv-designers.pick-me .rv-designer { animation: pick-me 1.8s ease-in-out infinite; }
.rv-designers.pick-me .rv-designer:nth-child(2) { animation-delay: 0.3s; }
@keyframes pick-me { 50% { border-color: rgba(255, 170, 240, 0.9); box-shadow: 0 0 22px rgba(255, 140, 230, 0.35); } }
.rv-line.waiting { border-style: dashed; border-color: rgba(255, 170, 240, 0.45); }
.rv-desc .textarea { min-height: 96px; }
.rv-lines { display: grid; gap: 10px; }
.rv-line {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.07); border: 1px solid var(--line-soft); transition: border-color 0.2s;
}
.rv-line.switched { border-color: rgba(255, 200, 110, 0.6); }
.rv-line .bl-img { width: 56px; }
.rv-main { min-width: 0; display: grid; gap: 5px; justify-items: start; }
.rv-who { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 0.9rem; flex-wrap: wrap; }
.rv-svc { width: auto; max-width: 100%; padding: 7px 10px; font-size: 0.86rem; border-radius: 10px; }
.rv-check { font-size: 0.78rem; color: #ffd08a; font-weight: 700; }
.rv-line .price-tag { font-size: 1.3rem; }
.rv-line .price-tag.quote { font-size: 0.8rem; }
.rv-sum { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 16px; background: rgba(10, 2, 24, 0.5); border: 1px solid var(--line); }
.rv-sum > div { display: grid; gap: 2px; }
.rv-sum > div:last-child { justify-items: end; text-align: right; }
.rv-sum small { color: var(--muted); font-size: 0.8rem; }
.rv-sum .price-tag { font-size: 1.9rem; }
.rv-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rv-stage { flex: 1; padding-top: 72px; margin-top: 0; }
.rv-stage::after { display: none; }

/* ---------- the cat ---------- */
.cat {
  position: absolute; left: calc(50% - 42px); bottom: calc(100% - 6px); width: 84px; height: 72px; z-index: 4; pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(200, 150, 255, 0.6)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.55));
  transition: opacity 0.3s;
}
.cat svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: none; }
.cat svg.cat-defs { display: block; width: 0; height: 0; overflow: hidden; }
.cat .fur { fill: url(#catFur); }
.cat .rim { stroke: rgba(214, 170, 255, 0.6); stroke-width: 0.9; }
.cat .leg { fill: url(#catFur); stroke: rgba(214, 170, 255, 0.45); stroke-width: 0.7; transform-box: fill-box; transform-origin: 50% 10%; transition: transform 0.2s; }
.cat .leg.far { fill: #0b0612; stroke: rgba(214, 170, 255, 0.25); }
.cat[data-state="away"] { opacity: 0; }
.cat[data-state="walk"] .cat-walk, .cat[data-state="crouch"] .cat-walk, .cat[data-state="jump"] .cat-walk { display: block; }
.cat[data-state="away"] .cat-sit, .cat[data-state="land"] .cat-sit, .cat[data-state="sit"] .cat-sit,
.cat[data-state="excited"] .cat-sit, .cat[data-state="happy"] .cat-sit, .cat[data-state="sleep"] .cat-sit { display: block; }

/* walking */
.cat .cat-walk { transform-origin: 50% 100%; transition: transform 0.25s ease; }
.cat .cat-walk .c-tail { transform-box: view-box; transform-origin: 24px 37px; transition: transform 0.25s; }
.cat .cat-walk .c-head { transform-box: view-box; transform-origin: 72px 32px; }
.cat[data-state="walk"] .cat-walk { animation: cat-bob 0.26s ease-in-out infinite alternate; }
.cat[data-state="walk"] .leg.front.near, .cat[data-state="walk"] .leg.back.far { animation: cat-step 0.52s ease-in-out infinite alternate; }
.cat[data-state="walk"] .leg.front.far, .cat[data-state="walk"] .leg.back.near { animation: cat-step 0.52s ease-in-out infinite alternate-reverse; }
.cat[data-state="walk"] .cat-walk .c-tail { animation: cat-tail-walk 0.9s ease-in-out infinite alternate; }
.cat[data-state="walk"] .cat-walk .c-head { animation: cat-nod 0.52s ease-in-out infinite alternate; }
@keyframes cat-step { from { transform: rotate(26deg); } to { transform: rotate(-26deg); } }
@keyframes cat-bob { to { transform: translateY(-1.5px); } }
@keyframes cat-tail-walk { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
@keyframes cat-nod { to { transform: rotate(3deg) translateY(0.6px); } }
/* crouch, then leap */
.cat[data-state="crouch"] .cat-walk { transform: scale(1.06, 0.84); }
.cat[data-state="crouch"] .cat-walk .c-tail { transform: rotate(16deg); }
.cat[data-state="jump"] .cat-walk { transform: rotate(-14deg); transition-duration: 0.12s; }
.cat[data-state="jump"] .leg.front { transform: rotate(-60deg); }
.cat[data-state="jump"] .leg.back { transform: rotate(55deg); }

/* sitting and waiting */
.cat .cat-sit { transform-origin: 50% 100%; transition: transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1); }
.cat[data-state="land"] .cat-sit { transform: scale(1.15, 0.8); transition-duration: 0.08s; }
.cat[data-state="sit"] .cat-sit { animation: cat-breathe 3.2s ease-in-out infinite; }
.cat .cat-sit .c-tail { transform-box: view-box; transform-origin: 50px 69px; animation: cat-swish 2.8s ease-in-out infinite; }
.cat .cat-sit .c-head { transform-box: view-box; transform-origin: 40px 40px; }
.cat[data-state="sit"] .cat-sit .c-head { animation: cat-tilt 7s ease-in-out infinite; }
.cat .c-eyes { transform-box: fill-box; transform-origin: center; animation: cat-blink 4.6s infinite; }
.cat .c-ear-r { transform-box: fill-box; transform-origin: 30% 100%; animation: cat-ear 5.4s infinite; }
.cat .c-eyes-happy, .cat .c-eyes-sleep { display: none; }
.cat[data-state="excited"] .c-eyes, .cat[data-state="happy"] .c-eyes, .cat[data-state="sleep"] .c-eyes { display: none; }
.cat[data-state="excited"] .c-eyes-happy, .cat[data-state="happy"] .c-eyes-happy, .cat[data-state="sleep"] .c-eyes-sleep { display: inline; }
.cat[data-state="excited"] .cat-sit { animation: cat-hop 0.55s cubic-bezier(0.3, 1.4, 0.5, 1); }
.cat[data-state="happy"] .cat-sit { animation: cat-hop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) infinite; }
.cat[data-state="excited"] .cat-sit .c-tail, .cat[data-state="happy"] .cat-sit .c-tail { animation-duration: 0.9s; }
@keyframes cat-breathe { 50% { transform: scale(1.015, 1.03); } }
@keyframes cat-swish { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-16deg); } 60% { transform: rotate(7deg); } }
@keyframes cat-tilt { 0%, 38%, 100% { transform: rotate(0); } 46%, 66% { transform: rotate(-8deg); } 74% { transform: rotate(3deg); } }
@keyframes cat-blink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(0.08); } }
@keyframes cat-ear { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-16deg); } 94% { transform: rotate(4deg); } }
@keyframes cat-hop { 0%, 100% { transform: translateY(0) scale(1); } 35% { transform: translateY(-9px) scale(0.96, 1.05); } 70% { transform: translateY(0) scale(1.06, 0.94); } }

/* what it says */
.cat-bubble {
  position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translate(-50%, 6px) scale(0.7); transform-origin: 50% 100%;
  opacity: 0; white-space: nowrap; padding: 5px 12px; border-radius: 999px; font: 800 0.78rem/1.3 var(--font-body); color: #3a1060;
  background: linear-gradient(180deg, #fff, #f3e2ff); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(255, 160, 240, 0.5);
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.cat-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: #f3e2ff; }
.cat-bubble.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.cat-bubble.wide { white-space: normal; width: 250px; text-align: center; border-radius: 18px; padding: 8px 14px; font-size: 0.84rem; }
/* "Order placed": the cat pops up on the ticket button and says thanks */
.cheer-row { padding-top: 140px; }
.cheer-row .cat-perch { display: inline-flex; }
.cat[data-state="walk"] .cat-bubble, .cat[data-state="jump"] .cat-bubble, .cat[data-state="crouch"] .cat-bubble { opacity: 0; }
.cat-heart {
  position: absolute; left: 50%; top: 12px; font-size: 1rem; color: #ff9eea; pointer-events: none;
  text-shadow: 0 0 8px rgba(255, 140, 230, 0.9); animation: cat-heart 1.3s ease-out both;
}
@keyframes cat-heart {
  from { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  20% { opacity: 1; }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -74px) scale(1.25); }
}

/* napping on a cushion when the basket is empty */
.basket-empty { text-align: center; padding: 34px 20px 40px; }
.cat-nap { position: relative; width: 150px; height: 104px; margin: 0 auto 8px; }
.cat-nap .cat { bottom: 14px; }
.cat[data-state="sleep"] .cat-sit { animation: cat-breathe 3.8s ease-in-out infinite; }
.cat[data-state="sleep"] .cat-sit .c-head { transform: rotate(-11deg) translateY(2px); }
.cat[data-state="sleep"] .cat-sit .c-tail { animation-duration: 6s; }
.cat[data-state="sleep"] .c-ear-r { animation: none; }
.cushion {
  position: absolute; left: 14px; right: 14px; bottom: 2px; height: 24px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #d29cff, #6a2bb8 72%);
  box-shadow: 0 0 26px rgba(180, 110, 255, 0.6), inset 0 -4px 8px rgba(40, 0, 80, 0.6);
}
.zzz { position: absolute; right: 18px; top: 4px; width: 30px; height: 40px; }
.zzz i { position: absolute; left: 0; bottom: 0; font: 900 1rem var(--font-label); font-style: normal; color: #e8d2ff; text-shadow: 0 0 8px rgba(200, 150, 255, 0.9); opacity: 0; animation: zzz 3s ease-in-out infinite; }
.zzz i:nth-child(2) { animation-delay: 1s; font-size: 0.85rem; }
.zzz i:nth-child(3) { animation-delay: 2s; font-size: 0.7rem; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 10px) scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(16px, -30px) scale(1.2); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .basket-grid { grid-template-columns: 1fr; }
  .basket-summary { position: relative; top: 0; max-width: 560px; width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
  .basket-group { padding: 20px 14px; }
  .basket-line { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding-right: 42px; }
  .bg-name { font-size: 1.65rem; }
  .pick-tray { gap: 10px; padding: 8px 8px 8px 10px; bottom: 10px; }
  .pt-thumb { width: 36px; height: 44px; margin-left: -18px; }
  .pt-thumb:nth-child(n + 5) { display: none; }
  .pt-text span { display: none; }
  .confirm-picks { grid-template-columns: 1fr; }
  .order-now { padding: 13px 20px; }
  .rv-line { grid-template-columns: 48px minmax(0, 1fr); }
  .rv-line .bl-img { width: 48px; }
  .rv-line .price-tag { grid-column: 2; justify-self: start; }
  .rv-actions { flex-direction: column-reverse; align-items: stretch; }
  .rv-stage { justify-content: center; }
}
