/* Interbikes BR — estilos complementares ao Tailwind (CDN). */
:root { --brand: #E10E17; --brand-700: #B80B12; --ink: #111418; --ui: #F4F5F7; --pix: #16A34A; --pix-700: #15803D; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
:focus-visible { outline: 3px solid #1D4ED8; outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: var(--ink); padding: .75rem 1rem; font-weight: 700; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Marca */
.logo { color: var(--ink); }
.logo span { color: inherit; }
.logo em { font-style: normal; color: #fff; background: var(--brand); padding: 0 .28em; margin-left: .05em; clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%); }
footer .logo { color: #fff; }

/* Títulos de seção: etiqueta "número de prova" com corte diagonal */
.section-title { font-family: 'Barlow Condensed', Oswald, Impact, sans-serif; font-weight: 800; text-transform: uppercase; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .6rem; }
.section-title::before { content: ""; width: .7rem; height: 1.6rem; background: var(--brand); clip-path: polygon(0 0, 100% 0, 60% 100%, 0 100%); flex: none; }
.lbl { display: block; font-size: .8125rem; font-weight: 600; margin-bottom: .25rem; }
.hint { font-size: .75rem; color: #4b5563; margin-top: .25rem; }
.filter-title { font-family: 'Barlow Condensed', Oswald, sans-serif; font-weight: 700; font-size: 1.125rem; text-transform: uppercase; margin-bottom: .25rem; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1.1rem; border-radius: .375rem; font-weight: 700; font-size: .875rem; line-height: 1.1; transition: background-color .15s, transform .1s; cursor: pointer; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--brand); color: #fff; } .btn-brand:hover { background: var(--brand-700); }
.btn-dark { background: var(--ink); color: #fff; } .btn-dark:hover { background: #2a3038; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid #cbd0d6; } .btn-light:hover { background: var(--ui); }
.btn-muted { background: #e5e7eb; color: #4b5563; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; background: #fff; border: 1px solid #cbd0d6; font-size: .875rem; font-weight: 600; }
.chip:hover { border-color: var(--brand); color: var(--brand-700); }
.page-btn { min-width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .375rem; background: #fff; border: 1px solid #cbd0d6; font-weight: 600; }
.page-btn:hover { border-color: var(--brand); } .page-btn.is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Cabeçalho / mega-menu */
.cart-badge { position: absolute; top: 2px; right: 0; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.mega-item { position: static; }
.nav-link { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.75rem; padding: 0 1rem; font-weight: 600; font-size: .875rem; text-transform: uppercase; letter-spacing: .03em; }
.nav-link:hover { background: rgba(255,255,255,.1); }
.mega-panel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; color: var(--ink); border-top: 4px solid var(--brand); box-shadow: 0 18px 30px -12px rgba(0,0,0,.3); visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 45; }
.mega-item:hover .mega-panel, .mega-item:focus-within .mega-panel { visibility: visible; opacity: 1; transform: none; }

/* Carrossel */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero-track { display: flex; transition: transform .6s cubic-bezier(.22,.7,.2,1); will-change: transform; }
.hero-slide { position: relative; flex: 0 0 100%; min-height: 340px; height: clamp(340px, 42vw, 560px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%; }
@media (min-width: 768px) { .hero-img { object-position: center; } }
/* Selo da promoção (camada HTML sobre a foto do banner; editável no admin) */
.promo-seal { position: absolute; z-index: 2; right: .75rem; top: .75rem; transform: rotate(-5deg); display: flex; flex-direction: column; align-items: center; text-align: center; background: #F59E0B; color: #111418; border: 3px solid #fff; border-radius: .35rem; padding: .2rem .65rem .3rem; box-shadow: 0 10px 24px -8px rgba(0,0,0,.6); font-family: 'Barlow Condensed', Impact, sans-serif; text-transform: uppercase; line-height: 1; }
.seal-top { font-size: .62rem; font-weight: 700; letter-spacing: .2em; }
.seal-main { font-size: 2.1rem; font-weight: 800; line-height: .95; }
.seal-bottom { font-size: .6rem; font-weight: 700; letter-spacing: .12em; }
.promo-seal.seal-long .seal-main { font-size: 1.7rem; } .promo-seal.seal-xl .seal-main { font-size: 1.35rem; }
@media (min-width: 768px) {
  .promo-seal { top: 2rem; right: 5rem; padding: .5rem 1.6rem .7rem; border-width: 4px; }
  .seal-top { font-size: 1.15rem; } .seal-bottom { font-size: 1.05rem; } .seal-main { font-size: 5.2rem; }
  .promo-seal.seal-long .seal-main { font-size: 4rem; } .promo-seal.seal-xl .seal-main { font-size: 3.2rem; }
}
/* Logo fixo: fora da faixa que desliza, sempre no mesmo lugar */
.hero-logo { position: absolute; left: 0; right: 0; top: 0; z-index: 3; pointer-events: none; }
.hero-logo-inner { max-width: 80rem; margin: 0 auto; padding: 1rem 1rem 0; }
.hero-logo .logo { color: #fff; font-size: 1.6rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.hero-logo-img { height: 2.25rem; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
@media (min-width: 768px) { .hero-logo .logo { font-size: 2.25rem; } .hero-logo-img { height: 3rem; } .hero-logo-inner { padding: 1.5rem 4rem 0; } }
.hero-overlay { position: absolute; inset: 0; display: flex; align-items: center; background: linear-gradient(90deg, rgba(17,20,24,.88) 0%, rgba(17,20,24,.55) 48%, rgba(17,20,24,0) 80%); }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); display: none; align-items: center; justify-content: center; z-index: 2; }
.hero-nav:hover { background: #fff; } .hero-prev { left: 1rem; } .hero-next { right: 1rem; }
@media (min-width: 768px) { .hero-nav { display: inline-flex; } }
.hero-dots { position: absolute; left: 0; right: 0; bottom: .5rem; display: flex; justify-content: center; z-index: 2; }
.hero-dot { width: 2.75rem; height: 2.75rem; position: relative; }
.hero-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.9rem; height: .3rem; transform: translate(-50%,-50%); border-radius: 2px; background: rgba(255,255,255,.5); transition: background .2s; }
.hero-dot[aria-selected="true"]::after { background: var(--brand); }

/* Cards de produto */
.product-card { background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.product-card:hover { box-shadow: 0 10px 24px -12px rgba(17,20,24,.35); border-color: #cbd0d6; }
.product-media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--ui); overflow: hidden; }
.bib { position: absolute; left: 0; top: .75rem; background: var(--brand); color: #fff; font-family: 'Barlow Condensed', Oswald, sans-serif; font-weight: 800; font-size: 1.15rem; line-height: 1; padding: .35rem .9rem .35rem .6rem; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.bib-inline { position: static; display: inline-block; }
.tag-new { position: absolute; left: .6rem; top: .6rem; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .5rem; border-radius: 3px; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Produto */
.pdp-main { aspect-ratio: 1 / 1; overflow: hidden; cursor: zoom-in; }
.pdp-main img { transition: transform .15s; transform-origin: center; }
.pdp-main.is-zoom img { transform: scale(2.1); }
.thumb { width: 4.5rem; height: 4.5rem; border: 2px solid #e5e7eb; border-radius: .375rem; background: #fff; overflow: hidden; }
.thumb.is-active { border-color: var(--brand); }
.opt { min-width: 2.75rem; min-height: 2.75rem; padding: 0 1rem; border: 2px solid #cbd0d6; border-radius: .375rem; background: #fff; font-weight: 600; font-size: .875rem; }
.opt:hover { border-color: var(--ink); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: #fff1f1; color: var(--brand-700); }
.opt.is-unavailable { color: #6b7280; text-decoration: line-through; background: #f3f4f6; }
.qty { display: inline-flex; border: 1px solid #cbd0d6; border-radius: .375rem; background: #fff; overflow: hidden; }
.qty button { width: 2.75rem; font-size: 1.25rem; font-weight: 700; } .qty button:hover { background: var(--ui); }
.qty input { width: 3.25rem; text-align: center; font-weight: 600; border: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.opt-row { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 1rem; border: 2px solid #e5e7eb; border-radius: .5rem; cursor: pointer; background: #fff; }
.opt-row:has(input:checked) { border-color: var(--brand); background: #fff7f7; }
.opt-row input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.prose-ib p { margin-bottom: .9rem; line-height: 1.65; color: #1f2937; }

/* Compartilhar, abas da área do cliente, selos do rodapé */
.share-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 .85rem; border: 1px solid #cbd0d6; border-radius: .375rem; background: #fff; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.share-btn:hover { border-color: var(--brand); color: var(--brand-700); }
.conta-tab { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 1.1rem; font-weight: 700; font-size: .9rem; border-bottom: 3px solid transparent; margin-bottom: -1px; color: #374151; }
.conta-tab:hover { color: var(--brand-700); }
.conta-tab.is-active { color: var(--ink); border-bottom-color: var(--brand); }
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.badge-row img { display: block; height: 2.1rem; width: auto; border-radius: .3rem; }
.badge-row a { display: block; border-radius: .3rem; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: .85rem 1.1rem; border-radius: .5rem; box-shadow: 0 12px 30px -8px rgba(0,0,0,.5); z-index: 90; transition: transform .25s; max-width: calc(100vw - 2rem); font-size: .9rem; display: flex; gap: 1rem; align-items: center; }
.toast.is-on { transform: translate(-50%, 0); }
.toast a { color: #fff; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.toast.is-error { background: #7f1d1d; }

/* ---------- Melhorias do Modern Web Guidance ---------- */

/* Títulos com linhas equilibradas; texto corrido sem palavra órfã na última linha (text-wrap). Só em elementos específicos: balance é caro. */
h1, h2, .section-title, .lux-title, .lux-h2 { text-wrap: balance; }
.prose-ib p, .prose-ib li { text-wrap: pretty; }

/* Campo inválido só é destacado depois que a pessoa mexeu nele (:user-invalid), não enquanto digita nem ao carregar a página. */
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color: #B91C1C; box-shadow: 0 0 0 3px rgba(185, 28, 28, .12); }

/* Seções da home fora da primeira tela: o navegador pula layout e pintura até chegarem perto; contain-intrinsic-size evita o salto da barra de rolagem. */
.cv-section { content-visibility: auto; contain-intrinsic-size: auto 50rem; }

/* Menu móvel: <dialog> modal com gesto de arrastar por scroll-snap (guia navigation-drawer). Abrir = rolar o painel para dentro; fechar = rolar de volta. */
.Drawer {
  --drawer-width: min(24rem, 86dvw, 100dvw - 24px);
  --drawer-backdrop: 0;
  inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0;
  background: transparent; border: 0; overflow: visible;
}
.Drawer::backdrop { background: #000; opacity: calc(var(--drawer-backdrop) / 2); }
html:has(.Drawer[open]) { overflow: hidden; } /* a página atrás não rola enquanto o menu está aberto */
.Drawer-scroller {
  position: relative; display: grid; grid-template-columns: var(--drawer-width) 100%;
  overflow-x: scroll; overscroll-behavior: none; scrollbar-width: none; scroll-snap-type: x mandatory;
}
.Drawer-scroller::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .Drawer-scroller { scroll-behavior: smooth; } }
.Drawer-scroller::after { content: ''; scroll-snap-align: end; scroll-initial-target: nearest; }
.Drawer-sheet {
  display: grid; grid-template-rows: auto 1fr; height: 100svh; background: #fff; color: var(--ink);
  overflow-y: auto; scroll-snap-align: start; scrollbar-width: none;
}
@supports (animation-timeline: scroll()) {
  .Drawer { timeline-scope: --drawer-fade; animation: fade-drawer-backdrop linear both; animation-timeline: --drawer-fade; }
  .Drawer-scroller { scroll-timeline: --drawer-fade x; }
  @property --drawer-backdrop { syntax: '<number>'; inherits: true; initial-value: 0; }
  @keyframes fade-drawer-backdrop { 0% { --drawer-backdrop: 1; } 100% { --drawer-backdrop: 0; } }
}

/* Cartão no site: formulário seguro do Mercado Pago e janela da verificação 3D Secure do banco */
.card-brick { min-height: 4rem; }
.card-3ds { width: min(34rem, calc(100vw - 2rem)); max-height: 94svh; padding: 1rem; border: 0; border-radius: .75rem; background: #fff; color: var(--ink); overflow: auto; }
.card-3ds::backdrop { background: rgb(0 0 0 / .6); }
.card-3ds__bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.card-3ds__frame { display: block; width: 100%; height: min(37.5rem, 70svh); margin-top: .75rem; border: 1px solid #d1d5db; border-radius: .5rem; background: #fff; }
