:root {
  --primary: #F9B000;
  --dark: #4d1818;
  --light: #fff;
  --gray: #f5f5f5;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fafafa;
  color: #333;
}

/* ===== PÁGINA DE PRODUTO ===== */

.product-page {
  margin: 32px auto 64px;
}

/* Breadcrumb / trilha */
.product-breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 24px 0 4px;
}

.product-breadcrumb a {
  color: var(--muted);
}

.product-breadcrumb a:hover {
  text-decoration: underline;
}

/* CONTAINER PRINCIPAL (2 colunas) */
.produto-container {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 16px;
}

/* Cards genericos */
.produto-card {
  background: radial-gradient(circle at top, #fffef6 0, #ffffff 45%, #f9fafb 100%);
  border-radius: 18px;
  padding: 20px 22px 22px;
  box-shadow: var(--shadow-soft);
}

.produto-card img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* COLUNA ESQUERDA: GALERIA */
.produto-imagens {
  position: sticky;
  top: 110px;
  align-self: flex-start;
}

.produto-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.product-tag {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.destaque-tag {
  background: rgba(249, 176, 0, 0.18);
  color: #92400e;
}

.estoque-tag {
  background: #ecfdf3;
  color: #166534;
}

.imagem-principal {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
  background: #f3f4f6;
}

.imagem-principal:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Miniaturas + navegação */
.miniaturas-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.miniaturas {
  display: flex;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  scroll-behavior: smooth;
}

/* Miniaturas */
.miniaturas img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  opacity: 0.9;
}

/* Hover */
.miniaturas img:hover {
  transform: translateY(-2px) scale(1.04);
  opacity: 1;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

/* Thumbnail ativa */
.miniaturas img.selecionada {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 1px rgba(249, 176, 0, 0.5), 0 12px 26px rgba(15, 23, 42, 0.25);
  transform: translateY(-2px) scale(1.06);
  opacity: 1;
}

/* Botões de navegação das miniaturas */
.miniatura-nav {
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

.miniatura-nav:disabled {
  opacity: 0.18;
  cursor: default;
  box-shadow: none;
}

.miniatura-nav:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}

/* COLUNA DIREITA: DETALHES */
.produto-detalhes {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Cabeçalho */
.produto-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #f3f4ff;
  color: #1d4ed8;
  width: fit-content;
}

.produto-detalhes h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  color: var(--accent-dark);
}

.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.avaliacao i {
  color: #fbbf24;
}

.avaliacao span {
  margin-left: 6px;
  font-size: 0.82rem;
}

.product-sku {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
}

/* Preço */
.product-price-block {
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7e5, #fff);
  border: 1px solid rgba(249, 176, 0, 0.25);
}

.preco {
  font-size: 1.4rem;
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.preco .antigo {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.9rem;
}

.preco .novo {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.7rem;
}

.product-price-note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Controles / seleção */
.product-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Quantidade */
.quantidade-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label-caption {
  font-size: 0.8rem;
  color: var(--muted);
}

.quantidade-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 999px;
  width: fit-content;
}

.quantidade-actions input {
  width: 64px;
  height: 40px;
  text-align: center;
  border: none;
  background: #ffffff;
  border-radius: 999px;
  font-size: 0.95rem;
  outline: none;
}

.btn-qty {
  width: 36px;
  height: 36px;
  border: none;
  background: #e5e7eb;
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-qty:hover {
  background: var(--primary);
  color: #111827;
  transform: translateY(-1px);
}

/* Cores */
.cores-produto {
  margin-top: 4px;
}

.cores-produto h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.lista-cores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cor-item {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid #111827;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cor-item:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.cor-item.selecionada {
  transform: translateY(-2px) scale(1.12);
}

/* Torneira / Refil */
.torneira-produto,
.refil-produto {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.torneira-produto h4,
.refil-produto h4 {
  font-size: 0.95rem;
}

.select-torneira,
#refilSelect {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  max-width: 240px;
}

.select-torneira:hover,
#refilSelect:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.select-torneira:focus,
#refilSelect:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(249, 176, 0, 0.35);
}

/* Botões principais */
.botoes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.btn-carrinho,
.btn-comprar {
  flex: 1 1 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn-carrinho {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(234, 179, 8, 0.4);
}

.btn-carrinho:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 16px 36px rgba(234, 179, 8, 0.55);
}

.btn-comprar {
  background: #4b1e25;
  color: #ffffff;
  font-weight: 600;
}

.btn-comprar:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.3);
}

/* Frete */
.frete-inline-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

.frete-inline-hint i {
  color: var(--primary);
}

.frete-container {
  display: flex;
  align-items: center;
  margin-top: 8px;
  max-width: 420px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  background: #ffffff;
}

#cepInput {
  flex: 1;
  padding: 10px 14px;
  border: none;
  font-size: 0.9rem;
  outline: none;
}

#calcularFrete {
  border: none;
  padding: 10px 18px;
  font-size: 0.9rem;
  background: #4b5563;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.1s ease;
}

