@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --black: #000000;
  --elevated: #18191b;
  --hairline: #2b2c2f;
  --hairline-strong: #3d3f42;
  --text: #ffffff;
  --text-2: #a9a9a9;
  --text-3: #8a8a8a;
  --blue: #0078d6;
  --blue-hover: #0260ab;
  --blue-active: #014880;
  --blue-focus: #4aa8ff;
  --error: #ff6b63;
  --todo: #ffcf5c;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: max(16px, 7vw);
  --section: clamp(72px, 9vw, 128px);
  --ease: cubic-bezier(.3, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--hairline-strong) var(--black); }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
::selection { background: var(--blue); color: #fff; }
input { caret-color: var(--blue-focus); }
:focus-visible { outline: 2px solid var(--blue-focus); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 20; background: var(--blue); color: #fff; padding: 12px 16px; }
.skip:focus { top: 16px; }
.todo { color: var(--todo); border-bottom: 1px dashed var(--todo); }

.wrap { width: min(100% - 2 * var(--gutter), 1440px); margin-inline: auto; }

/* ---------- Tipografia ---------- */
h1, h2, h3, .display { font-family: var(--serif); font-weight: 300; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.04; font-variation-settings: "opsz" 60; }
h2 { font-size: clamp(2rem, 3.4vw, 3.25rem); line-height: 1.1; font-variation-settings: "opsz" 48; }
h3 { font-size: clamp(1.625rem, 2.2vw, 2.125rem); line-height: 1.15; font-variation-settings: "opsz" 36; }
p { max-width: 62ch; }

/* ---------- Cabeçalho sobre o vídeo ---------- */
.masthead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
}
.masthead-top {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  padding-inline: var(--gutter);
}
.brand img { height: 76px; width: auto; transition: filter .3s var(--ease); }
.brand:hover img { filter: brightness(1.15); }
.icon { width: 18px; height: 18px; flex: none; fill: currentColor; }
.masthead-social {
  position: absolute;
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 22px;
}
.masthead-wa, .masthead-ig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: .875rem;
  text-decoration: none;
  color: var(--text);
}
.masthead-ig { color: rgba(255, 255, 255, .86); }
.masthead-wa:hover span, .masthead-ig:hover span { text-decoration: underline; }
.masthead-ig:hover { color: var(--text); }
.with-icon { display: inline-flex; align-items: center; gap: 8px; }
.with-icon .icon { width: 16px; height: 16px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 4px; }
.footer-social a { text-decoration: none; }
.footer-social a:hover span { text-decoration: underline; }
.masthead-wa.pending::after { content: " [número a preencher]"; color: var(--todo); }
.masthead-nav { border-bottom: 1px solid rgba(255, 255, 255, .16); }
.masthead-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.masthead-nav a {
  display: block;
  padding: 16px 0 18px;
  font-size: .9375rem;
  color: rgba(255, 255, 255, .86);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.masthead-nav a:hover { color: #fff; border-bottom-color: #fff; }

/* ---------- Abertura ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: transparent;
}
.backdrop { position: fixed; inset: 0; z-index: -1; background: var(--black) url("assets/video/motor-poster.jpg") center / cover no-repeat; }
.hero-reel { position: absolute; inset: 0; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero-video.is-on { opacity: 1; }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .6) 55%, rgba(0, 0, 0, .15) 85%),
    linear-gradient(0deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 40%);
}
/* Escudo CH dentro do vídeo: grande, translúcido, com brilho cromado na troca de cena */
.hero-emblem {
  position: absolute;
  right: calc(var(--gutter) * .6);
  top: 30%;
  width: clamp(240px, 26vw, 440px);
  aspect-ratio: 900 / 317;
  transform: translate3d(var(--px, 0px), calc(-50% + var(--py, 0px)), 0);
  transition: transform .9s var(--ease);
  pointer-events: none;
}
.hero-emblem img { width: 100%; height: auto; opacity: .2; transition: opacity 1.2s var(--ease); }
.hero-emblem::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  background-position: 150% 0;
  -webkit-mask: url("assets/img/logo-ch-shield.png") center / contain no-repeat;
  mask: url("assets/img/logo-ch-shield.png") center / contain no-repeat;
  opacity: 0;
}
.hero-emblem.glint img { opacity: .34; }
.hero-emblem.glint::after { animation: glint 1.6s var(--ease) both; }
@keyframes glint {
  0% { opacity: .55; background-position: 150% 0; }
  100% { opacity: 0; background-position: -60% 0; }
}
.hero-copy {
  position: relative;
  padding: 160px var(--gutter) clamp(72px, 12vh, 140px);
  max-width: calc(780px + 2 * var(--gutter));
}
.hero-copy p { margin-top: 24px; font-size: 1.125rem; line-height: 1.6; color: rgba(255, 255, 255, .86); max-width: 44ch; }
.hero-copy h1, .hero-copy p, .hero-copy .actions { animation: rise 1.1s var(--ease) both; }
.hero-copy p { animation-delay: .12s; }
.hero-copy .actions { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.video-toggle {
  position: fixed;
  z-index: 15;
  right: var(--gutter);
  bottom: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font: inherit;
  font-size: .875rem;
  color: rgba(255, 255, 255, .8);
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
}
.video-toggle:hover { color: #fff; border-color: #fff; }

/* ---------- Botões ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: .9375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:active { background: var(--blue-active); }
.btn-outline { border-color: rgba(255, 255, 255, .85); color: #fff; }
.btn-outline:hover { background: #fff; color: #000; }

/* ---------- Seções ---------- */
.section { padding-block: var(--section); }
.section-surface { background: rgba(10, 11, 12, .74); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }
.section-head p { color: var(--text-2); }

/* ---------- Produtos ---------- */
.plate {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.plate img {
  position: absolute;
  inset: 0;
  margin: auto;
  height: 84%;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, .6));
  transition: transform .6s var(--ease);
}
.product:hover .plate img { transform: translateY(-6px); }
.product-body { padding-top: 32px; display: grid; align-content: start; gap: 16px; }
.product-line { color: var(--text-2); font-size: .9375rem; }
.product-body > p:not(.product-line):not(.price) { color: rgba(255, 255, 255, .86); }

.facts { border-top: 1px solid var(--hairline); }
.facts > div { display: grid; grid-template-columns: minmax(110px, 32%) 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: .9375rem; }
.facts dt { color: var(--text-3); }
.facts dd { font-variant-numeric: tabular-nums; }
.facts a { color: #fff; }

.more summary {
  cursor: pointer;
  font-size: .9375rem;
  color: var(--text);
  list-style: none;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s var(--ease);
}
.more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.more summary:hover { text-decoration: underline; }
.more ul, .more ol { margin-top: 14px; padding-left: 20px; color: var(--text-2); font-size: .9375rem; display: grid; gap: 6px; }
.more ol { margin-top: 18px; }
.more ol li::marker { color: var(--text); font-variant-numeric: tabular-nums; }

.price { font-family: var(--serif); font-weight: 300; font-size: 2rem; line-height: 1; margin-top: 8px; font-variant-numeric: lining-nums tabular-nums; }
.product .actions { margin-top: 4px; }

/* ---------- Carrossel 3D de produtos ---------- */
.carousel { position: relative; }
#produtos { overflow-x: clip; }
.carousel-stage {
  display: grid;
  perspective: 1800px;
  perspective-origin: 50% 40%;
  padding-block: 8px 32px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  overflow: visible;
}
.carousel-stage.dragging { cursor: grabbing; }
.slide {
  --d: 0;
  --ad: 0;
  grid-area: 1 / 1;
  justify-self: center;
  align-self: start;
  width: min(500px, 84vw);
  display: block;
  padding: 18px 26px 28px;
  background: rgba(22, 24, 27, .46);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  transform:
    translateX(calc(var(--d) * 80%))
    translateZ(calc(var(--ad) * -280px))
    rotateY(calc(var(--d) * -34deg));
  transition: transform .8s var(--ease), opacity .8s var(--ease), border-color .4s var(--ease);
  will-change: transform;
}
.slide.is-active { border-color: rgba(255, 255, 255, .26); }
.slide .plate {
  background: radial-gradient(ellipse 55% 60% at 50% 60%, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 70%);
}

.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 8px; }
.carousel-arrow {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.carousel-arrow:hover { background: #fff; color: #000; border-color: #fff; }
.carousel-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dots button {
  width: 32px; height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}
.carousel-dots button::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 3px; transform: translateY(-50%);
  background: rgba(255, 255, 255, .3);
  transition: background-color .3s var(--ease);
}
.carousel-dots button[aria-selected="true"]::before { background: var(--blue); }
.carousel-dots button:hover::before { background: rgba(255, 255, 255, .7); }

/* Cartão horizontal compacto: cabe numa tela */
#produtos { padding-block: clamp(56px, 6vw, 88px); background: transparent; }
#produtos .section-head h2, #produtos .section-head p { text-shadow: 0 1px 12px rgba(0, 0, 0, .85); }
#produtos .section-head p { color: rgba(255, 255, 255, .86); }
#produtos .section-head { margin-bottom: clamp(24px, 3vw, 40px); }
.slide {
  width: min(820px, 88vw);
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px 28px;
}
.slide .plate { aspect-ratio: auto; height: clamp(300px, 42vh, 400px); }
.slide .product-body { padding-top: 0; gap: 12px; }
.slide .facts > div { padding: 8px 0; }
.slide .price { font-size: 1.75rem; margin-top: 4px; }
.more-desc { margin-top: 12px; color: rgba(255, 255, 255, .86); font-size: .9375rem; }
.slide { transform: translateX(calc(var(--d) * 64%)) translateZ(calc(var(--ad) * -320px)) rotateY(calc(var(--d) * -36deg)); }
.carousel-stage { padding-block: 0 20px; }
@media (max-width: 720px) {
  .slide { grid-template-columns: 1fr; gap: 12px; padding: 14px 18px 20px; transform: translateX(calc(var(--d) * 88%)) translateZ(calc(var(--ad) * -240px)) rotateY(calc(var(--d) * -38deg)); }
  .slide .plate { height: 140px; }
  #produtos { padding-block: 36px 40px; }
  #produtos .section-head { gap: 8px; margin-bottom: 20px; }
  #produtos .section-head p { font-size: .9375rem; }
  .slide .product-line { display: none; }
  .slide .facts > div { grid-template-columns: 96px 1fr; gap: 10px; padding: 7px 0; font-size: .875rem; }
  .slide .actions { margin-top: 0; }
  .slide .actions .btn { flex: 1 1 0; min-height: 44px; }
}

/* ---------- Faixa editorial: calculadora ---------- */
.band { background: rgba(0, 0, 0, .8); border-block: 1px solid var(--hairline); }
#pecas { background: rgba(10, 11, 12, .86); }
.band-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(48px, 7vw, 120px); align-items: start; }
.band .display { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.04; font-variation-settings: "opsz" 60; }
.band-lead { margin-top: 20px; color: var(--text-2); max-width: 48ch; }

.calc { margin-top: 44px; display: grid; gap: 32px; }
.choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice legend { font-size: .875rem; color: var(--text-3); margin-bottom: 12px; padding: 0; }
.choice label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  font-size: .9375rem;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label:hover { border-color: var(--text-2); }
.choice label:has(input:checked) { border-color: var(--blue); background: rgba(0, 120, 214, .16); }
.choice label:has(input:focus-visible) { outline: 2px solid var(--blue-focus); outline-offset: 3px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 560px; }
.fields label { display: block; font-size: .875rem; color: var(--text-3); margin-bottom: 8px; }
.fields input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  font: inherit;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
}
.fields input::placeholder { color: #909090; }
.fields input:focus-visible { outline: none; border-color: var(--blue-focus); box-shadow: 0 0 0 1px var(--blue-focus); }
.fields input[aria-invalid="true"] { border-color: var(--error); }
.calc-error { color: var(--error); font-size: .9375rem; }
.calc-note { color: var(--text-3); font-size: .875rem; margin-top: -16px; }
.calc-note[hidden] { display: none; }

.readout { border-top: 1px solid var(--hairline-strong); padding-top: 28px; }
.readout-label { color: var(--text-3); font-size: .9375rem; }
.readout-km {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 1;
  margin: 12px 0 32px;
  font-variant-numeric: lining-nums tabular-nums;
  max-width: none;
}
.readout-km .empty { font-family: var(--sans); font-size: 1.125rem; color: var(--text-3); }
.readout-km .unit { font-family: var(--sans); font-size: 1.125rem; color: var(--text-2); }
.readout dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hairline); }
.readout dt { color: var(--text-3); font-size: .9375rem; }
.readout dd { font-variant-numeric: tabular-nums; }

