/*
 * /store — e-commerce styling in the CustomNameTrace ebook palette
 * (the same colors printed in every PDF: cream paper, navy ink and
 * coral / sunshine / mint / sky / purple accents) with Andika, the
 * ebooks' own typeface, for headings. Scoped to body.store-page so the
 * rest of the site is untouched.
 */
.store-page {
    --cnt-cream: #fff8ec;
    --cnt-cream-2: #fdeed6;
    --cnt-navy: #073b4c;
    --cnt-navy-soft: #3d5f6b;
    --cnt-coral: #ff6b6b;
    --cnt-coral-dark: #e04f4f;
    --cnt-sun: #ffd166;
    --cnt-mint: #06d6a0;
    --cnt-sky: #118ab2;
    --cnt-purple: #9b5de5;
    --cnt-line: #f0dfc2;
    --cnt-radius: 18px;
    --cnt-shadow: 0 6px 0 rgba(7, 59, 76, 0.08), 0 14px 30px rgba(7, 59, 76, 0.08);

    background: var(--cnt-cream);
    color: var(--cnt-navy);
}
.store-page main a:not(.btn, .cat-pill, .cat-card, .share-btn) { color: var(--cnt-sky); }
.store-page .store-h1,
.store-page .store-h2,
.store-page .store-h3,
.store-page .product-card__title,
.store-page .store-article h2,
.store-page .store-article h3 { font-family: 'Andika', 'Inter', sans-serif; color: var(--cnt-navy); font-weight: 700; }
.store-page .store-h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.1; margin-bottom: 0.75rem; }
.store-page .store-h1--product { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.store-page .store-h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin-bottom: 1rem; }
.store-page .store-h3 { font-size: 1.2rem; }
.store-page .eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; font-size: 0.8rem; color: var(--cnt-coral-dark); margin-bottom: 0.5rem; }
.store-page .lead { color: var(--cnt-navy-soft); }
.store-page .breadcrumb a { color: var(--cnt-navy-soft); }

