:root {
  --primary: #e8590c;
  --primary-dark: #b8430a;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --bg: #ffffff;
  --gray: #f5f5f5;
  --radius: 12px;
  --err: #b3261e;
  --ok: #1f7a4d;
  --font-head: "Outfit", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 400 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.icon { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); font-size: .94rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 .92rem var(--font-head); letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  padding: 14px 24px; border-radius: 4px; border: 2px solid transparent; cursor: pointer; text-align: center;
}
.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn--outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--light { background: #fff; color: var(--primary-dark); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); text-transform: none; letter-spacing: 0; font-weight: 600; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: 9px 14px; font-size: .84rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header-main { display: grid; grid-template-columns: auto 1fr auto auto; gap: 28px; align-items: center; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; text-decoration: none; min-height: 48px; }
.brand img { height: 52px; width: auto; max-width: 220px; object-fit: contain; }
.brand__text { font: 700 1.6rem var(--font-head); color: var(--primary); }

.search { position: relative; }
.search input {
  width: 100%; height: 50px; padding: 0 52px 0 18px; font: inherit; color: var(--ink);
  border: 1.5px solid #9a9a9a; border-radius: 4px; background: #fff;
}
.search input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,.12); }
.search button { position: absolute; right: 0; top: 0; height: 50px; width: 50px; border: 0; background: none; cursor: pointer; color: var(--muted); }
.search button .icon { width: 22px; height: 22px; }
.search__results {
  position: absolute; left: 0; right: 0; top: 56px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0,0,0,.14); max-height: 420px; overflow-y: auto; z-index: 60; padding: 6px;
}
.search__group { font: 600 .78rem var(--font-head); color: var(--muted); padding: 10px 12px 4px; }
.search__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; border-radius: 6px; }
.search__item:hover, .search__item[aria-selected="true"] { background: var(--gray); }
.search__item small { color: var(--muted); display: block; }
.search__empty { padding: 14px 12px; color: var(--muted); }
.dot { width: 30px; height: 30px; border-radius: 6px; border: 1px solid rgba(0,0,0,.18); background: var(--c, #ddd); flex-shrink: 0; }

.cart-link { position: relative; color: var(--ink); padding: 8px; }
.cart-link .icon { width: 30px; height: 30px; }
.cart-link__count { position: absolute; top: 0; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--primary); color: #fff; font: 700 .75rem/20px var(--font-head); text-align: center; }

.site-nav { border-top: 1px solid var(--line); background: #fff; }
.site-nav .wrap { display: flex; justify-content: space-between; gap: 20px; }
.site-nav a { text-decoration: none; padding: 16px 4px; font-size: 1.05rem; border-bottom: 3px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--primary); }

/* ---------- Hero ---------- */
.hero--default { background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 30px; min-height: 420px; }
.hero__text { padding: 56px 0; }
.hero__text h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 600; max-width: 16ch; }
.hero__text p { font-size: 1.15rem; margin: 18px 0 30px; max-width: 42ch; opacity: .95; }
.fan { position: relative; height: 380px; align-self: end; }
.fan__chip {
  position: absolute; left: 50%; bottom: -30px; width: 58px; height: 330px; margin-left: -29px;
  background: var(--c); border-radius: 8px 8px 4px 4px; transform-origin: 50% 100%;
  transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 10deg));
  box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 8px 20px rgba(0,0,0,.25);
}