#calcularFrete:hover {
  background: #374151;
  transform: translateY(-1px);
}

/* Cards de frete (já usados na sua lógica) */
#freteResultado {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.frete-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.frete-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.frete-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  border-color: var(--primary);
}

.frete-card.selecionado {
  border-color: var(--primary);
  background: linear-gradient(90deg, #fffbe8, #fff9d9);
}

.frete-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.frete-info h4 {
  margin: 0;
  font-size: 0.95rem;
}

.frete-info p {
  margin: 2px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Perks / garantias */
.product-perks-row {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
}

.product-perk {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.perk-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #f3f4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.perk-icon i {
  font-size: 0.9rem;
  color: #1d4ed8;
}

.perk-text strong {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 2px;
}

.perk-text span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Descrição */
.descricao {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.descricao h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--accent-dark);
}

.descricao p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4b5563;
}

/* RELACIONADOS */
.relacionados {
  margin-top: 64px;              /* mais afastado da caixa de detalhes */
  padding-top: 32px;             /* respiro interno */
  border-top: 1px solid #e5e7eb; /* linha suave separando da seção acima */
}

.relacionados-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 22px;
  margin-top: 30px;
}

.relacionados-header h2 {
  position: relative;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* “underline” moderno embaixo do título */
.relacionados-header h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 80px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #facc15);
}

.relacionados-header p {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.5;
  margin: 14px 0 0; /* fica alinhado com o underline do título */
  opacity: 0.9;
}

/* Cards de relacionados no mesmo estilo da categoria */
.relacionados .produtos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.relacionados .produto {
  position: relative;
  background-color: #ffffff;
  border-radius: 14px;
  padding-bottom: 12px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.relacionados .produto img {
  width: 100%;
  object-fit: cover;
}

.relacionados .produto h3 {
  margin: 10px 14px 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.relacionados .produto .preco {
  margin: 0 14px 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.relacionados .produto .preco .antigo {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.8rem;
}

.relacionados .produto .preco .novo {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

.relacionados .produto:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(249, 176, 0, 0.7);
}

/* ===== Botão Voltar ao Topo ===== */
#btnTop {
  position: fixed;
  bottom: 92px;
  right: 26px;
  z-index: 99;
  background-color: #111827;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.45);
  transition: all 0.25s ease;
  width: 48px;
  height: 48px;
  opacity: 0;
  visibility: hidden;
}

#btnTop img {
  width: 22px;
  height: 22px;
}

#btnTop:hover {
  transform: translateY(-2px);
}

/* Mostrar botão quando rolar a página */
#btnTop.show {
  opacity: 1;
  visibility: visible;
}

/* ===== Botão WhatsApp ===== */
#btnWhats {
  position: fixed;
  bottom: 28px;
  right: 26px;
  z-index: 98;
  background-color: #22c55e;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.6);
  transition: all 0.25s ease;
  width: 52px;
  height: 52px;
}

#btnWhats img {
  width: 34px;
  height: 34px;
}

#btnWhats:hover {
  transform: translateY(-2px) scale(1.03);
}

/* ================== Modal de Login / Carrinho Vazio ================== */
.modal-login {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1600;
}

.modal-login.show {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background: #ffffff;
  padding: 28px 30px;
  border-radius: 18px;
  text-align: center;
  max-width: 420px;
  box-shadow: var(--shadow-hover);
  animation: slideUp 0.25s ease;
}

.modal-content h2 {
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.modal-content p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-actions.modal-actions-center {
  justify-content: center;
}

.btn-modal-login {
  background: linear-gradient(135deg, #f9b000, #f97316);
  color: #111827;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 600;
}

.btn-modal-login:hover {
  transform: translateY(-1px);
}

.btn-modal-fechar {
  background: #e5e7eb;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 500;
}

.btn-modal-fechar:hover {
  background: #d1d5db;
  transform: translateY(-1px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Animação ao adicionar ao carrinho ===== */
.fly-to-cart {
  position: fixed;
  z-index: 1400;
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
  transform: translate(0, 0) scale(1);
  opacity: 1;
  transition:
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.8s ease-out;
}

/* pulso no botão do carrinho quando recebe item */
#cart-button.cart-pulse {
  animation: cartPulse 0.45s ease-out;
}

@keyframes cartPulse {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
  .produto-container {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 22px;
  }

  .produto-imagens {
    position: static;
  }

  #imagemPrincipal {
    width: 100%;
    height: 415px;
    object-fit: cover;
    transition: transform 0.3s 
    ease;
  }
}

@media (max-width: 768px) {
  .produto-container {
    grid-template-columns: minmax(0, 1fr);
  }

  .produto-card {
    padding: 16px 14px 18px;
  }

  .botoes-container {
    flex-direction: column;
  }

  .btn-carrinho,
  .btn-comprar {
    flex: 1 1 auto;
    width: 100%;
  }

  .frete-container {
    max-width: 100%;
  }

   .miniaturas img {
    width: 72px;
    height: 72px;
  }

  
}