/* ---------- Revenda ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 72px) clamp(40px, 6vw, 96px); align-items: start; }
.feature-photo { grid-column: 1 / -1; margin-bottom: clamp(8px, 2vw, 24px); }
.feature { row-gap: 20px; }
.feature-photo img { width: 100%; height: auto; }
.feature-copy { display: contents; }
.feature-copy > h2 { grid-column: 1; grid-row: span 3; }
.feature-copy > p, .feature-copy > .facts { grid-column: 2; }
.feature-copy > p { color: rgba(255, 255, 255, .86); }
.feature-copy .facts { margin-top: 12px; }

/* ---------- Peças e contato ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 120px); }
.split h2 { margin-bottom: 24px; }
.split p { color: rgba(255, 255, 255, .86); }

/* ---------- Rodapé ---------- */
.footer { background: rgba(0, 0, 0, .92); border-top: 1px solid var(--hairline); padding-block: 56px 72px; }
.footer-grid { display: grid; grid-template-columns: auto 1fr; gap: 40px 64px; align-items: start; }
.footer img { height: 56px; width: auto; }
.footer p { color: var(--text-3); font-size: .875rem; line-height: 1.6; }
.footer p + p { margin-top: 8px; }
.footer a { color: var(--text); }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .section-head, .band-grid, .feature, .split { grid-template-columns: 1fr; }
  .feature-copy > h2, .feature-copy > p, .feature-copy > .facts { grid-column: 1; }
}
@media (max-width: 720px) {
  .masthead-top { height: 84px; justify-content: flex-start; }
  .brand img { height: 56px; }
  .hero-emblem { right: 0; top: 110px; width: 58vw; transform: none; }
  .hero-emblem img { opacity: .16; }
  .masthead-nav ul {
    justify-content: flex-start;
    gap: 26px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .masthead-nav a { padding: 12px 0 14px; }
  .masthead-wa.pending::after { content: " [nº]"; }
  .masthead-social { gap: 6px; right: 8px; }
  .masthead-social span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .masthead-wa, .masthead-ig { width: 44px; justify-content: center; }
  .masthead-social .icon { width: 22px; height: 22px; }
  .hero-shade { background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .85) 38%, rgba(0, 0, 0, .35) 70%, rgba(0, 0, 0, .2) 100%); }
  .fields { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 100%; }
  .hero-copy { padding-top: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-video { display: none; }
  .slide { transition: none !important; }
}

