:root {
  --yellow: #ffd000;
  --yellow-hover: #f0c200;
  --black: #111111;
  --dark: #1c1c1e;
  --surface: #ffffff;
  --bg: #f5f5f7;
  --text: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s ease;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--yellow-hover);
}

.btn-dark {
  background: var(--black);
  color: #fff;
}

.btn-dark:hover {
  background: #27272a;
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--black);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline-light:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn-block {
  width: 100%;
}

/* Tela de Entrada / Login */
.entry-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.86);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.entry-overlay.hidden {
  display: none;
}

.entry-card {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  border-top: 6px solid var(--yellow);
}

.brand-badge {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  margin-bottom: 16px;
}

.entry-wordmark {
  display: block;
  width: min(100%, 290px);
  height: auto;
}

.brand-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.entry-card h1 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.entry-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-social {
  background: #fafafa;
  border-color: var(--border);
  color: var(--text);
}

.btn-social .icon {
  font-weight: 900;
}

.email-form {
  display: grid;
  gap: 10px;
}

.email-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.divider {
  text-align: center;
  margin: 14px 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.divider span {
  position: relative;
  background: #fff;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.btn-guest {
  width: 100%;
  padding: 13px 18px;
  font-size: 1rem;
}

.auth-feedback {
  margin-top: 10px;
  font-size: 0.86rem;
  color: #15803d;
  min-height: 1.2em;
}

/* Header */
.site-header {
  background: var(--black);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.header-brand strong {
  display: block;
  font-size: 1.15rem;
  color: var(--yellow);
}

.header-wordmark {
  display: block;
  width: clamp(130px, 17vw, 225px);
  height: auto;
}

.store-art {
  display: block;
  width: 100%;
  height: auto;
}

.footer-map { width: min(100%, 380px); }
.map-frame-box { width: 100%; height: 180px; border: 1px solid #ffd00073; border-radius: 12px; overflow: hidden; background: #18181b; }
.map-frame-box iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-link-btn { display: inline-block; margin-top: .65rem; color: #ffcf00; }

.header-brand small {
  font-size: 0.78rem;
  color: #d4d4d8;
}

.search-box {
  flex: 1;
  min-width: 220px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #3f3f46;
  background: #1f1f23;
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 10px;
}

#btn-departments { display: none; }

.departments-bar {
  background: var(--dark);
  border-top: 1px solid #27272a;
}

.departments-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 8px;
  padding: 10px 0;
}

.dept-chip {
  background: #27272a;
  color: #e4e4e7;
  border: 1px solid transparent;
  padding: 7px 8px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}

.department-icon {
  display: inline-grid;
  place-items: center;
  width: clamp(4rem, 6vw, 5.2rem);
  height: clamp(4rem, 6vw, 5.2rem);
  flex-shrink: 0;
  font-size: 3.3rem;
  line-height: 1;
  object-fit: contain;
  color: #ffcf00;
}

.dept-chip { text-decoration: none; }

.department-view :is(.promo-carousel, .partners-marquee, .hero-section, .promoters-section) {
  display: none;
}

#catalog-paths:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

#catalog-paths a[aria-current="page"],
#catalog-brand-links a[aria-current="page"] {
  background: var(--yellow);
  color: var(--black);
  border-color: #a98800;
}

.catalog-brands {
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
  padding-top: 12px;
}

.catalog-brands h4 { margin-bottom: 6px; }

#catalog-brand-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#catalog-brand-links .btn {
  min-height: 36px;
  padding: 5px 10px;
  font-size: 0.8rem;
}

#search-results {
  margin-bottom: 12px;
}

#part-types:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 440px;
  margin-bottom: 16px;
}

#part-types .btn {
  min-height: 48px;
  padding-inline: 8px;
  font-size: 1.1rem;
}

#part-types a[aria-current="page"] {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--black);
  box-shadow: inset 0 0 0 1px var(--black);
}

#part-types a:not([aria-current]) {
  background: #fff;
  border-color: var(--yellow);
}

.dept-chip.active .department-icon,
.dept-chip:hover .department-icon { color: inherit; }

.dept-chip.active,
.dept-chip:hover {
  background: var(--yellow);
  color: var(--black);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, #111111 0%, #232326 100%);
  color: #fff;
  padding: 44px 0;
  border-bottom: 4px solid var(--yellow);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
}

.pill-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-section p {
  color: #d4d4d8;
  margin-bottom: 20px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 208, 0, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
}

.stat-box strong {
  display: block;
  color: var(--yellow);
  font-size: 1.1rem;
}

.stat-box span {
  font-size: 0.88rem;
  color: #e4e4e7;
}

/* Divulgadores */
.promoters-section {
  padding: 8px 0;
}

.sponsor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  padding-block: 12px;
}

.sponsor-art {
  width: 100%;
  background: url("patrocinadores.png") no-repeat;
}

/* Cada recorte conserva a proporção da arte enviada. */
.sponsor-premium {
  aspect-ratio: 588 / 424;
  background-size: 337.24% auto;
  background-position: 3.73% 46.88%;
}

