/* Store: admin-added products + buy popup (matches site.css variables) */
.cp-card .cp-desc { white-space: pre-line; color: var(--muted); }
.cp-card.is-soldout .price, .cp-card.is-soldout h2 { opacity: .6; }
.cp-modal { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.66); }
.cp-modal.open { display: flex; }
.cp-box { position: relative; width: min(460px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 16px; padding: 24px 22px; }
.cp-box h3 { margin: 0 34px 12px 0; font-size: 20px; }
.cp-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 22px; line-height: 1; cursor: pointer; }
.cp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cp-total { font-size: 20px; color: var(--accent); }
.cp-qty { display: inline-flex; align-items: center; gap: 10px; }
.cp-qty button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; }
.cp-qty button:disabled { opacity: .4; cursor: default; }
.cp-qty em { font-style: normal; min-width: 18px; text-align: center; }
.cp-steps { margin: 14px 0 6px; font-size: 14.5px; }
.cp-steps p { margin: 8px 0; }
.cp-methods { display: flex; gap: 8px; margin: 8px 0; }
.cp-m { flex: 1; height: 38px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 700; cursor: pointer; }
.cp-m.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cp-num, .cp-item > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-num { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.cp-num code, .cp-item code { font-size: 17px; word-break: break-all; user-select: all; }
.cp-copy { margin-left: auto; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-strong); background: transparent; font-size: 12.5px; cursor: pointer; }
.cp-l { display: block; margin: 10px 0; font-size: 13.5px; color: var(--muted); }
.cp-l input { display: block; width: 100%; margin-top: 5px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: 16px; }
.cp-err { display: none; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: rgba(229,72,77,.14); color: #ff8a8d; font-size: 14px; }
.cp-err.show { display: block; }
.cp-go { width: 100%; margin-top: 6px; }
.cp-muted { color: var(--muted); font-size: 13.5px; }
.cp-ok { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.cp-item { border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; margin: 10px 0; display: grid; gap: 10px; }
.cp-item small, .cp-note small { display: block; color: var(--muted); font-size: 12px; width: 100%; }
.cp-note { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }

/* Compact cards (Gemini + admin-added products): same size as AE / PR. "See details" opens the rest. */
#buy .buy.is-compact .shop-media { height: 150px; margin-bottom: 18px; }
#buy .buy.is-compact:not(.cp-open) .buy-side,
#buy .buy.is-compact:not(.cp-open) .cp-desc { display: none; }
#buy .buy.is-compact:not(.cp-open) .buy-main > p:not(.cp-desc) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; margin-bottom: 14px; }
#buy .buy.is-compact .buy-main > h2 { min-height: 0; }
#buy .buy.is-compact .buy-actions .cp-more { order: 3; height: 40px; }
#buy .buy.is-compact .buy-actions .cp-more::after { content: " \2193"; }
#buy .buy.is-compact.cp-open .buy-actions .cp-more::after { content: " \2191"; }

/* Empty helper divs must not take a grid cell (they left a blank gap next to a card). */
#buy .pricing-grid > #cpHead,
#buy .pricing-grid > #cpGrid { display: none !important; }

/* Every card image is 16:9 (YouTube size) so all cards look the same. */
#buy .pricing-grid > .buy .shop-media { height: auto !important; aspect-ratio: 16 / 9; }
#buy .pricing-grid > .buy .shop-media img { object-position: center 45%; }

/* The picture must keep its 16:9 size inside the card (it was being squeezed flat). */
#buy .pricing-grid > .buy .shop-media { flex: none !important; width: 100%; }

/* ---- details of admin-added products: badge, short line, "what you get" list ---- */
#buy .pricing-grid > .cp-card { aspect-ratio: auto; }
#buy .cp-card .buy-main > h2, #buy .cp-card .buy-main > p { min-height: 0; }
.cp-badge { display: inline-block; align-self: flex-start; margin: 0 0 10px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; color: #3b5bdb; background: rgba(59,91,219,.1); border: 1px solid rgba(59,91,219,.25); }
#buy .cp-card .buy-main > p.cp-tag { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 14px; }
#buy .buy.is-compact.cp-open .buy-main > p.cp-tag { display: block; -webkit-line-clamp: unset; }
.cp-feats h3 { margin: 6px 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.cp-feats ul { list-style: none; margin: 0 0 14px; padding: 12px 14px; display: grid; gap: 9px; border-radius: 14px; background: rgba(120,120,160,.08); border: 1px solid rgba(120,120,160,.2); }
.cp-feats li { position: relative; padding-left: 26px; font-size: 13.5px; line-height: 1.4; }
.cp-feats li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: rgba(91,91,214,.16); color: #5b5bd6; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#buy .buy.is-compact:not(.cp-open) .cp-feats { display: none; }

/* "See details" opens only its own card; the card beside it must not stretch to match. */
#buy .pricing-grid > .buy.is-compact,
#buy .pricing-grid > .cp-card { align-self: start; }

/* Icon of admin-added products (first letter) - same look as the other cards' icons. */
#buy .prod-badge--cp { background: linear-gradient(145deg,#4285f4,#9b72f2 60%,#d96570); color: #fff; }

/* After Effects + Premiere cards: same behaviour as Gemini - grow to fit (nothing clipped), "See details" opens "What you get". */
#buy .pricing-grid > .buy.buy--ae,
#buy .pricing-grid > .buy.buy--pr { aspect-ratio: auto !important; height: auto !important; min-height: 0 !important; overflow: visible; }
#buy .pricing-grid > .buy.buy--ae.is-compact:not(.cp-open) .buy-main > p:not(.cp-desc),
#buy .pricing-grid > .buy.buy--pr.is-compact:not(.cp-open) .buy-main > p:not(.cp-desc) { min-height: 3em; }

/* "See details": the list opens in 2 columns so the card does not get very tall. */
#buy .buy.is-compact .buy-side ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; padding: 14px 12px; }
#buy .buy.is-compact .buy-side li { gap: 8px; font-size: 12.5px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
#buy .buy.is-compact .buy-side li small { font-size: 11px; margin-top: 2px; }
#buy .buy .buy-side li svg { flex: none; }
#buy .buy.is-compact .buy-side li svg { width: 18px; height: 18px; padding: 4px; }
@media (max-width: 360px) { #buy .buy.is-compact .buy-side ul { grid-template-columns: minmax(0, 1fr); } }

/* offer price: small muted old price + slim green discount chip */
#buy .buy .price .cp-was { font-size: 18px !important; font-weight: 500; letter-spacing: 0; margin-left: 8px; color: #9a9aa0 !important; -webkit-text-fill-color: #9a9aa0 !important; text-decoration-thickness: 1.5px; }
#buy .buy .price .cp-off { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 6px; font: 700 12px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0; vertical-align: middle; position: relative; top: -4px; color: #15803d !important; -webkit-text-fill-color: #15803d !important; background: rgba(22,163,74,.12); }

/* Claude Token pack chips */
#buy .ct-chips{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 4px}
#buy .ct-chip{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:84px;padding:10px 16px;border-radius:14px;border:1.5px solid rgba(128,128,128,.35);background:transparent;color:inherit;cursor:pointer;font:inherit;transition:border-color .15s,transform .15s}
#buy .ct-chip b{font-size:17px}
#buy .ct-chip small{opacity:.7;font-size:12px}
#buy .ct-chip.on{border-color:#9b72f2;box-shadow:0 0 0 3px rgba(155,114,242,.25)}
#buy .ct-chip.out{opacity:.45}
#buy .ct-chip:hover{transform:translateY(-1px)}