/* ---------- Carrinho e pagamento ---------- */
.masthead-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  font: inherit;
  font-size: .875rem;
  color: var(--text);
  background: none;
  border: 0;
  cursor: pointer;
}
.masthead-cart:hover span { text-decoration: underline; }
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cart-count[hidden] { display: none; }
html.modal-open { overflow: hidden; }
.loja-off .masthead-cart { display: none; }

.cart {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--hairline-strong);
  width: min(480px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  background: var(--black);
  color: var(--text);
  overflow: hidden;
}
.cart[open] { display: flex; flex-direction: column; animation: drawer .35s var(--ease) both; }
.cart::backdrop { background: rgba(0, 0, 0, .66); }
@keyframes drawer { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
.cart-panel { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--hairline); }
.cart-head h2 { font-size: clamp(1.625rem, 2.2vw, 2.125rem); line-height: 1.15; }
.cart-close {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s var(--ease);
}
.cart-close:hover { border-color: var(--text); }
.cart-close .icon { width: 20px; height: 20px; fill: none; }
.cart-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 28px; }
.cart-empty { display: grid; gap: 20px; justify-items: start; color: var(--text-2); padding: 24px 0; }
.cart-empty[hidden] { display: none; }
.cart.is-empty .cart-foot { display: none; }

.cart-items { list-style: none; margin: 0; padding: 0; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "info total" "step remove";
  gap: 6px 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.cart-item-info { grid-area: info; }
.cart-item-name { font-size: 1rem; font-weight: 600; max-width: none; }
.cart-item-unit { color: var(--text-3); font-size: .875rem; max-width: none; }
.cart-item-total { grid-area: total; text-align: right; font-variant-numeric: tabular-nums; max-width: none; }
.stepper { grid-area: step; display: inline-flex; align-items: center; justify-self: start; border: 1px solid var(--hairline-strong); border-radius: 4px; }
.stepper output { min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper button { position: relative; width: 44px; height: 44px; background: none; border: 0; color: var(--text); cursor: pointer; }
.stepper button::before,
.stepper button[data-step="1"]::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; transform: translate(-50%, -50%); }
.stepper button::before { width: 14px; height: 1.5px; }
.stepper button[data-step="1"]::after { width: 1.5px; height: 14px; }
.stepper button:disabled { opacity: .35; cursor: default; }
.link-btn { grid-area: remove; justify-self: end; min-height: 44px; padding: 0; background: none; border: 0; color: var(--text-2); font: inherit; font-size: .875rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--text); }

