:root {
  --blue: #075FC3;
  --blue-dark: #003B96;
  --blue-deep: #002E79;
  --text-dark: #082F75;
  --pink: #EF3F7F;
  --pink-dark: #C92E68;
  --pink-light: #FFEFF3;
  --yellow: #FFC900;
  --white: #FFFFFF;
  --font-display: 'League Spartan', 'Montserrat', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow-card: 0 14px 30px rgba(0, 46, 121, 0.28);
  --shadow-soft: 0 8px 20px rgba(0, 46, 121, 0.18);
  --panel-pad: clamp(28px, 4vw, 56px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 55%, var(--blue-deep) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
}

p {
  margin: 0;
}

/* ── Botão Voltar ─────────────────────────── */

.back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 46, 121, 0.15);
  border-radius: 12px;
  padding: 8px 10px 6px;
  cursor: pointer;
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, box-shadow 0.2s;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.back-btn span {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* ── Main Container ───────────────────────── */

main {
  padding: var(--panel-pad);
  padding-top: calc(var(--panel-pad) + 60px);
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Breadcrumb ───────────────────────────── */

.breadcrumb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 32px;
  font-size: 13px;
  font-weight: 600;
}

.breadcrumb-bar a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.breadcrumb-bar a:hover {
  color: var(--white);
}

.breadcrumb-bar .sep {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 4px;
}

.breadcrumb-bar .atual {
  color: var(--white);
}

/* ── Produto Grid ─────────────────────────── */

.produto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* ── Galeria ──────────────────────────────── */

.galeria {
  position: sticky;
  top: 80px;
}

.galeria-principal {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}

.galeria-principal img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s;
}

.galeria-principal:hover img {
  transform: scale(1.02);
}

.galeria-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.galeria-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
  opacity: 0.6;
}

.galeria-thumb:hover,
.galeria-thumb.ativa {
  border-color: var(--pink);
  opacity: 1;
  box-shadow: var(--shadow-soft);
}

.galeria-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Dados do Produto ─────────────────────── */

.produto-dados {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.produto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.produto-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.2s;
}

.produto-tag:hover {
  transform: translateY(-1px);
}

.produto-nome {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 34px);
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--white);
}

.produto-preco-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--pink);
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  width: fit-content;
  box-shadow: var(--shadow-soft);
}

.produto-preco {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
}

.produto-descricao {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

/* ── Accordion Especificações ─────────────── */

.accordion-espec {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  margin-top: 4px;
  overflow: hidden;
}

.accordion-espec[open] {
  background: rgba(255, 255, 255, 0.1);
}

.accordion-espec-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
  user-select: none;
}

.accordion-espec-header::-webkit-details-marker {
  display: none;
}

.accordion-espec-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.accordion-espec-header i:first-child {
  color: var(--yellow);
  font-size: 16px;
}

.accordion-espec-icon {
  margin-left: auto;
  transition: transform 0.3s;
}

.accordion-espec[open] .accordion-espec-icon {
  transform: rotate(180deg);
}

.accordion-espec-body {
  padding: 0 20px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.accordion-espec-body .spec-linha {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.accordion-espec-body .spec-linha:last-child {
  border-bottom: none;
}

.accordion-espec-body .spec-nome {
  font-weight: 700;
  color: var(--white);
  min-width: 120px;
}

.accordion-espec-body .spec-valor {
  text-align: right;
  color: rgba(255, 255, 255, 0.8);
}

/* ── Como Comprar ────────────────────────── */

.como-comprar {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 8px;
}

.como-comprar h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.como-comprar h3 i {
  color: var(--yellow);
  font-size: 16px;
}

.como-comprar p {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}

.como-comprar p:last-child {
  margin-bottom: 0;
}

.como-comprar strong {
  color: var(--white);
  font-weight: 700;
}

/* ── Botões de Compra ─────────────────────── */

.botoes-compra {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.btn-comprar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-comprar:hover {
  transform: translateY(-3px);
}

.btn-comprar img {
  height: 24px;
}

.btn-ml-comprar {
  background: #ffe600;
  color: #333;
  box-shadow: 0 8px 20px rgba(255, 230, 0, 0.35);
}

.btn-ml-comprar:hover {
  box-shadow: 0 12px 28px rgba(255, 230, 0, 0.5);
}

.btn-shopee-comprar {
  background: #f05d23;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(240, 93, 35, 0.35);
}

.btn-shopee-comprar:hover {
  box-shadow: 0 12px 28px rgba(240, 93, 35, 0.5);
}

.btn-whatsapp-comprar {
  background: #25D366;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-comprar:hover {
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5);
}

.info-compra {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.info-compra i {
  color: var(--yellow);
  font-size: 16px;
}

/* ── Relacionados ─────────────────────────── */

.relacionados-section {
  margin-top: 60px;
}

.relacionados-section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--white);
}

.relacionados-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* Excesso (além dos 5) fica oculto — desktop mostra 5 */
.relacionado-card:nth-child(n + 6) { display: none; }

.relacionado-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s;
}

.relacionado-card:hover {
  transform: translateY(-4px);
}

.relacionado-foto {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.relacionado-foto-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 32px;
}

.relacionado-info {
  padding: 14px 16px;
}

.relacionado-nome {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dark);
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.relacionado-preco {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--pink);
}

/* ── Footer ───────────────────────────────── */

.loja-footer {
  text-align: center;
  padding: 40px 20px;
  opacity: 0.6;
  font-size: 13px;
  color: var(--white);
}

.loja-footer a {
  color: var(--white);
}

/* ── Responsive ───────────────────────────── */

/* Tablet: 4 produtos + excesso oculto além do 4º */
@media (max-width: 1100px) {
  .relacionados-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .relacionado-card:nth-child(n + 5) { display: none; }
  .relacionado-foto { height: 150px; }
  .relacionado-foto-placeholder { height: 150px; }
  .relacionado-nome { font-size: 12px; }
  .relacionado-preco { font-size: 12px; }
}

@media (max-width: 767px) {
  main {
    padding: 24px 16px;
    padding-top: 80px;
  }

  .produto-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Celular: 3 produtos + excesso oculto além do 3º */
  .relacionados-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .relacionado-card:nth-child(n + 4) { display: none; }
  .relacionado-foto { height: 110px; }
  .relacionado-foto-placeholder { height: 110px; }
  .relacionado-nome { font-size: 10px; }
  .relacionado-preco { font-size: 11px; }
  .relacionado-info { padding: 8px 8px 10px; }

  .galeria {
    position: static;
  }

  .back-btn {
    top: 10px;
    left: 10px;
    padding: 6px 8px 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
