/*
 * Modelo Confete (brinquedos, festa, infantil). Carregado DEPOIS do pro.css: troca o visual do motor Pro
 * e estiliza a página inicial própria (public/loja/templates/confete/home.php).
 * Claro sempre, cores pastel, tudo arredondado. Destaque = cor da marca da loja (--primary), definida no master.
 */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@500;600;700;800&display=swap');

body.loja-tpl-pro.loja-tpl-confete,
body.loja-tpl-pro.loja-tpl-confete[data-catalog-theme] {
  --p-bg: #fffaf2; --p-paper: #ffffff; --p-paper2: #f6f1ff; --p-line: rgba(42, 35, 67, .08); --p-line2: rgba(42, 35, 67, .14);
  --p-text: #2a2343; --p-muted: #6c6489; --p-soft: #4a4366;
  --p-accent: var(--primary, #ff5a6e); --p-on-accent: var(--tenant-on-primary, #ffffff);
  --p-warn: var(--primary, #ff5a6e); --p-error: #ff4d5e; --p-ok: #12a26b;
  --p-shadow: 0 10px 30px -12px rgba(42, 35, 67, .18);
  --p-r: 28px; --p-r-sm: 99px;
  --cf-ink: #2a2343; --cf-blue: #4d7cfe; --cf-yellow: #ffe27a;
  color-scheme: light;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600;
}
html:has(body.loja-tpl-pro.loja-tpl-confete) { background: #fffaf2; }

.loja-tpl-confete :is(.pro-h1, .pro-h2, .cf-title, .pro-summary__name, .pro-desc h3, .pro-sheet__head b, .pro-rv-avg b, .pro-brand) { font-family: 'Baloo 2', 'Nunito', sans-serif; font-weight: 800; letter-spacing: -.01em; }
.loja-tpl-confete .pro-h1 { font-size: 40px; line-height: 1.05; }
.loja-tpl-confete .pro-h2 { font-size: 32px; }

/* botões: pílula */
.loja-tpl-confete .pro-btn { border-radius: 99px; min-height: 54px; padding: 0 28px; font-weight: 800; }
.loja-tpl-confete .pro-btn--light { background: var(--cf-ink); color: #fff; }
.loja-tpl-confete .pro-btn--warn { background: var(--p-accent); color: var(--p-on-accent); box-shadow: 0 10px 22px -10px var(--p-accent); }
.loja-tpl-confete .pro-btn--ghost { box-shadow: inset 0 0 0 2px var(--p-line2); }
.cf-btn { display: inline-flex; align-items: center; height: 58px; padding: 0 30px; border-radius: 99px; background: var(--cf-ink); color: #fff; font-weight: 800; font-size: 16px; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.cf-btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 12px 24px -10px rgba(42, 35, 67, .5); }

/* topo */
.loja-tpl-confete .pro-top { background: color-mix(in srgb, #fffaf2 88%, transparent); }
.loja-tpl-confete .pro-top__in { height: 88px; }
.loja-tpl-confete .pro-brand { font-size: 32px; color: var(--p-accent); }
.loja-tpl-confete .pro-brand img { height: calc(48px * var(--pro-logo, 1)); }
.loja-tpl-confete .pro-nav { font-weight: 800; font-size: 15px; }
.loja-tpl-confete .pro-search { height: 48px; width: 260px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 2px #efe7ff; padding: 0 18px; }
.loja-tpl-confete .pro-iconbtn { width: 48px; height: 48px; background: #f4f1ff; }
.loja-tpl-confete .pro-iconbtn:hover { background: #ebe4ff; }
.loja-tpl-confete .pro-top__act .pro-iconbtn[data-pro-open="cart"] { background: var(--p-accent); color: var(--p-on-accent); }
.loja-tpl-confete .pro-count { top: -2px; right: -2px; background: var(--cf-ink); box-shadow: 0 0 0 2px #fffaf2; }
.loja-tpl-confete .pro-menu { border-radius: 22px; }

/* página inicial */
.cf-home { padding-bottom: 8px; }
.cf-sec { margin-top: 56px; }
.cf-title { margin: 0; color: var(--cf-ink); }
.cf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.cf-head .cf-title { font-size: 40px; line-height: 1.05; }
.cf-more { display: inline-flex; align-items: center; gap: 4px; color: var(--p-accent); font-weight: 800; white-space: nowrap; }
.cf-more:hover { gap: 8px; }

.cf-hero-wrap { margin-top: 8px; }
.cf-hero { position: relative; display: grid; }
.cf-slide { grid-area: 1 / 1; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; min-height: 480px; padding: 56px; overflow: hidden; border-radius: 44px; background: var(--cf-tone, var(--cf-yellow)); opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.cf-slide.is-on { opacity: 1; visibility: visible; transition: opacity .6s ease; z-index: 1; }
.cf-slide--art { display: block; min-height: 0; padding: 0; background: var(--p-paper2); }
.cf-hero__art img { width: 100%; height: auto; }
.cf-hero__copy { position: relative; z-index: 1; }
.cf-hero__copy .cf-title { margin-bottom: 14px; font-size: clamp(44px, 5.4vw, 76px); line-height: .95; text-wrap: balance; }
.cf-hero__copy p { max-width: 440px; margin: 0 0 26px; font-size: 19px; color: var(--cf-ink); }
.cf-hero__photo { position: relative; z-index: 1; display: block; height: 440px; overflow: hidden; border-radius: 200px 200px 40px 40px; transform: rotate(2deg); box-shadow: 0 30px 60px rgba(42, 35, 67, .18); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.cf-hero__photo:hover { transform: rotate(0) scale(1.01); }
.cf-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.cf-slide.is-on .cf-hero__copy > * { animation: cf-pop .7s cubic-bezier(.3, 1.5, .5, 1) both; }
.cf-slide.is-on .cf-hero__copy > :nth-child(2) { animation-delay: .08s; }
.cf-slide.is-on .cf-hero__copy > :nth-child(3) { animation-delay: .16s; }
.cf-slide.is-on .cf-hero__photo { animation: cf-swing .9s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes cf-pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cf-swing { from { opacity: 0; transform: rotate(8deg) translateY(30px); } to { opacity: 1; transform: rotate(2deg); } }
.cf-blob { position: absolute; border-radius: 50%; animation: cf-float 6s ease-in-out infinite; }
.cf-blob--a { width: 220px; height: 220px; left: -60px; bottom: -80px; background: #ff9db0; }
.cf-blob--b { width: 90px; height: 90px; left: 46%; top: 30px; background: #7be0b0; animation-delay: -2s; }
.cf-blob--c { width: 54px; height: 54px; left: 40%; bottom: 50px; background: #b9a6ff; animation-delay: -4s; }
@keyframes cf-float { 50% { transform: translateY(-12px) scale(1.04); } }
.cf-dots { position: absolute; left: 56px; bottom: 28px; z-index: 2; display: flex; gap: 6px; }
.cf-dots button { width: 22px; height: 6px; border-radius: 6px; background: rgba(42, 35, 67, .18); }
.cf-dots button.is-on { width: 44px; background: rgba(42, 35, 67, .25); }
.cf-dots i { background: var(--cf-ink); }

/* categorias com foto */
.cf-cats { display: flex; flex-wrap: wrap; gap: 12px; }
.cf-cat { display: inline-flex; align-items: center; gap: 12px; padding: 8px 22px 8px 8px; border-radius: 99px; background: var(--cf-tone); color: var(--cf-ink); font-weight: 800; font-size: 16px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.cf-cat:hover { transform: translateY(-3px) rotate(-1.5deg); }
.cf-cat__ph { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 50%; background: #fff; font-family: 'Baloo 2', sans-serif; font-size: 22px; color: var(--p-accent); }
.cf-cat__ph img { width: 100%; height: 100%; object-fit: cover; }

/* cartão de produto: fundo pastel, botão sempre à mostra */
.loja-tpl-confete .pro-grid { gap: 20px; }
.loja-tpl-confete .pro-card { padding: 14px; border-radius: 32px; background: #fff1d6; box-shadow: none; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.loja-tpl-confete .pro-grid .pro-card:nth-child(6n+2) { background: #ffe6ec; }
.loja-tpl-confete .pro-grid .pro-card:nth-child(6n+3) { background: #e3f6ff; }
.loja-tpl-confete .pro-grid .pro-card:nth-child(6n+4) { background: #e3fbef; }
.loja-tpl-confete .pro-grid .pro-card:nth-child(6n+5) { background: #f4f1ff; }
.loja-tpl-confete .pro-grid .pro-card:nth-child(6n+6) { background: #ffe9d9; }
.loja-tpl-confete .pro-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.loja-tpl-confete .pro-card__media { margin: 0; border-radius: 24px; background: #fff; }
.loja-tpl-confete .pro-card__media img { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.loja-tpl-confete .pro-card:hover .pro-card__media img { transform: scale(1.05); }
.loja-tpl-confete .pro-badge { top: 12px; left: 12px; right: auto; padding: 6px 12px; border-radius: 99px; font-size: 12px; letter-spacing: 0; text-transform: none; }
.loja-tpl-confete .pro-badge--new { background: var(--cf-ink); }
.loja-tpl-confete .pro-badge--sale { background: var(--p-accent); }
.loja-tpl-confete .pro-card__info { gap: 10px; padding: 14px 6px 4px; }
.loja-tpl-confete .pro-card__name { font-size: 17px; font-weight: 800; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; min-height: 2.5em; }
.loja-tpl-confete .pro-card__name:hover { text-decoration: none; color: var(--p-accent); }
.loja-tpl-confete .pro-card__row { padding-right: 60px; min-height: 52px; }
.loja-tpl-confete .pro-card__price { margin-left: 0; flex-wrap: wrap; }
.loja-tpl-confete .pro-card__price b { font-size: 22px; font-weight: 800; }
.loja-tpl-confete .pro-card .pro-card__add { position: absolute; right: 20px; bottom: 20px; margin: 0; width: 52px; height: 52px; opacity: 1; transform: none; background: var(--p-accent); color: var(--p-on-accent); box-shadow: 0 10px 20px -8px var(--p-accent); transition: transform .25s cubic-bezier(.3, 1.8, .5, 1); }
.loja-tpl-confete .pro-card .pro-card__add:hover { transform: scale(1.1) rotate(-8deg); }
.loja-tpl-confete .pro-card__add.is-done { background: var(--p-ok); }

/* kits */
.cf-kit { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; padding: 48px; border-radius: 40px; background: #e3f4ff; }
.cf-kit__copy .cf-title { font-size: 46px; line-height: 1; }
.cf-kit__copy p { margin: 14px 0 0; max-width: 46ch; font-size: 17px; color: var(--p-soft); }
.cf-steps { display: flex; gap: 12px; margin: 22px 0; padding: 0; list-style: none; }
.cf-steps li { flex: 1; padding: 16px 18px; border-radius: 22px; background: #fff; font-weight: 800; }
.cf-steps b { display: block; font-family: 'Baloo 2', sans-serif; font-size: 30px; line-height: 1.1; color: var(--cf-blue); }
.cf-kit__list { display: grid; gap: 12px; }
.cf-kitem { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; border-radius: 26px; background: #fff; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.cf-kitem:hover { transform: translateX(6px); }
.cf-kitem__ph { width: 76px; height: 76px; overflow: hidden; border-radius: 20px; background: var(--p-paper2); }
.cf-kitem__ph img { width: 100%; height: 100%; object-fit: cover; }
.cf-kitem__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cf-kitem__info b { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.cf-kitem__info span { color: var(--p-accent); font-weight: 800; }
.cf-kitem__info s { color: var(--p-muted); font-weight: 600; }

/* listagem, filtros e produto */
.loja-tpl-confete .pro-shop { padding-top: 56px; }
.loja-tpl-confete .pro-field--search { border-radius: 99px; border-width: 2px; border-color: #efe7ff; background: #fff; }
.loja-tpl-confete .pro-tbtn { font-weight: 800; }
.loja-tpl-confete .pro-chip { border-radius: 99px; }
.loja-tpl-confete .pro-gallery__main { border-radius: 36px; background: #fff; }
.loja-tpl-confete .pro-gallery__thumbs button { border-radius: 18px; }
.loja-tpl-confete .pro-summary__name { font-size: 40px; line-height: 1.05; }
.loja-tpl-confete .pro-summary__price b { color: var(--p-accent); }
.loja-tpl-confete .pro-label { border-radius: 99px; text-transform: none; }
.loja-tpl-confete .pro-qty { border-radius: 99px; }
.loja-tpl-confete .pro-trust > div > svg { color: var(--p-accent); }
.loja-tpl-confete .pro-tabs, .loja-tpl-confete .pro-panel { box-shadow: none; border: 2px solid #f1eafd; }
.loja-tpl-confete .pro-tabs__bar button[aria-selected="true"]::after { height: 3px; background: var(--p-accent); }
.loja-tpl-confete .pro-rv__avatar { background: #ffe6ec; color: var(--p-accent); }
.loja-tpl-confete .pro-rv-cta .pro-btn { background: #f4f1ff; }
.loja-tpl-confete .pro-stars__fill { fill: #ffb400; }
.loja-tpl-confete .pro-in input, .loja-tpl-confete .pro-in textarea { border-radius: 18px; border-width: 2px; border-color: #efe7ff; background: #fff; }
.loja-tpl-confete .pro-opt { border-radius: 22px; }
.loja-tpl-confete .pro-sheet { border-radius: 28px 0 0 28px; }
.loja-tpl-confete .pro-sheet--left { border-radius: 0 28px 28px 0; }
.loja-tpl-confete .pro-foot { margin-top: 64px; border-top: 0; background: #fff1d6; }
.loja-tpl-confete .pro-toast { border-radius: 99px; background: var(--cf-ink); color: #fff; }

/* confete ao adicionar (js/loja-tpl/confete.js) */
.cf-confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.cf-confetti i { position: absolute; width: 9px; height: 13px; border-radius: 3px; animation: cf-burst 1s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes cf-burst {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 90px)) rotate(var(--rot)); opacity: 0; }
}

@media (max-width: 1024px) {
  .cf-slide { padding: 40px; gap: 20px; }
  .cf-hero__photo { height: 360px; }
  .cf-kit { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .loja-tpl-confete .pro-top__in { height: 70px; }
  .loja-tpl-confete .pro-brand { font-size: 26px; }
  .loja-tpl-confete .pro-brand img { height: calc(38px * var(--pro-logo, 1)); }
  .loja-tpl-confete .pro-iconbtn { width: 42px; height: 42px; }
  .cf-sec { margin-top: 40px; }
  .cf-slide { grid-template-columns: 1fr; min-height: 0; padding: 28px 24px 56px; border-radius: 30px; }
  .cf-slide--art { padding: 0; }
  .cf-hero__copy .cf-title { font-size: 44px; }
  .cf-hero__copy p { font-size: 16px; }
  .cf-hero__photo { height: 300px; order: -1; }
  .cf-dots { left: 24px; bottom: 22px; }
  .cf-cats { flex-wrap: nowrap; margin-right: -16px; padding-right: 16px; overflow-x: auto; scrollbar-width: none; }
  .cf-cats::-webkit-scrollbar { display: none; }
  .cf-cat { flex: none; font-size: 15px; }
  .cf-head .cf-title { font-size: 28px; }
  .loja-tpl-confete .pro-grid { gap: 12px; }
  .loja-tpl-confete .pro-card { padding: 8px; border-radius: 24px; }
  .loja-tpl-confete .pro-card__media { border-radius: 18px; }
  .loja-tpl-confete .pro-card__name { font-size: 15px; }
  .loja-tpl-confete .pro-card__row { padding-right: 46px; min-height: 46px; }
  .loja-tpl-confete .pro-card__price b { font-size: 18px; }
  .loja-tpl-confete .pro-card .pro-card__add { right: 12px; bottom: 12px; width: 42px; height: 42px; }
  .cf-kit { padding: 26px; border-radius: 30px; }
  .cf-kit__copy .cf-title { font-size: 34px; }
  .cf-steps { flex-direction: column; }
  .loja-tpl-confete .pro-h1, .loja-tpl-confete .pro-summary__name { font-size: 30px; }
}
.loja-tpl-confete .pro-sz { border-radius: 99px; border-width: 2px; }
.loja-tpl-confete .pro-sz[aria-checked="true"] { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-on-accent); }
.loja-tpl-confete .pro-sw { width: 36px; height: 36px; }
.loja-tpl-confete .pro-card__dots i { box-shadow: 0 0 0 2px #fff; }

/* Confete: faixa do topo e faixa de frases coloridas */
.loja-tpl-confete .pro-strip { background: var(--cf-ink); color: #fff; font-weight: 800; letter-spacing: .01em; }
.cf-ticker-wrap .pro-ticker { margin-top: 18px; border: 0; border-radius: 99px; background: var(--cf-yellow); -webkit-mask-image: none; mask-image: none; transform: rotate(-1deg); }
.cf-ticker-wrap { padding: 0 24px; max-width: 1200px; margin: 0 auto; }
.loja-tpl-confete .pro-ticker__track span { color: var(--cf-ink); font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px; }
.loja-tpl-confete .pro-ticker__track i { width: 10px; height: 10px; background: var(--p-accent); }
.loja-tpl-confete .pro-ticker__track i:nth-of-type(3n+2) { background: var(--cf-blue); }
.loja-tpl-confete .pro-ticker__track i:nth-of-type(3n) { background: #7be0b0; }
@media (max-width: 860px) { .cf-ticker-wrap { padding: 0 16px; } .loja-tpl-confete .pro-ticker__track span { font-size: 15px; } }

/* banner de boas-vindas (sem foto): bloco amarelo com bolas flutuando, igual à demonstração */
.cf-slide--welcome { grid-template-columns: 1fr; min-height: 420px; }
.cf-slide--welcome .cf-hero__copy { max-width: 620px; }
.cf-slide--welcome .cf-blob { animation: cf-drift 6s ease-in-out infinite; }
.cf-w1 { right: -50px; top: -50px; width: 280px; height: 280px; background: #ff9db0; }
.cf-w2 { right: 200px; bottom: -80px; width: 200px; height: 200px; background: #8fd6ff; animation-duration: 7s !important; animation-delay: -2s !important; }
.cf-w3 { right: 100px; top: 140px; width: 96px; height: 96px; background: #7be0b0; animation-duration: 5s !important; animation-delay: -4s !important; }
.cf-w4 { right: 360px; top: 44px; width: 50px; height: 50px; background: #b9a6ff; animation-delay: -1s !important; }
@keyframes cf-drift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(6deg); } }
@media (max-width: 760px) {
  .cf-slide--welcome { min-height: 360px; padding-bottom: 120px; }
  .cf-w1 { width: 180px; height: 180px; }
  .cf-w2 { right: 40px; width: 130px; height: 130px; }
  .cf-w3 { right: 20px; top: auto; bottom: 40px; width: 60px; height: 60px; }
  .cf-w4 { right: 170px; top: auto; bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) { .cf-slide--welcome .cf-blob { animation: none; } }
