/* Top-Up hub + category views (page branch claude/commerce-hub). Page-local parts only, prefix cmh-.
   Uses the shop's colour tokens (light and dark mode); the hero keeps its own dark stage in both. */
.cmh-page { --cmh-ink: #14112b; --cmh-a: #7c3aed; --cmh-b: #ec4899; --cmh-c: #fb923c; --cmh-line: rgba(120, 130, 155, .22); --cmh-grad: linear-gradient(100deg, var(--cmh-a), var(--cmh-b) 55%, var(--cmh-c)); }
.cmh-page .cm-breadcrumb ol { margin-bottom: 14px; }
.cmh-h2 { font-weight: 700; font-size: 24px; line-height: 30px; margin: 0 0 16px; color: var(--dark-text); letter-spacing: -.2px; }
.cmh-block { margin-top: 44px; }
.cmh-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cmh-count { font-size: 14px; color: var(--dark-gray); white-space: nowrap; }
.cmh-page a:focus-visible, .cmh-search-field:focus-within { outline: 3px solid #a78bfa; outline-offset: 2px; }

/* ---- hero ---- */
.cmh-hero { position: relative; z-index: 5; border-radius: 28px; padding: 48px; color: #fff; min-height: 380px; display: flex; align-items: center;
 background: radial-gradient(60% 90% at 88% 10%, rgba(236, 72, 153, .55), transparent 60%), radial-gradient(55% 80% at 100% 100%, rgba(251, 146, 60, .38), transparent 62%), radial-gradient(70% 100% at 0% 0%, rgba(124, 58, 237, .6), transparent 62%), var(--cmh-ink); }
.cmh-hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .5; background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(100deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(100deg, #000, transparent 70%); }
.cmh-hero-text { position: relative; z-index: 2; width: 100%; max-width: 560px; }
.cmh-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); font-size: 13px; font-weight: 600; }
.cmh-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .22); }
.cmh-h1 { margin: 16px 0 10px; font-weight: 800; font-size: 46px; line-height: 1.08; letter-spacing: -1px; color: #fff; }
.cmh-h1 em { font-style: normal; display: block; background: linear-gradient(95deg, #ffd08a, #ff8fb4 55%, #c9a7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cmh-hero-lead { margin: 0 0 24px; font-size: 17px; line-height: 26px; color: rgba(255, 255, 255, .8); max-width: 470px; }

.cmh-search { position: relative; max-width: 520px; }
.cmh-search-field { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px 0 18px; margin: 0; border-radius: 18px; background: #fff; color: #6b7280; box-shadow: 0 14px 34px rgba(8, 5, 30, .35); cursor: text; }
.cmh-search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 17px; color: #14112b; font-family: inherit; }
.cmh-search-field input::placeholder { color: #8a8f9c; }
.cmh-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cmh-search-key { flex: 0 0 auto; min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #f1f1f6; color: #6b7280; font: 600 13px/1 ui-monospace, Menlo, monospace; box-shadow: inset 0 -2px 0 #dcdce6; }
.cmh-hits { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; background: #fff; color: #14112b; border-radius: 18px; padding: 8px; box-shadow: 0 24px 60px rgba(8, 5, 30, .35); max-height: 372px; overflow-y: auto; }
.cmh-hit { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 10px; border-radius: 12px; color: #14112b; }
.cmh-hit:hover, .cmh-hit.is-on { background: #f3f0ff; color: #14112b; }
.cmh-hit img, .cmh-hit i { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.cmh-hit i { display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; color: #fff; background: linear-gradient(135deg, #fda343, #ff5884); }
.cmh-hit-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cmh-hit-text b { font-size: 15px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmh-hit-text small { font-size: 12px; color: #6b7280; }
.cmh-hit-price { font-size: 13px; color: #6b7280; white-space: nowrap; }
.cmh-hit-price strong { color: #14112b; }
.cmh-hits-empty { margin: 0; padding: 14px 12px; font-size: 15px; color: #4b5563; }
.cmh-hits-empty a { color: var(--cmh-a); font-weight: 600; text-decoration: underline; }

.cmh-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 13px; color: rgba(255, 255, 255, .7); }
.cmh-quick a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); font-weight: 600; }
.cmh-quick a:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* picture wall of the hub hero */
.cmh-hero-art { position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.cmh-art { position: absolute; }
.cmh-hero--hub .cmh-art { right: -34px; top: 50%; width: 470px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; transform: translateY(-50%) rotate(-9deg); }
.cmh-art-item { display: block; aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: linear-gradient(135deg, #fda343, #ff5884); box-shadow: 0 18px 40px rgba(6, 3, 24, .45), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.cmh-art-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmh-art-item b { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 54px; color: #fff; }
.cmh-hero--hub .cmh-art-item:nth-child(3n+1) { transform: translateY(34px); }
.cmh-hero--hub .cmh-art-item:nth-child(3n) { transform: translateY(-28px); }
@media (prefers-reduced-motion: no-preference) {
 .cmh-hero--hub .cmh-art-item { animation: cmh-float 7s ease-in-out infinite alternate; }
 .cmh-hero--hub .cmh-art-item:nth-child(3n+2) { animation-delay: -2.3s; }
 .cmh-hero--hub .cmh-art-item:nth-child(3n) { animation-delay: -4.6s; }
}
@keyframes cmh-float { from { translate: 0 -6px; } to { translate: 0 8px; } }

/* category hero: lower, own tone, fan of pictures */
.cmh-hero--cat { min-height: 0; padding: 40px 48px; }
.cmh-hero--cat .cmh-h1 { font-size: 38px; margin-top: 14px; }
.cmh-hero--cat .cmh-art { right: 56px; top: 50%; transform: translateY(-50%); display: flex; }
.cmh-hero--cat .cmh-art-item { width: 128px; margin-left: -42px; border-radius: 28px; }
.cmh-hero--cat .cmh-art-item:nth-child(1) { transform: rotate(-10deg) translateY(10px); }
.cmh-hero--cat .cmh-art-item:nth-child(2) { transform: rotate(-4deg) translateY(-8px); }
.cmh-hero--cat .cmh-art-item:nth-child(3) { transform: translateY(-14px); z-index: 1; }
.cmh-hero--cat .cmh-art-item:nth-child(4) { transform: rotate(5deg) translateY(-6px); }
.cmh-hero--cat .cmh-art-item:nth-child(5) { transform: rotate(11deg) translateY(12px); }
.cmh-hero.cmh-tone-blue { background: radial-gradient(60% 90% at 90% 0%, rgba(56, 189, 248, .5), transparent 60%), radial-gradient(60% 90% at 100% 100%, rgba(124, 58, 237, .45), transparent 62%), radial-gradient(70% 100% at 0% 0%, rgba(37, 99, 235, .6), transparent 62%), #0d1530; }
.cmh-hero.cmh-tone-amber { background: radial-gradient(60% 90% at 90% 0%, rgba(251, 146, 60, .55), transparent 60%), radial-gradient(60% 90% at 100% 100%, rgba(236, 72, 153, .4), transparent 62%), radial-gradient(70% 100% at 0% 0%, rgba(202, 138, 4, .5), transparent 62%), #1d1420; }

/* ---- chips + order ---- */
.cmh-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.cmh-chips-wrap { position: relative; min-width: 0; flex: 1; }
.cmh-chips { display: flex; gap: 8px; list-style: none; margin: 0; padding: 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.cmh-chips::-webkit-scrollbar { display: none; }
.cmh-chips li { flex: 0 0 auto; scroll-snap-align: start; }
.cmh-chip { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 14px; background: var(--background-offwhite); color: var(--dark-text); font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.cmh-chip:hover { color: var(--dark-text); box-shadow: inset 0 0 0 2px var(--cmh-line); }
.cmh-chip-n { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--white); color: var(--dark-gray); }
.cmh-chip.is-active { background: var(--cmh-ink); color: #fff; box-shadow: none; }
.dark-mode .cmh-chip.is-active { background: var(--cmh-grad); }
.cmh-chip.is-active .cmh-chip-n { background: rgba(255, 255, 255, .18); color: #fff; }
.cmh-sort { flex: 0 0 auto; display: inline-flex; padding: 4px; border-radius: 14px; background: var(--background-offwhite); }
.cmh-sort a { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--dark-gray); }
.cmh-sort a.is-active { background: var(--white); color: var(--dark-text); box-shadow: 0 1px 3px rgba(20, 17, 43, .12); }

/* ---- ranked row ---- */
.cmh-rank { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cmh-rank-card { position: relative; display: flex; align-items: center; gap: 14px; height: 100%; padding: 16px 18px 16px 16px; border-radius: 22px; background: var(--background-offwhite); color: var(--dark-text); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.cmh-rank-card:hover { color: var(--dark-text); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20, 17, 43, .12); }
.cmh-rank-no { flex: 0 0 34px; text-align: center; font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -2px; background: var(--cmh-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cmh-rank li:nth-child(n+4) .cmh-rank-no { background: none; color: var(--dark-gray); opacity: .55; }
.cmh-rank-text { display: flex; flex-direction: column; min-width: 0; }
.cmh-rank-name { font-weight: 700; font-size: 16px; line-height: 21px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmh-rank-sub { font-size: 13px; color: var(--dark-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmh-rank-price { font-size: 14px; color: var(--dark-gray); margin-top: 4px; }
.cmh-rank-price strong { color: var(--dark-text); font-size: 15px; }

/* ---- picture tiles ---- */

/* ---- more categories ---- */
.cmh-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cmh-more-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; background: var(--background-offwhite); color: var(--dark-text); transition: transform .18s, box-shadow .18s; }
.cmh-more-card:hover { color: var(--dark-text); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20, 17, 43, .12); }
.cmh-more-icon { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--cmh-ink); }
.cmh-more-card.cmh-tone-violet .cmh-more-icon { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.cmh-more-card.cmh-tone-blue .cmh-more-icon { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.cmh-more-card.cmh-tone-amber .cmh-more-icon { background: linear-gradient(135deg, #f59e0b, #f43f5e); }
.cmh-more-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cmh-more-text strong { font-size: 16px; line-height: 22px; }
.cmh-more-text span { font-size: 13px; color: var(--dark-gray); }
.cmh-more-pics { display: flex; }
.cmh-more-pics .cm-logo { margin-left: -10px; box-shadow: 0 0 0 3px var(--background-offwhite); }

/* ---- how it works (kit block, spacing only) + benefits ---- */
.cmh-page .cmh-howto { margin-top: 56px; }
.cmh-page .cmh-howto .cm-h2, .cmh-page .cmh-faq .cm-h2 { font-size: 24px; line-height: 30px; margin-bottom: 16px; letter-spacing: -.2px; }
.cmh-benefits { list-style: none; margin: 0; padding: 26px 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-radius: 24px; color: #fff; background: radial-gradient(80% 140% at 0% 0%, rgba(124, 58, 237, .5), transparent 60%), radial-gradient(70% 140% at 100% 100%, rgba(236, 72, 153, .32), transparent 60%), var(--cmh-ink); }
.cmh-block:has(.cmh-benefits) { margin-top: 20px; }
.cmh-benefits li { display: flex; gap: 12px; min-width: 0; }
.cmh-benefit-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); color: #ffd08a; }
.cmh-benefits strong { display: block; font-size: 15px; line-height: 21px; }
.cmh-benefits p { margin: 3px 0 0; font-size: 13px; line-height: 19px; color: rgba(255, 255, 255, .72); }

/* ---- intro + faq ---- */
.cmh-info { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; margin-top: 56px; align-items: start; }
.cmh-intro p { margin: 0 0 14px; font-size: 15px; line-height: 25px; color: var(--middark-gray); }
.cmh-page .cmh-faq { margin-top: 0; }
.cmh-legal { margin: 36px 0 0; font-size: 12px; line-height: 18px; color: var(--dark-gray); }

/* ---- sizes ---- */
@media (max-width: 1199px) {
 .cmh-hero--hub .cmh-art { width: 400px; right: -60px; }
 .cmh-benefits { grid-template-columns: repeat(2, 1fr); }
 .cmh-hero--cat .cmh-art-item { width: 108px; }
}
@media (max-width: 991px) {
 .cmh-hero { padding: 36px 32px; min-height: 0; }
 .cmh-hero--hub .cmh-art { width: 300px; right: -90px; opacity: .55; }
 .cmh-hero--cat .cmh-hero-art { display: none; }
 .cmh-h1 { font-size: 38px; }
 .cmh-rank { grid-template-columns: repeat(2, 1fr); }
 .cmh-info { grid-template-columns: 1fr; gap: 36px; }
 .cmh-more { grid-template-columns: 1fr; }
 .cmh-search-key { display: none; }
}
@media (max-width: 767px) {
 .cmh-bar { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 16px; }
 /* chips scroll to the screen edge, a fade shows there is more */
 .cmh-chips-wrap { margin: 0 -15px; }
 .cmh-chips { padding: 2px 15px; }
 .cmh-chips-wrap::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 36px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--white)); }
 .cmh-sort { align-self: flex-start; }
 .cmh-rank { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -15px; padding: 4px 15px 10px; scrollbar-width: none; }
 .cmh-rank::-webkit-scrollbar { display: none; }
 .cmh-rank li { flex: 0 0 78%; scroll-snap-align: center; }
 .cmh-rank--3 li { flex-basis: 74%; }
}
@media (max-width: 575px) {
 .cmh-hero { border-radius: 22px; padding: 24px 18px 22px; display: block; }
 .cmh-hero--hub .cmh-hero-art { position: relative; inset: auto; height: 96px; margin: 20px -18px -22px; border-radius: 0 0 22px 22px; }
 .cmh-hero--hub .cmh-art { position: absolute; left: -14px; right: auto; top: 12px; width: auto; opacity: 1; transform: rotate(-4deg); display: flex; gap: 10px; }
 .cmh-hero--hub .cmh-art-item { flex: 0 0 76px; border-radius: 18px; transform: none !important; }
 .cmh-hero--hub .cmh-art-item:nth-child(even) { translate: 0 10px; animation: none; }
 .cmh-hero--hub .cmh-art-item:nth-child(n+7) { display: none; }
 .cmh-h1, .cmh-hero--cat .cmh-h1 { font-size: 31px; letter-spacing: -.6px; margin-top: 14px; }
 .cmh-hero-lead { font-size: 15px; line-height: 23px; margin-bottom: 18px; }
 .cmh-hero--cat { padding: 22px 18px; }
 .cmh-search-field { height: 54px; border-radius: 16px; }
 .cmh-search-field input { font-size: 16px; }
 .cmh-quick { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
 .cmh-quick::-webkit-scrollbar { display: none; }
 .cmh-quick a, .cmh-quick span { flex: 0 0 auto; }
 .cmh-quick a { height: 34px; }
 .cmh-h2, .cmh-page .cmh-howto .cm-h2, .cmh-page .cmh-faq .cm-h2 { font-size: 21px; line-height: 27px; margin-bottom: 12px; }
 .cmh-block { margin-top: 32px; }
 .cmh-chip { height: 44px; padding: 0 14px; }
 .cmh-benefits { grid-template-columns: 1fr; gap: 16px; padding: 20px 18px; border-radius: 20px; }
 .cmh-page .cmh-howto, .cmh-info { margin-top: 40px; }
 .cmh-rank-no { font-size: 34px; flex-basis: 28px; }
}
