/* ════════════════════════════════════════════════════════════
   product_info.css — versão ajustada
   Correções: cascata conflitante do featuresListContainer,
   botões da galeria mobile quebrados, h2→h1 do erro, media
   queries consolidadas, bloco technicalOptions integrado
   (antes inline no PHP), prefers-reduced-motion.
   ════════════════════════════════════════════════════════════ */

/* Container principal da página do produto */
.productInfoPageContainer {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 0 0 64px 0;          /* respiração maior antes do footer */
  background-color: #fafafa;     /* fundo claro neutro */
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
}

/* ════════════════════════════════════════════════════════════
   FEATURES — título com barra vermelha de acento
   ════════════════════════════════════════════════════════════ */
.featuresHeading {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 24px 0 16px;
  letter-spacing: -0.005em;
  position: relative;
  padding-left: 12px;
}
.featuresHeading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: #BB0606;
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════
   DESCRIÇÃO — bloco solo SEM container/cartão.
   Apenas texto, com respiro acima e divisor superior sutil.
   ════════════════════════════════════════════════════════════ */
.productDescriptionBlock {
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid #ececec;
}
.productDescriptionBlock p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
  letter-spacing: 0.01em;
  max-width: 980px;
}
@media (max-width: 768px) {
  .productDescriptionBlock { margin-top: 28px; padding-top: 20px; }
  .productDescriptionBlock p { font-size: 15px; line-height: 1.65; }
}

/* Container de informações do produto — colado ao header-section */
.productInfoContainer {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  gap: 56px;
  align-items: stretch;
  box-sizing: border-box;
  padding: 32px 24px 0;
}

/* Wrapper — só layout em colunas, sem card envolvendo tudo */
.productContentWrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
  margin: 0 auto;
}

/* Coluna esquerda (galeria + features) flexível;
   coluna direita (detalhes) fixa em ~420px */
.imageAndFeaturesContainer {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.productDetailsSection {
  flex: 0 0 540px;     /* bumped: 420 era estreito demais — sobrava espaço no meio em telas largas */
  max-width: 540px;
}

/* =========================
   Features / descrição
   ========================= */
.featuresInfoContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sem wrapper de card — decisão de design. As media queries que
   readicionavam padding (20px/16px) foram REMOVIDAS: elas vinham
   depois no arquivo e venciam a cascata, contradizendo o padding:0
   daqui. Se um dia quiser volta do card, reative num bloco único. */
.featuresListContainer {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.productTags {
  display: flex;
  flex-wrap: wrap;               /* consolidado do media query 768px */
  gap: 12px;
  margin-bottom: 16px;
}

.tagEco {
  background-color: #2DD4BF;
  color: #0F766E;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease;
}

.tagPremium {
  background-color: #FEF08A;
  color: #854D0E;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease;
}

/* tagNew existia no PHP mas não tinha estilo — adicionada */
.tagNew {
  background-color: #DBEAFE;
  color: #1D4ED8;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease;
}

.tagEco:hover, .tagPremium:hover, .tagNew:hover {
  transform: translateY(-2px);
}

.productShortDescription {
  margin-bottom: 14px;
  font-size: 18px;
  color: #1f2937;
  line-height: 1.55;
  font-weight: 600;
}

.productDescription {
  margin-bottom: 24px;
  font-size: 16px;
  color: #4B5563;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.featuresList {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.featureItem {
  margin-bottom: 16px;
  padding-left: 24px;
  position: relative;
}

.featureItem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background-color: #DC2626;
}

.featureKey {
  font-weight: 600;
  color: #1F2937;
  margin-right: 8px;
}

.featureValue {
  color: #4B5563;
}

.technicalDataLink {
  margin-top: 24px;
}

.technicalDataButton {
  display: flex;
  align-items: center;
  color: #991B1B;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.technicalDataButton:hover {
  color: #DC2626;
}

.technicalDataButton:hover .chevronIcon {
  transform: translateX(4px);
}

.chevronIcon {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

/* =========================
   Galeria de Imagens
   ========================= */
.imageGalleryContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
}

.mainImageContainer {
  position: relative;
  width: 100%;
  max-width: none;     /* preenche a coluna em vez de capar em 600px */
  margin: 0;
  background-color: #f0f0f0;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px;
}

.mainImage {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}

.thumbnailContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 40px;
}

.thumbnail {
  width: 80px;
  height: 80px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 2px solid #ccc;
  border-radius: 4px;
  transition: border 0.3s ease;
}

.thumbnail.selected {
  border-color: #BB0606;
}

.prevButton,
.nextButton {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  color: #BB0606;
  font-size: 2rem;
  padding: 0 14px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.prevButton:hover,
.nextButton:hover {
  background-color: #BB0606;
  color: #fff;
}

.prevButton { left: -20px; }
.nextButton { right: -20px; }

/* =========================
   Ações rápidas: Ficha Técnica · Formulário · WhatsApp
   (movido do <style> inline do product_info.php)
   ========================= */
.technicalOptionsContainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 24px;
  margin: 40px auto 0;
  max-width: 1600px;
  box-sizing: border-box;
}

.technicalOption {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  padding: 38px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid #ececec;
  color: #1a1a1a;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-height: 180px;
}

.technicalOption:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.18);
}

.technicalOption .opt-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  transition: transform 0.25s ease;
}
.technicalOption:hover .opt-icon { transform: scale(1.08); }

.technicalOption .opt-label {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.1px;
  line-height: 1.25;
  color: #1a1a1a;
  margin: 0;
}
.technicalOption .opt-sub {
  font-size: 0.8rem;
  color: #888;
  font-weight: 500;
  margin: 0;
}

