/* ============================================================
   AUTORAD PERFORMANCE — components.css
   Botões, cards, formulários, stepper, upload, catálogo
   ============================================================ */

/* ============================ BOTÕES ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  user-select: none;
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(237, 23, 37, 0.32);
}

.btn--primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(237, 23, 37, 0.42);
}

.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--silver);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  border-color: var(--silver);
  color: var(--white);
  background: rgba(209, 209, 211, 0.06);
}

.btn--yellow {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 8px 24px rgba(255, 234, 0, 0.22);
}

.btn--yellow:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.btn--sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
}

.btn--lg {
  min-height: 56px;
  padding: 14px 36px;
  font-size: 1.08rem;
}

.btn--block { width: 100%; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================ FORMULÁRIOS ============================ */

.field { margin-bottom: 18px; }

.field label,
.field-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea,
.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--white);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(237, 23, 37, 0.18);
}

.field input[type="range"] {
  padding: 0;
  min-height: 30px;
  background: transparent;
  border: 0;
  accent-color: var(--red);
}

.field .hint {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

/* ============================ CARDS ============================ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
}

.card__body { padding: 18px; }

/* ============================ STEPPER ============================ */

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 26px 0 6px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  position: relative;
}

.step:not(:last-child)::after {
  content: "";
  width: clamp(28px, 6vw, 72px);
  height: 2px;
  background: var(--line-strong);
  margin: 0 12px;
  flex-shrink: 0;
}

.step__num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  border: 2px solid var(--line-strong);
  background: var(--graphite);
  flex-shrink: 0;
  transition: all var(--dur) var(--ease);
}

.step__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.step.is-active { color: var(--white); }
.step.is-active .step__num {
  border-color: var(--yellow);
  color: var(--black);
  background: var(--yellow);
}

.step.is-done { color: var(--silver); }
.step.is-done .step__num {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

/* ============================ UPLOAD ============================ */

.dropzone {
  position: relative;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-l);
  background: linear-gradient(180deg, rgba(28, 32, 38, 0.7), rgba(17, 19, 24, 0.9));
  padding: clamp(32px, 6vw, 64px) 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--red);
  background: rgba(237, 23, 37, 0.06);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(237, 23, 37, 0.14);
  color: var(--red);
}

.dropzone__icon svg,
.dropzone__icon[data-icon] svg { width: 30px; height: 30px; }

.dropzone__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.dropzone__hint {
  color: var(--text-dim);
  font-size: 0.94rem;
  margin: 0;
}

.dropzone__formats {
  margin-top: 14px;
  display: inline-flex;
  gap: 8px;
}

.photo-preview {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--graphite);
}

.photo-preview img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.photo-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex-wrap: wrap;
}

/* ============================ CATÁLOGO ============================ */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.filters__group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filters__label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--silver);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.chip:hover { border-color: var(--silver); color: var(--white); }

.chip.is-active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.wheel-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  text-align: left;
  padding: 0;
  color: inherit;
  width: 100%;
}

.wheel-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-m);
}

.wheel-card.is-selected {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow), 0 12px 32px rgba(255, 234, 0, 0.14);
}

.wheel-card__media {
  position: relative;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 42%, #2A2F38 0%, #16191F 62%, #0D0F13 100%);
  display: grid;
  place-items: center;
  padding: 14px;
}

.wheel-card__media img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55));
  transition: transform 0.45s var(--ease);
}

.wheel-card:hover .wheel-card__media img {
  transform: scale(1.06) rotate(8deg);
}

.wheel-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.wheel-card__body { padding: 14px 16px 16px; }

.wheel-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  margin: 0 0 2px;
}

.wheel-card__brand {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0 0 10px;
}

.wheel-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.wheel-card__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--yellow);
}

.wheel-card__price--none {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.88rem;
}

.catalog-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 250px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.catalog-scroll .wheel-card { scroll-snap-align: start; }

.catalog-scroll::-webkit-scrollbar { height: 8px; }
.catalog-scroll::-webkit-scrollbar-track { background: var(--surface); border-radius: 8px; }
.catalog-scroll::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; }
.catalog-scroll::-webkit-scrollbar-thumb:hover { background: var(--red); }

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-m);
}

/* ============================ HOME ============================ */

.hero {
  position: relative;
  min-height: clamp(540px, 88vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--black);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 11, 0.96) 0%, rgba(8, 9, 11, 0.82) 42%, rgba(8, 9, 11, 0.25) 100%),
    linear-gradient(0deg, var(--black) 0%, transparent 28%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 80px 0 96px;
}

.hero h1 {
  margin-bottom: 18px;
}

.hero h1 .accent { color: var(--red); }

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--silver);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__stripe {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, var(--red) 0 34%, var(--yellow) 34% 55%, transparent 55%);
  z-index: 2;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.benefit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.benefit:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.benefit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--yellow));
  transform: scaleX(0.24);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.benefit:hover::before { transform: scaleX(1); }

.benefit__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--red);
  line-height: 1;
  margin-bottom: 12px;
}

.benefit h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.benefit p {
  color: var(--text-dim);
  font-size: 0.94rem;
  margin: 0;
}

.how-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.how-visual {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-l);
}

.how-visual img { width: 100%; }

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.how-steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
}

.how-steps .n {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--yellow);
}

.how-steps h3 { font-size: 1.12rem; margin-bottom: 4px; }
.how-steps p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

.cta-band {
  background:
    linear-gradient(120deg, rgba(237, 23, 37, 0.16), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(32px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

/* ============================ PÁGINAS INTERNAS ============================ */

.page-hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 12% 0%, rgba(237, 23, 37, 0.14), transparent 60%),
    var(--graphite);
}

.page-hero .lead { margin: 0; }

/* ============================ TOAST ============================ */

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 300;
  display: grid;
  gap: 10px;
  max-width: min(380px, calc(100vw - 36px));
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--red);
  color: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-m);
  font-size: 0.94rem;
  animation: toast-in 0.3s var(--ease);
}

.toast--success { border-left-color: #26C878; }
.toast--warn { border-left-color: var(--yellow); }
.toast--error { border-left-color: var(--red); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================ MODAL ============================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 7, 0.78);
  backdrop-filter: blur(6px);
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-l);
}

.modal h3 { margin-bottom: 10px; }
.modal p { color: var(--text-dim); }
.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
  flex-wrap: wrap;
}