/* Buttons */
.store-page .btn-store { background: var(--cnt-coral); border: 2px solid var(--cnt-coral); color: #fff; font-weight: 700; border-radius: 999px; padding-inline: 1.25rem; box-shadow: 0 4px 0 var(--cnt-coral-dark); }
.store-page .btn-store:hover { background: var(--cnt-coral-dark); border-color: var(--cnt-coral-dark); color: #fff; text-decoration: none; transform: translateY(1px); box-shadow: 0 3px 0 #b83c3c; }
.store-page .btn-store-outline { background: #fff; border: 2px solid var(--cnt-navy); color: var(--cnt-navy); font-weight: 700; border-radius: 999px; padding-inline: 1.25rem; }
.store-page .btn-store-outline:hover { background: var(--cnt-navy); color: #fff; text-decoration: none; }

/* Hero */
.store-hero { padding: 2rem 0 3rem; background:
    radial-gradient(circle at 8% 20%, rgba(255, 209, 102, 0.45) 0 70px, transparent 71px),
    radial-gradient(circle at 92% 12%, rgba(6, 214, 160, 0.25) 0 90px, transparent 91px),
    radial-gradient(circle at 85% 90%, rgba(155, 93, 229, 0.18) 0 60px, transparent 61px), var(--cnt-cream-2); border-bottom: 4px dashed var(--cnt-line); }
.store-hero--coral { background-color: #ffe9e4; }
.store-hero--purple { background-color: #f1e7fd; }
.store-hero--sky { background-color: #e3f3f9; }
.store-hero--mint { background-color: #e0f8ef; }
.store-hero--sun { background-color: #fff4d6; }
.value-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.value-list li { background: #fff; border: 2px solid var(--cnt-line); border-radius: 999px; padding: 0.25rem 0.85rem; font-weight: 600; font-size: 0.9rem; }
.value-list li::before { content: "★ "; color: var(--cnt-sun); }
.hero-collage { position: relative; height: 360px; }
.hero-collage__img { position: absolute; width: 52%; height: auto; aspect-ratio: 800 / 1035; border-radius: 10px; box-shadow: var(--cnt-shadow); background: #fff; }
.hero-collage__img--0 { left: 24%; top: 0; z-index: 3; }
.hero-collage__img--1 { left: 0; top: 40px; transform: rotate(-6deg); }
.hero-collage__img--2 { right: 0; top: 40px; transform: rotate(6deg); }
.hub-intro { max-width: 60rem; }
.jump-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.jump-links a { background: #fff; border-radius: 999px; padding: 0.3rem 0.9rem; font-weight: 600; border: 2px solid var(--cnt-line); color: var(--cnt-navy) !important; }

/* Sections */
.store-section { padding: 2.5rem 0; border-bottom: 2px dashed var(--cnt-line); }
.store-section:last-child { border-bottom: 0; }
.section-intro { color: var(--cnt-navy-soft); }

/* Category cards & pills */
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.cat-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; border-radius: var(--cnt-radius); background: #fff; border: 3px solid var(--c, var(--cnt-sky)); color: var(--cnt-navy); box-shadow: var(--cnt-shadow); transition: transform 0.15s; }
.cat-card:hover { transform: translateY(-3px); text-decoration: none; color: var(--cnt-navy); }
.cat-card__icon { font-family: 'Andika', sans-serif; font-weight: 700; font-size: 1.6rem; color: var(--c); }
.cat-card__name { font-weight: 700; }
.cat-card__count { font-size: 0.85rem; color: var(--cnt-navy-soft); }
.cat-card--coral { --c: var(--cnt-coral); } .cat-card--purple { --c: var(--cnt-purple); } .cat-card--sky { --c: var(--cnt-sky); }
.cat-card--mint { --c: var(--cnt-mint); } .cat-card--sun { --c: #e0a100; }
.cat-pill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.65rem; border-radius: 999px; color: #fff; background: var(--cnt-sky); }
.cat-pill:hover { color: #fff; text-decoration: none; filter: brightness(0.92); }
.cat-pill--alphabet-tracing { background: var(--cnt-coral-dark); }
.cat-pill--coloring-pages { background: var(--cnt-purple); }
.cat-pill--sight-words-early-reading { background: var(--cnt-sky); }
.cat-pill--fine-motor-pre-writing { background: #079b74; }
.cat-pill--math-numbers { background: #b97f00; }
.sku { font-size: 0.72rem; color: var(--cnt-navy-soft); letter-spacing: 0.03em; }

/* Toolbar */
.store-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: center; margin: 1rem 0 0.5rem; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-pill { border: 2px solid var(--cnt-navy); background: #fff; color: var(--cnt-navy); border-radius: 999px; padding: 0.3rem 0.9rem; font-weight: 600; font-size: 0.9rem; }
.filter-pill.is-active, .filter-pill:hover { background: var(--cnt-navy); color: #fff; }
.toolbar-right { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toolbar-right .form-control { min-width: 240px; border-radius: 999px; border: 2px solid var(--cnt-line); }
.toolbar-right .form-select { width: auto; border-radius: 999px; border: 2px solid var(--cnt-line); }

/* Product grid & card — airy, one line per row, no wrapping labels */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 2rem 1.75rem; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .product-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-card { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 2px 0 rgba(7, 59, 76, 0.05), 0 12px 32px rgba(7, 59, 76, 0.08); display: flex; flex-direction: column; border: 1px solid #f3e6cf; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 2px 0 rgba(7, 59, 76, 0.05), 0 18px 40px rgba(7, 59, 76, 0.12); }
.product-card[hidden] { display: none; }
.product-card__media { display: block; background: var(--cnt-cream-2); }
.product-card__media img { width: 100%; height: auto; aspect-ratio: 800 / 450; object-fit: cover; display: block; }
.product-card__body { padding: 1.35rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.product-card__meta { display: flex; align-items: center; gap: 0.5rem; min-width: 0; margin-bottom: 0.7rem; }
.product-card__meta .cat-pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.product-badge { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--cnt-sun); color: var(--cnt-navy); white-space: nowrap; flex-shrink: 0; }
.product-badge--bundle { background: #efe5fc; color: #6b35b8; }
.product-badge--bestseller { background: #ffe3e3; color: #c43d3d; }
.product-badge--new { background: #d7f7ec; color: #05785b; }
.product-badge--seasonal { background: #fff1cc; color: #8a6200; }
.product-card__title { font-size: 1.3rem; line-height: 1.25; margin: 0 0 0.5rem; }
.product-card__title a { color: var(--cnt-navy) !important; text-decoration: none; }
.product-card__title a:hover { color: var(--cnt-coral-dark) !important; }
.product-card__desc { font-size: 0.93rem; line-height: 1.55; color: var(--cnt-navy-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0.9rem; }
.spec-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.25rem; }
.spec-tags li { font-size: 0.76rem; font-weight: 600; color: var(--cnt-navy-soft); background: var(--cnt-cream); border-radius: 999px; padding: 0.22rem 0.65rem; white-space: nowrap; }
.product-card__footer { margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--cnt-line); }
.product-card__price { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.85rem; }
.product-card__price .price { font-size: 1.6rem; line-height: 1; }
.details-link { margin-left: auto; font-weight: 600; font-size: 0.9rem; white-space: nowrap; color: var(--cnt-sky) !important; }
.product-card__actions { display: flex; gap: 0.5rem; align-items: center; }
.product-card__actions .btn-store { flex: 1; white-space: nowrap; padding: 0.6rem 1rem; }
.share-icon { flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid var(--cnt-line); background: #fff; color: var(--cnt-navy); display: grid; place-items: center; }
.share-icon:hover { border-color: var(--cnt-navy); background: var(--cnt-navy); color: #fff; }
.result-count { margin: 0.25rem 0 1rem; }

/* Preview strip */
.preview-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem; }
.preview-tile { margin: 0; }
.preview-tile img { width: 100%; height: auto; aspect-ratio: 800 / 1035; border-radius: 10px; background: #fff; box-shadow: var(--cnt-shadow); }
.preview-tile figcaption { font-size: 0.85rem; margin-top: 0.5rem; color: var(--cnt-navy-soft); }

/* Article */
.store-article { max-width: 52rem; font-size: 1.05rem; line-height: 1.75; }
.store-article h2 { font-size: 1.6rem; margin-top: 2rem; scroll-margin-top: 90px; }
.store-article h3 { font-size: 1.2rem; margin-top: 1.4rem; }
.store-article ul, .store-article ol { padding-left: 1.3rem; }
.store-article blockquote { border-left: 5px solid var(--cnt-sun); background: #fff; padding: 0.75rem 1rem; border-radius: 0 10px 10px 0; }
.toc { background: #fff; border-radius: var(--cnt-radius); padding: 1rem 1.25rem; border: 2px dashed var(--cnt-line); margin-bottom: 1.5rem; }
.toc__title { font-weight: 700; margin-bottom: 0.4rem; }
.toc ol { margin: 0; columns: 2; font-size: 0.95rem; }

/* Formats, stages, routine, steps */
.format-card { background: #fff; border-radius: var(--cnt-radius); padding: 1.25rem; height: 100%; border-top: 6px solid var(--cnt-sky); box-shadow: var(--cnt-shadow); }
.format-card--print { border-top-color: var(--cnt-coral); }
.format-card h3 { font-family: 'Andika', sans-serif; font-size: 1.2rem; }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stage { background: #fff; border-radius: 14px; padding: 1rem; border-left: 6px solid var(--cnt-coral); }
.stage--1 { border-left-color: var(--cnt-sun); } .stage--2 { border-left-color: var(--cnt-mint); } .stage--3 { border-left-color: var(--cnt-purple); }
.routine-list, .step-list { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.routine-list li, .step-list li { counter-increment: s; background: #fff; border-radius: 14px; padding: 0.85rem 1rem 0.85rem 3.4rem; position: relative; }
.routine-list li::before, .step-list li::before { content: counter(s); position: absolute; left: 0.9rem; top: 0.75rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--cnt-coral); color: #fff; font-weight: 700; display: grid; place-items: center; }
.step-list li:nth-child(5n+2)::before { background: var(--cnt-sun); color: var(--cnt-navy); }
.step-list li:nth-child(5n+3)::before { background: var(--cnt-mint); color: var(--cnt-navy); }
.step-list li:nth-child(5n+4)::before { background: var(--cnt-sky); }
.step-list li:nth-child(5n+5)::before { background: var(--cnt-purple); }

/* FAQ */
.store-faq .accordion-item { border: 0; border-radius: 14px !important; margin-bottom: 0.6rem; overflow: hidden; }
.store-faq .accordion-button { font-weight: 700; color: var(--cnt-navy); }
.store-faq .accordion-button:not(.collapsed) { background: #fff4d6; color: var(--cnt-navy); box-shadow: none; }

/* Compare & spec tables */
.compare-table, .spec-table { background: #fff; border-radius: var(--cnt-radius); overflow: hidden; }
.spec-table th { width: 38%; color: var(--cnt-navy-soft); font-weight: 600; }
.inside-list { list-style: none; padding: 0; }
.inside-list li { padding: 0.5rem 0 0.5rem 1.8rem; position: relative; border-bottom: 1px dashed var(--cnt-line); }
.inside-list li::before { content: "✓"; position: absolute; left: 0.2rem; color: var(--cnt-mint); font-weight: 700; }

/* Gallery */
.gallery__stage { position: relative; margin: 0; background: #fff; border-radius: var(--cnt-radius); box-shadow: var(--cnt-shadow); padding: 1rem; }
.gallery__zoom { display: block; border: 0; background: none; padding: 0; width: 100%; cursor: zoom-in; }
.gallery__stage img { width: 100%; height: auto; aspect-ratio: 800 / 1035; max-height: 72vh; object-fit: contain; }
.gallery__nav { position: absolute; top: 45%; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: var(--cnt-navy); color: #fff; font-size: 1.6rem; line-height: 1; opacity: 0.85; }
.gallery__nav--prev { left: 0.6rem; } .gallery__nav--next { right: 0.6rem; }
.gallery__caption { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; margin-top: 0.75rem; color: var(--cnt-navy-soft); }
.gallery__count { font-weight: 700; color: var(--cnt-navy); white-space: nowrap; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; margin-top: 0.75rem; }
.gallery__thumb { border: 3px solid transparent; border-radius: 10px; padding: 0; background: #fff; overflow: hidden; }
.gallery__thumb img { width: 100%; height: auto; aspect-ratio: 800 / 1035; display: block; }
.gallery__thumb.is-active { border-color: var(--cnt-coral); }
.gallery__lightbox { border: 0; border-radius: 14px; padding: 1rem; max-width: min(92vw, 900px); background: #fff; }
.gallery__lightbox::backdrop { background: rgba(7, 59, 76, 0.75); }
.gallery__lightbox img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; aspect-ratio: 800 / 1035; }
.gallery__lightbox-cap { text-align: center; margin: 0.5rem 0 0; }
.gallery__close { position: absolute; top: 0.4rem; right: 0.6rem; border: 0; background: var(--cnt-coral); color: #fff; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-size: 1.4rem; line-height: 1; }

/* Buy box */
.buy-box { background: #fff; border-radius: var(--cnt-radius); box-shadow: var(--cnt-shadow); padding: 1.5rem; position: sticky; top: 90px; border-top: 8px solid var(--cnt-sun); }
.buy-box__subtitle { color: var(--cnt-navy-soft); font-weight: 600; }
.buy-box__price .price { font-size: 2.2rem; }
.buy-box__specs { list-style: none; padding: 0; font-size: 0.92rem; }
.buy-box__specs li { padding: 0.2rem 0; }
.buy-box__note { font-size: 0.82rem; color: var(--cnt-navy-soft); margin: 0.75rem 0; text-align: center; }

/* Share */
.share-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.share-bar--bar { background: #fff; border-radius: 999px; padding: 0.6rem 1rem; box-shadow: var(--cnt-shadow); }
.share-bar__label { font-weight: 700; font-size: 0.9rem; margin-right: 0.25rem; }
.share-btn { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 0.3rem 0.75rem; border: 2px solid var(--cnt-line); background: var(--cnt-cream); color: var(--cnt-navy); }
.share-btn:hover { background: var(--cnt-navy); color: #fff; text-decoration: none; }
.share-btn--copy { background: var(--cnt-sun); border-color: var(--cnt-sun); }
.store-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: var(--cnt-navy); color: #fff; padding: 0.6rem 1.2rem; border-radius: 999px; font-weight: 600; transition: transform 0.25s; z-index: 2000; }
.store-toast.is-visible { transform: translate(-50%, 0); }

/* CTA & sticky buy */
.cta-band { background: #fff; border-radius: var(--cnt-radius); padding: 2rem; margin: 2rem 0; box-shadow: var(--cnt-shadow); border: 3px dashed var(--cnt-sun); }
.sticky-buy { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; padding: 0.6rem 1rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 -4px 16px rgba(7, 59, 76, 0.12); z-index: 1020; font-family: 'Andika', sans-serif; font-weight: 700; font-size: 1.3rem; }
.no-results { padding: 2rem; text-align: center; font-weight: 600; }

@media (max-width: 767.98px) {
    .hero-collage { height: 260px; }
    .toolbar-right .form-control { min-width: 0; flex: 1; }
    .toc ol { columns: 1; }
    .buy-box { position: static; }
    .store-page { padding-bottom: 4rem; }
}