.technicalOption.opt-ficha .opt-icon { background: #fef2f2; color: #BB0606; }
.technicalOption.opt-ficha:hover {
  border-color: rgba(187, 6, 6, 0.25);
  box-shadow: 0 12px 26px -8px rgba(187, 6, 6, 0.28);
}

.technicalOption.opt-form .opt-icon { background: #eff6ff; color: #1d4ed8; }
.technicalOption.opt-form:hover {
  border-color: rgba(29, 78, 216, 0.25);
  box-shadow: 0 12px 26px -8px rgba(29, 78, 216, 0.25);
}

.technicalOption.opt-wpp .opt-icon { background: #ecfdf5; color: #16a34a; }
.technicalOption.opt-wpp:hover {
  border-color: rgba(22, 163, 74, 0.3);
  box-shadow: 0 12px 26px -8px rgba(22, 163, 74, 0.28);
}

/* =========================
   Download Ficha Técnica
   ========================= */
.downloadFichaContainer {
  display: flex;
  justify-content: center;
  margin: 2rem auto;
  width: 100%;
  max-width: 1600px;
  padding: 0 1rem;
}

.downloadFichaButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: #ffffff;
  color: #333333;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.downloadFichaButton:hover {
  border-color: #BB0606;
  color: #BB0606;
  box-shadow: 0 4px 8px rgba(187, 6, 6, 0.1);
  transform: translateY(-2px);
}

.downloadFichaButton:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* =========================
   Página de erro (404 / falha)
   ========================= */
.errorContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  width: 100%;
  background-color: #f8f9fa;
  padding: 20px;
  box-sizing: border-box;
}

.errorContent {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

/* O PHP renderiza <h1>, não <h2> — seletor corrigido (h2 mantido
   por compatibilidade caso alguma página antiga ainda use) */
.errorContent h1,
.errorContent h2 {
  font-size: 24px;
  color: #333;
  margin: 20px 0 10px;
  font-weight: 600;
}

.errorContent p {
  font-size: 16px;
  color: #666;
  margin: 0 0 20px;
}

/* Link "Voltar ao catálogo" no card de erro */
.errorContent a {
  display: inline-block;
  background-color: #BB0606;   /* vermelho da marca, não azul genérico */
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.errorContent a:hover {
  background-color: #991B1B;
}

.accessError {
  font-size: 14px;
  color: #d32f2f;
  margin: 10px 0;
}

.retryButton {
  background-color: #BB0606;   /* alinhado à marca (era azul #007bff) */
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.retryButton:hover {
  background-color: #991B1B;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVO — consolidado por breakpoint (antes os mesmos
   breakpoints apareciam espalhados 3x pelo arquivo)
   ════════════════════════════════════════════════════════════ */

/* ≤1024px: empilha colunas e libera largura total */
@media (max-width: 1024px) {
  .productContentWrapper {
    flex-direction: column;
    gap: 40px; /* aumenta o respiro entre galeria e bloco de descrição/detalhes — antes era 20px e ficava colado */
    align-items: stretch;
  }
  .productDetailsSection {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }
  .productDetailsContainer {
    width: 100%;
    max-width: 100%;
  }
}

/* ≤768px */
@media (max-width: 768px) {
  .productInfoContainer {
    gap: 36px;
    padding: 20px 6px 0;
  }

  /* Galeria: thumbnails em linha, botões reposicionados.
     BUG corrigido: antes prevButton e nextButton recebiam
     left:10px E right:10px ao mesmo tempo (regra compartilhada),
     esticando/embolando os dois botões. Agora cada um tem o seu. */
  .imageGalleryContainer {
    flex-direction: column;
    align-items: center;
  }
  .thumbnailContainer {
    flex-direction: row;
    justify-content: center;
    overflow-x: auto;
    padding: 10px;
    padding-right: 10px;       /* anula os 40px do desktop */
  }
  .thumbnail {
    width: 60px;
    height: 60px;
  }
  .prevButton,
  .nextButton {
    font-size: 1.5rem;
    padding: 0 10px;
  }
  .prevButton { left: 10px; right: auto; }
  .nextButton { right: 10px; left: auto; }

  .productDescription { font-size: 15px; }

  .downloadFichaButton {
    width: 100%;
    padding: 0.75rem 1.25rem;
  }

  /* Ações rápidas compactas */
  .technicalOptionsContainer {
    gap: 10px;
    padding: 0 14px;
    margin-top: 28px;
  }
  .technicalOption {
    padding: 22px 8px;
    min-height: 128px;
    gap: 10px;
    border-radius: 14px;
  }
  .technicalOption .opt-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    border-radius: 13px;
  }
  .technicalOption .opt-label { font-size: 0.82rem; }
  .technicalOption .opt-sub   { display: none; }
}

/* ≤480px */
@media (max-width: 480px) {
  .productInfoContainer {
    padding: 16px 4px 0;
  }
}

/* ≤380px: ações rápidas mínimas */
@media (max-width: 380px) {
  .technicalOptionsContainer { gap: 8px; padding: 0 10px; }
  .technicalOption { padding: 18px 4px; min-height: 110px; }
  .technicalOption .opt-icon { width: 42px; height: 42px; font-size: 1.1rem; }
  .technicalOption .opt-label { font-size: 0.74rem; }
}

/* Acessibilidade: usuários com redução de movimento */
@media (prefers-reduced-motion: reduce) {
  .technicalOption,
  .technicalOption .opt-icon,
  .tagEco, .tagPremium, .tagNew,
  .downloadFichaButton,
  .chevronIcon,
  .thumbnail,
  .prevButton, .nextButton {
    transition: none;
  }
  .technicalOption:hover,
  .downloadFichaButton:hover,
  .tagEco:hover, .tagPremium:hover, .tagNew:hover {
    transform: none;
  }
}