.sponsor-month {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.sponsor-month figcaption {
  font-weight: 700;
}

.sponsor-month img {
  display: block;
  width: 100%;
  max-height: 230px;
  aspect-ratio: 1;
  object-fit: contain;
}

.sponsor-gold {
  text-align: center;
}

.sponsor-gold h3 {
  width: fit-content;
  margin: 0 auto;
  padding: 4px 16px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
}

.sponsor-gold label {
  font-size: 0.8rem;
}

.gold-carousel {
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 700px;
  min-height: 138px;
}

.gold-carousel .sponsor-art {
  grid-area: 1 / 1;
  width: min(100%, 272px);
  animation: gold-spiral 12s linear infinite;
  opacity: 0;
}

.gold-carousel .sponsor-junior {
  aspect-ratio: 315 / 145;
  background-size: 629.52% auto;
  background-position: 39.63% 46.45%;
}

.gold-carousel .sponsor-passos {
  aspect-ratio: 323 / 145;
  background-size: 613.93% auto;
  background-position: 60.12% 46.45%;
  animation-delay: -6s;
}

#pause-gold:checked ~ .gold-carousel .sponsor-art,
.gold-carousel:hover .sponsor-art {
  animation-play-state: paused;
}

@keyframes gold-spiral {
  0% { opacity: 0; transform: translate(-24%, 12%) rotateY(-75deg) rotateZ(-25deg) scale(.75); }
  8%, 42% { opacity: 1; transform: none; }
  50%, 100% { opacity: 0; transform: translate(24%, -12%) rotateY(75deg) rotateZ(25deg) scale(.75); }
}

@media (prefers-reduced-motion: reduce) {
  #pause-gold, .sponsor-gold label { display: none; }
  .gold-carousel .sponsor-art {
    grid-area: auto;
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .sponsor-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sponsor-gold {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-head h3 {
  font-size: 1.35rem;
}

.section-head p {
  color: var(--muted);
  font-size: 0.9rem;
}

.promoters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
}

.promoter-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promoter-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.promoter-card input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
}

.promoter-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: underline;
}

/* Vitrine */
.catalog-section {
  padding: 32px 0 56px;
}

.catalog-controls select {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

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

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-thumb {
  height: 220px;
  padding: 10px;
  background: #fff;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-placeholder {
  font-weight: 800;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-title {
  font-weight: 700;
  font-size: 1rem;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--black);
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
}

.cart-drawer.open {
  display: block;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.btn-icon {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.cart-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.checkout-feedback {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--black);
  color: #d4d4d8;
  border-top: 2px solid var(--yellow);
  padding-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-block: 16px 24px;
}

.footer-logo {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 50%;
  background: url("rodape.png") 4.87% 24.72% / 995.4% auto no-repeat;
}

.footer-grid > div {
  overflow-wrap: anywhere;
}

.site-footer h4 {
  color: var(--yellow);
  margin-bottom: 10px;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.site-footer .payment-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.payment-logo {
  display: block;
  width: 48px;
  background: url("rodape.png") no-repeat;
}

.payment-visa {
  aspect-ratio: 82 / 50;
  background-size: 2367.07% auto;
  background-position: 68.37% 43.16%;
}

.payment-mastercard {
  aspect-ratio: 78 / 52;
  background-size: 2488.46% auto;
  background-position: 73.43% 43.01%;
}

.payment-elo {
  aspect-ratio: 82 / 52;
  background-size: 2367.07% auto;
  background-position: 78.32% 43.01%;
}

.payment-hipercard {
  aspect-ratio: 91 / 52;
  background-size: 2132.97% auto;
  background-position: 83.68% 43.01%;
}

.payment-pix {
  aspect-ratio: 115 / 54;
  background-size: 1687.83% auto;
  background-position: 70.54% 55.42%;
}

.payment-boleto {
  aspect-ratio: 79 / 50;
  background-size: 2456.96% auto;
  background-position: 77.12% 55.39%;
}

.footer-note {
  margin-top: 12px;
  font-size: 0.88rem;
}

.footer-bottom {
  background: var(--yellow);
  color: var(--black);
  padding: 14px 0;
  font-size: 0.84rem;
  text-align: center;
}

@media (max-width: 768px), (max-width: 1024px) and (pointer: coarse) {
  body:has(.entry-overlay:not(.hidden)) {
    overflow: hidden;
  }

  .entry-overlay {
    padding: 12px;
  }

  .entry-card {
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .entry-card .brand-badge { margin-bottom: 10px; }
  .entry-card .entry-wordmark { width: min(100%, 165px); }
  .entry-card .brand-sub { font-size: 0.85rem; }
  .entry-card h1 { font-size: 1.4rem; }
  .entry-card .entry-desc { font-size: 1rem; margin-bottom: 12px; }
  .entry-card .divider { margin: 8px 0; }
  .entry-card .auth-feedback:empty { display: none; }
  .entry-card .auth-actions,
  .entry-card .email-form,
  .entry-card .form-row { gap: 6px; }
  .entry-card .auth-actions { margin-bottom: 8px; }

  .entry-card .btn,
  .entry-card .email-form input {
    font-size: 1rem;
    min-height: 44px;
    padding: 6px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    padding: 6px 0;
  }

  .header-inner .header-wordmark { width: min(100%, 110px); }
  .header-inner .header-actions { display: contents; }
  .header-inner .btn { min-height: 44px; padding: 5px 8px; font-size: 0.8rem; }
  .header-inner #btn-open-login { grid-area: 1 / 2; }
  .header-inner #btn-open-cart { grid-area: 1 / 3; }
  .header-inner .search-box { grid-area: 2 / 1 / 3 / 3; min-width: 0; }
  .header-inner .search-box input { min-height: 44px; font-size: 1rem; }
  .header-inner #btn-departments { display: inline-flex; grid-area: 2 / 3; }

  .departments-bar {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    max-height: 60vh;
    max-height: 60dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 8px 16px #0004;
  }

  .departments-bar.is-open { display: block; }
  .departments-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .departments-list .department-icon { width: 44px; height: 44px; }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