.hero--slider { position: relative; background: #eee; }
.hero__slide img { width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.hero__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 68px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.55); color: var(--ink); display: grid; place-items: center;
}
.hero__nav:hover { background: rgba(255,255,255,.9); }
.hero__nav--prev { left: 0; border-radius: 0 6px 6px 0; }
.hero__nav--prev .icon { transform: rotate(180deg); }
.hero__nav--next { right: 0; border-radius: 6px 0 0 6px; }
.hero__dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero__dots button { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.hero__dots button[aria-current="true"] { background: #fff; }

.notice { margin-top: 24px; padding: 14px 18px; border-radius: 8px; background: #fff3d1; border: 1px solid #e8ad00; }

/* ---------- Seções ---------- */
.section { padding: 64px 0; }
.section--gray { background: var(--gray); }
.section__head { margin-bottom: 28px; }
.section__head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 500; }
.section__head p { color: var(--muted); margin: 10px 0 0; max-width: 62ch; }
.card { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font: 600 .95rem var(--font-body); padding: 9px 16px; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips--small .chip { padding: 5px 12px; font-size: .84rem; }
#brands { margin-bottom: 22px; }

/* ---------- Produtos ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.product { text-align: left; padding: 0; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; overflow: hidden; font: inherit; color: inherit; }
.product:hover { border-color: #9a9a9a; }
.product[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.product__img { aspect-ratio: 4 / 3; background: var(--gray); display: grid; place-items: center; }
.product__img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product__img .icon { width: 56px; height: 56px; color: var(--primary); opacity: .55; }
.product__body { padding: 14px 16px 16px; }
.product__body strong { display: block; font: 600 1.05rem var(--font-head); }
.product__body span { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.product__pick { margin-top: 10px; font: 700 .8rem var(--font-head); letter-spacing: .05em; text-transform: uppercase; color: var(--primary); }
.product[aria-pressed="true"] .product__pick { color: var(--ok); }

/* ---------- Cores ---------- */
.colors { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 26px; align-items: start; }
.colors > *, .order > * { min-width: 0; }
.picker { text-align: center; }
.wheel { position: relative; width: min(340px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.wheel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.wheel__tip {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ink); border-radius: 8px; padding: 7px 16px;
  font: 500 .95rem var(--font-head); box-shadow: 0 4px 16px rgba(0,0,0,.22); pointer-events: none; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; z-index: 2;
}
.wheel__knob { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.45), 0 3px 8px rgba(0,0,0,.35); pointer-events: none; background: transparent; }
.slider { display: block; width: min(340px, 100%); margin: 26px auto 0; }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 7px; background: var(--track, linear-gradient(to right, #000, #fff)); margin: 0; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #222; border: 4px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.3); cursor: grab; }
.slider input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #222; border: 4px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.3); cursor: grab; }
.picker__note { font-size: .82rem; color: var(--muted); margin: 18px 0 0; }

.chosen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.preview { display: flex; gap: 20px; align-items: center; }
.preview__swatch { width: 132px; height: 132px; border-radius: var(--radius); border: 1px solid rgba(0,0,0,.15); background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 8px, #fafafa 8px, #fafafa 16px); display: grid; place-items: center; text-align: center; font-size: .8rem; color: var(--muted); padding: 8px; flex-shrink: 0; transition: background-color .3s ease; }
.preview__name { font: 600 1.5rem var(--font-head); line-height: 1.15; }
.preview__code { font-weight: 700; margin-top: 4px; }
.preview__hint { color: var(--muted); font-size: .88rem; margin-top: 6px; }

.code-form label { display: block; font: 600 1.05rem var(--font-head); margin-bottom: 10px; }
.code-form__row { display: flex; gap: 10px; }
.code-form input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; font: inherit; border: 1.5px solid #9a9a9a; border-radius: 4px; text-transform: uppercase; }
.code-form input::placeholder { text-transform: none; }
.code-form__msg { margin: 10px 0 0; font-size: .92rem; min-height: 1.2em; }
.code-form__msg.is-ok { color: var(--ok); }
.code-form__msg.is-warn { color: #8a6d00; }

.near__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; margin-bottom: 14px; }
.near__item { border: 2px solid transparent; background: none; padding: 4px; cursor: pointer; font: inherit; color: inherit; text-align: left; border-radius: 10px; }
.near__item:hover { background: var(--gray); }
.near__item[aria-pressed="true"] { border-color: var(--ink); }
.near__item .sw { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; border: 1px solid rgba(0,0,0,.18); background: var(--c); }
.near__item b { display: block; font: 600 .82rem var(--font-head); margin-top: 6px; line-height: 1.2; }
.near__item small { color: var(--muted); font-size: .75rem; }

.catalog { margin-top: 26px; }
.catalog summary { cursor: pointer; font: 600 1.05rem var(--font-head); }
.catalog__tools { display: grid; gap: 12px; margin: 16px 0; }
.catalog__tools input { height: 46px; padding: 0 14px; font: inherit; border: 1.5px solid var(--line); border-radius: 4px; width: 100%; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; max-height: 380px; overflow-y: auto; padding: 4px; }
.swatch { aspect-ratio: 1; border-radius: 10px; cursor: pointer; padding: 0; border: 1px solid rgba(0,0,0,.18); background: var(--c); }
.swatch:hover { transform: scale(1.06); }
.swatch[aria-selected="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Barra de adicionar ---------- */
.add-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.add-bar__sel { display: flex; align-items: center; gap: 14px; min-width: 240px; }
.add-bar__dot { width: 46px; height: 46px; border-radius: 10px; border: 1px solid rgba(0,0,0,.18); background: var(--c, repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 6px, #fafafa 6px, #fafafa 12px)); flex-shrink: 0; }
.add-bar__size { flex: 1; min-width: 200px; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; }
.qty button { width: 44px; border: 0; background: transparent; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.qty button:hover { background: var(--gray); }
.qty input { width: 62px; text-align: center; border: 0; font: 700 1.05rem var(--font-head); background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.add-msg { margin: 12px 0 0; min-height: 1.4em; }

/* ---------- Pedido ---------- */
.order { display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: start; }
.cart { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cart li { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.cart .dot { width: 38px; height: 38px; }
.cart .t { font-weight: 700; }
.cart .s { color: var(--muted); font-size: .9rem; }
.cart .rm { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.field { display: block; margin-bottom: 16px; font-weight: 600; }
.field input, .field textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 400 1rem var(--font-body); border: 1.5px solid #c8c8c8; border-radius: 4px; background: #fff; color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: .92rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.error { color: var(--err); font-weight: 700; margin: 0 0 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { padding: 6px 0; }
.done h3 { color: var(--ok); }
.done .btn { margin-top: 12px; }

/* ---------- Rodapé ---------- */
.site-footer { background: #232323; color: #ddd; padding: 46px 0 0; font-size: .95rem; }
.footer__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding-bottom: 34px; }
.footer__brand { font: 700 1.4rem var(--font-head); color: #fff; margin-bottom: 12px; }
.footer__brand img { height: 46px; width: auto; filter: none; background: #fff; padding: 6px 10px; border-radius: 8px; }
.site-footer p { margin: 6px 0; }
.site-footer a { color: #fff; }
.footer__copy { border-top: 1px solid #3a3a3a; text-align: center; padding: 16px; font-size: .85rem; color: #aaa; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  html { scroll-padding-top: 12px; }
  .site-header { position: static; }
  .header-main { grid-template-columns: 1fr auto auto; gap: 14px; }
  .search { grid-column: 1 / -1; order: 5; }
  .header-cta { padding: 11px 14px; }
  .site-nav .wrap { overflow-x: auto; gap: 22px; justify-content: flex-start; white-space: nowrap; }
  .hero__inner { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { padding: 40px 0 10px; }
  .fan { height: 250px; }
  .fan__chip { height: 220px; width: 44px; margin-left: -22px; }
  .colors, .order { grid-template-columns: minmax(0, 1fr); }
  .footer__inner { grid-template-columns: 1fr; }
  .section { padding: 46px 0; }
}
@media (max-width: 520px) {
  .header-cta { display: none; }
  .preview { flex-direction: column; align-items: flex-start; }
  .add-bar { padding: 16px; }
  .add-bar > .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preview__swatch { transition: none; }
  .swatch:hover { transform: none; }
}