.cart-section { padding-top: 28px; }
.cart-section[hidden] { display: none; }
.cart-section h3 { font-family: var(--sans); font-size: 1.125rem; font-weight: 600; letter-spacing: 0; margin-bottom: 14px; }
.field label { display: block; font-size: .875rem; color: var(--text-3); margin-bottom: 6px; }
.field .opt { color: var(--text-3); }
.cart input[type="text"], .cart input[type="email"], .cart input[type="tel"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
}
.cart input::placeholder { color: #909090; }
.cart input:focus-visible { outline: none; border-color: var(--blue-focus); box-shadow: 0 0 0 1px var(--blue-focus); }
.cart input[aria-invalid="true"] { border-color: var(--error); }
.cart-section .field + .field, .cart-section .field-row, .cart-section .field-row + .field, .cart-section #cart-endereco > .field { margin-top: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-rua { grid-template-columns: 1fr 110px; }
.field-row-cidade { grid-template-columns: 1fr 80px; }
#cart-endereco[hidden] { display: none; }
.cep-row { display: flex; align-items: flex-end; gap: 12px; }
.cep-row .field { flex: 1; }
.cep-row .btn { min-height: 48px; }
.cart-msg:empty { display: none; }
.cart-msg { margin-top: 10px; color: var(--text-2); font-size: .9375rem; max-width: none; }
.cart-msg.is-error { color: var(--error); }

.ship-options { border: 0; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.ship-options[hidden] { display: none; }
.ship {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.ship input { grid-row: 1 / span 2; width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.ship:hover { border-color: var(--text-2); }
.ship:has(input:checked) { border-color: var(--blue); background: rgba(0, 120, 214, .16); }
.ship:has(input:focus-visible) { outline: 2px solid var(--blue-focus); outline-offset: 3px; }
.ship-name { font-size: .9375rem; font-weight: 600; }
.ship-days { grid-column: 2; color: var(--text-2); font-size: .875rem; }
.ship-price { grid-row: 1 / span 2; grid-column: 3; font-variant-numeric: tabular-nums; font-weight: 600; }

.cart-foot { display: grid; gap: 12px; padding: 16px 24px 20px; border-top: 1px solid var(--hairline-strong); background: var(--black); }
.cart-totais { display: grid; gap: 4px; }
.cart-totais > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: .9375rem; }
.cart-totais dt { color: var(--text-2); }
.cart-totais dd { margin: 0; font-variant-numeric: tabular-nums; }
.cart-total { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--hairline); }
.cart-total dt { color: var(--text); }
.cart-total dd { font-family: var(--serif); font-weight: 300; font-size: 1.75rem; line-height: 1.1; }
.cart-erro { color: var(--error); font-size: .9375rem; max-width: none; }
.cart-erro[hidden] { display: none; }
.cart-foot .btn-primary { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.cart-wa { text-align: center; color: var(--text-2); font-size: .9375rem; padding: 10px 0; }
.cart-wa:hover { color: var(--text); }
.cart-wa[hidden] { display: none; }

.cart-status { inset: 0; margin: auto; width: min(520px, 92vw); height: fit-content; border: 1px solid var(--hairline-strong); }
.cart-status[open] { display: block; animation: none; }
.status-panel { padding: 32px; height: auto; }
.status-panel h2 { font-size: clamp(1.625rem, 2.2vw, 2.125rem); line-height: 1.15; }
.status-panel p { margin-top: 12px; color: rgba(255, 255, 255, .86); }

@media (max-width: 720px) {
  .masthead-cart { width: 44px; justify-content: center; }
  .cart-count { position: absolute; top: 2px; right: -2px; }
  .cart { width: 100vw; border-left: 0; }
  .cart-head { padding: 14px 18px; }
  .cart-body { padding: 2px 18px 24px; }
  .cart-foot { padding: 14px 18px 16px; }
  .status-panel { padding: 24px 20px; }
}
