/* ============================================================
   GRADE DE CORES — NuvemShop Layout Rio
   ============================================================ */

.grade-cores-section {
  width: 100%;
  margin-top: 48px;
  padding: 0;
  clear: both;
}

.grade-cores-titulo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #222;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8e8e8;
}

.grade-cores-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.grade-cores-card {
  border: none;
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grade-cores-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.grade-cores-card.gc-ativo {
  box-shadow: 0 8px 28px rgba(139, 31, 58, 0.55);
  transform: translateY(-4px);
}

.grade-cores-imagem {
  width: 100%;
  height: 230px;
  margin: 0 auto 10px;
  overflow: hidden;
  background: transparent;
  border: none;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grade-cores-imagem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.grade-cores-info-col {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 8px;
}

.grade-cores-nome {
  font-size: 16px !important;
  color: #333 !important;
  margin-bottom: 6px;
  line-height: 1.3;
  word-break: break-word;
  font-weight: 600;
  display: block !important;
  min-height: 32px;
  padding: 0 2px;
}

.grade-cores-preco {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #993e5a !important;
  display: block !important;
  margin-top: auto;
}

.grade-cores-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 4px 0;
  margin-top: 4px;
}

.gc-btn-menos,
.gc-btn-mais {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #8b1f3a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.15s, transform 0.1s;
  padding: 0;
  flex-shrink: 0;
}

.gc-btn-menos:hover,
.gc-btn-mais:hover {
  background: #6e1830;
  transform: scale(1.08);
}

.gc-qty-valor {
  font-size: 16px;
  font-weight: 700;
  min-width: 20px;
  color: #222;
}

.grade-cores-resumo {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.gc-resumo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #efefef;
  font-size: 13px;
}

.gc-resumo-item:last-child {
  border-bottom: none;
}

.gc-resumo-img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.gc-resumo-info {
  flex: 1;
  color: #444;
}

.gc-resumo-sub {
  font-size: 11px;
  color: #888;
}

.gc-resumo-preco {
  font-weight: 600;
  color: #222;
  font-size: 13px;
}

.gc-resumo-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
  font-size: 15px;
  color: #222;
  text-align: right;
}

.gc-btn-comprar {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gc-btn-comprar:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gc-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

.gc-feedback.sucesso {
  background: #eafaf1;
  color: #1e8449;
  border: 1px solid #a9dfbf;
}

.gc-feedback.erro {
  background: #fdedec;
  color: #c0392b;
  border: 1px solid #f5b7b1;
}

@media (max-width: 1024px) {
  .grade-cores-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .grade-cores-imagem {
    height: 200px;
  }
}

@media (max-width: 600px) {
  .grade-cores-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .grade-cores-imagem {
    height: 180px;
  }
  .grade-cores-nome {
    font-size: 10px !important;
    min-height: 28px;
  }
}

/* ============================================================
   PÁGINA DO PRODUTO — Layout e tamanho da imagem
   ============================================================ */

/* Limita a largura da linha do produto (sem mexer no container do slider) */
#single-product .section-single-product {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Ajustes responsivos */
@media (max-width: 1024px) {
  #single-product .section-single-product {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 600px) {
  .product-image-container {
    max-width: 100%;
  }
}

/* Esconde botões de compartilhamento social na página de produto (GAMBIARRA PATRICKZESCA)*/
.social-share {
  display: none !important;
}

/* ============================================================
   PÁGINA DO PRODUTO — Nome e preço destacados
   ============================================================ */

/* Nome do produto */
#single-product .page-header h1.js-product-name {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #8b1f3a !important;
  line-height: 1.2 !important;
  margin-bottom: 16px !important;
}

@media (max-width: 600px) {
  #single-product .page-header h1.js-product-name {
    font-size: 22px !important;
  }
}

/* Preço do produto - destaque vinho/vermelho */
#single-product #price_display {
  font-size: 44px !important;
  font-weight: 700 !important;
  color: #993e5a !important;
  display: block !important;
  margin-top: 4px !important;
}

/* Texto "A partir de" antes do preço (se aparecer) */
#single-product .price-container {
  align-items: center;
}

/* Preço comparativo (riscado) menor */
#single-product #compare_price_display {
  font-size: 16px !important;
  text-decoration: line-through;
  color: #999 !important;
  margin-bottom: 4px !important;
}

@media (max-width: 600px) {
  #single-product #price_display {
    font-size: 26px !important;
  }
}

/* Esconde valor parcelado ao lado do preço principal */
#single-product .price-container .item-installments {
  display: none !important;
}

/* Caixa de aviso "Selecione abaixo as quantidades" */
.aviso-selecionar-quantidades {
  border: 1px solid #8b1f3a;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
}

.aviso-selecionar-quantidades p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.aviso-link {
  color: #8b1f3a !important;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.aviso-link:hover {
  color: #6e1830 !important;
}

.svg-aviso {
  width: 20px;
  height: 20px;
  color: #8b1f3a;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Prévia da descrição na coluna direita */
.previa-descricao {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.previa-descricao-texto {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.previa-descricao-texto p {
  margin: 0 0 4px 0;
}

.previa-descricao-texto strong {
  color: #222;
}

.link-ler-mais {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8b1f3a !important;
  text-decoration: none;
  border-bottom: 2px solid #8b1f3a;
  padding-bottom: 2px;
  transition: opacity 0.15s;
}

.link-ler-mais:hover {
  opacity: 0.7;
  text-decoration: none;
}

/* Scroll suave ao clicar nos links âncora */
html {
  scroll-behavior: smooth;
}

/* ============================================================
   BOTÃO COMPRAR LATERAL (na coluna direita do produto)
   ============================================================ */

.gc-comprar-lateral {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.gc-comprar-lateral-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.gc-comprar-lateral-label {
  font-size: 13px;
  color: #666;
  font-weight: 600;
}

.gc-comprar-lateral-total {
  font-size: 22px;
  font-weight: 700;
  color: #8b1f3a;
  line-height: 1.1;
}

.gc-comprar-lateral-itens {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.gc-comprar-lateral-btn {
  background: #8b1f3a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  flex-shrink: 0;
}

.gc-comprar-lateral-btn:hover:not(:disabled) {
  background: #6e1830;
  transform: translateY(-1px);
}

.gc-comprar-lateral-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .gc-comprar-lateral {
    padding: 12px 14px;
  }
  .gc-comprar-lateral-total {
    font-size: 18px;
  }
  .gc-comprar-lateral-btn {
    padding: 12px 18px;
    font-size: 13px;
  }
}

/* ============================================================
   SETAS DE NAVEGAÇÃO DA IMAGEM PRINCIPAL DO PRODUTO
   ============================================================ */

.swiper-product-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: #8b1f3a;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: #fff;
}

.swiper-product-nav:hover {
  background: #6e1830;
  transform: translateY(-50%) scale(1.08);
}

.swiper-product-nav.swiper-button-prev {
  left: 12px;
}

.swiper-product-nav.swiper-button-next {
  right: 12px;
}

.swiper-product-nav svg {
  width: 18px;
  height: 18px;
  color: #fff;
  fill: #fff;
}

/* Força rotação direta no SVG das setas (independente de classes do tema) */
.nav-prev-custom svg {
  transform: rotate(180deg) !important;
}

.nav-next-custom svg {
  transform: rotate(0deg) !important;
}

/* Esconde nas pontas do slide (quando não tem mais imagens pra navegar) */
.swiper-product-nav.swiper-button-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Esconde no celular (no celular o swipe com o dedo é mais natural) */
@media (max-width: 600px) {
  .swiper-product-nav {
    width: 36px;
    height: 36px;
  }
  .swiper-product-nav svg {
    width: 14px;
    height: 14px;
  }
}


/* ============================================================
   CONTAINER UNIFORME DA PÁGINA DE PRODUTO
   ============================================================ */

/* Aplica a mesma largura máxima e padding pra TODAS as seções principais */
#single-product .section-single-product,
#single-product .grade-cores-section,
#single-product #product-description {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 1024px) {
  #single-product .section-single-product,
  #single-product .grade-cores-section,
  #single-product #product-description {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 600px) {
  #single-product .section-single-product,
  #single-product .grade-cores-section,
  #single-product #product-description {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ============================================================
   CONTAINER UNIFORME — SITE INTEIRO (exceto header e footer)
   ============================================================ */

/* HOME */
body.template-home .container-fluid:not(header .container-fluid):not(footer .container-fluid) {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* CATEGORIA */
body.template-category .container-fluid:not(header .container-fluid):not(footer .container-fluid) {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* BUSCA */
body.template-search .container-fluid:not(header .container-fluid):not(footer .container-fluid) {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* PÁGINAS INSTITUCIONAIS */
body.template-page .container-fluid:not(header .container-fluid):not(footer .container-fluid) {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Responsividade */
@media (max-width: 1024px) {
  body.template-home .container-fluid:not(header .container-fluid):not(footer .container-fluid),
  body.template-category .container-fluid:not(header .container-fluid):not(footer .container-fluid),
  body.template-search .container-fluid:not(header .container-fluid):not(footer .container-fluid),
  body.template-page .container-fluid:not(header .container-fluid):not(footer .container-fluid) {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 600px) {
  body.template-home .container-fluid:not(header .container-fluid):not(footer .container-fluid),
  body.template-category .container-fluid:not(header .container-fluid):not(footer .container-fluid),
  body.template-search .container-fluid:not(header .container-fluid):not(footer .container-fluid),
  body.template-page .container-fluid:not(header .container-fluid):not(footer .container-fluid) {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ============================================================
   HEADER E FOOTER — Conteúdo interno centralizado
   ============================================================ */

/* Centraliza o conteúdo interno do header (mantém fundo largo) */
header .container-fluid {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Centraliza o conteúdo interno do footer (mantém fundo largo) */
footer .container-fluid {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Responsividade */
@media (max-width: 1024px) {
  header .container-fluid,
  footer .container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 600px) {
  header .container-fluid,
  footer .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ============================================================
   BARRA DE BUSCA — Grade de cores (mais destacada)
   ============================================================ */

.grade-cores-busca-wrapper {
  position: relative;
  margin-bottom: 24px;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.grade-cores-busca {
  width: 100%;
  padding: 16px 52px 16px 52px;
  font-size: 15px;
  border: 2px solid #993e5a;
  border-radius: 30px;
  background: #fff;
  color: #333;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(153, 62, 90, 0.1);
  box-sizing: border-box;
  display: block;
}

.grade-cores-busca::placeholder {
  color: #888;
  font-size: 14px;
  font-weight: 500;
}

.grade-cores-busca:focus {
  border-color: #993e5a;
  box-shadow: 0 0 0 4px rgba(153, 62, 90, 0.15), 0 4px 12px rgba(153, 62, 90, 0.15);
}

.grade-cores-busca-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: #993e5a;
  pointer-events: none;
  z-index: 2;
}

.grade-cores-busca-limpar {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #993e5a;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, transform 0.1s;
  z-index: 2;
}

.grade-cores-busca-limpar:hover {
  background: #7d2f48;
  transform: translateY(-50%) scale(1.08);
}

/* Mensagem "Nenhuma cor encontrada" */
.grade-cores-sem-resultado {
  text-align: center;
  padding: 32px 16px;
  background: #f9f9f9;
  border: 1px dashed #ccc;
  border-radius: 8px;
  color: #666;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Mobile */
@media (max-width: 600px) {
  .grade-cores-busca-wrapper {
    margin-bottom: 20px;
    padding: 0;
  }
  .grade-cores-busca {
    padding: 14px 48px 14px 48px;
    font-size: 14px;
  }
  .grade-cores-busca::placeholder {
    font-size: 13px;
  }
  .grade-cores-busca-icon {
    left: 16px;
    width: 20px;
    height: 20px;
  }
  .grade-cores-busca-limpar {
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
}

/* Centraliza resultados quando a grade está sendo filtrada */
.grade-cores-grid.gc-filtrando {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.grade-cores-grid.gc-filtrando .grade-cores-card {
  width: calc((100% - 60px) / 6);
  min-width: 150px;
}

@media (max-width: 1024px) {
  .grade-cores-grid.gc-filtrando .grade-cores-card {
    width: calc((100% - 36px) / 4);
  }
}

@media (max-width: 600px) {
  .grade-cores-grid.gc-filtrando .grade-cores-card {
    width: calc((100% - 10px) / 2);
  }
}

/* Espaço entre a grade de cores e o footer */
.grade-cores-section {
  margin-bottom: 60px;
}

@media (max-width: 600px) {
  .grade-cores-section {
    margin-bottom: 40px;
  }
}

/* ============================================================
   GRADE DE CORES — Cards Esgotados
   ============================================================ */

/* Card esgotado fica com aparência "desabilitada" */
.grade-cores-card.gc-esgotado {
  position: relative;
  opacity: 0.55;
  filter: grayscale(40%);
  pointer-events: auto;
}

/* Imagem do card esgotado fica mais apagada */
.grade-cores-card.gc-esgotado .grade-cores-imagem img {
  filter: grayscale(60%);
}

/* Selo ESGOTADO em faixa horizontal centralizada */
.gc-badge-esgotado {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  background: #c0392b;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 8px 0;
  text-align: center;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  pointer-events: none;
  width: 100%;
}

/* Botões +/- desabilitados em produtos esgotados */
.grade-cores-card.gc-esgotado .gc-btn-menos,
.grade-cores-card.gc-esgotado .gc-btn-mais {
  background: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.5;
}

.grade-cores-card.gc-esgotado .gc-btn-menos:hover,
.grade-cores-card.gc-esgotado .gc-btn-mais:hover {
  background: #999 !important;
  transform: none !important;
}

/* Preço cinza no esgotado */
.grade-cores-card.gc-esgotado .grade-cores-preco {
  color: #999 !important;
  text-decoration: line-through;
}

/* Animação quando o cliente tenta passar do estoque */
@keyframes gc-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

.grade-cores-card.gc-limite-atingido {
  animation: gc-shake 0.4s ease;
}

.grade-cores-card.gc-limite-atingido .gc-btn-mais {
  background: #c0392b !important;
}

/* Esconde os pontinhos de paginação da imagem principal do produto */
#single-product .js-swiper-product-pagination,
#single-product .swiper-pagination {
  display: none !important;
}

/* ============================================================
   TÍTULO "DESCRIÇÃO DO PRODUTO" + linha divisória
   ============================================================ */

#product-description::before {
  content: "DESCRIÇÃO DO PRODUTO";
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #222;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e8e8e8;
}

/* ============================================================
   SETA ANIMADA APONTANDO PARA A GRADE
   ============================================================ */

.seta-grade-animada {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  margin: 32px 0 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  animation: seta-aparecer 0.6s ease, seta-pular 1.6s ease-in-out 0.6s 4;
}

.seta-grade-animada svg {
  width: 56px;
  height: 56px;
  color: #993e5a;
  filter: drop-shadow(0 3px 6px rgba(153, 62, 90, 0.3));
}

.seta-grade-animada span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #993e5a;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .seta-grade-animada svg {
    width: 44px;
    height: 44px;
  }
  .seta-grade-animada span {
    font-size: 14px;
  }
}

.seta-grade-animada:hover {
  text-decoration: none;
  transform: scale(1.05);
}

/* Aparece suavemente no início */
@keyframes seta-aparecer {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pula continuamente pra chamar atenção */
@keyframes seta-pular {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ============================================================
   POPUP FLUTUANTE — Avisar sobre a grade de cores
   ============================================================ */

.popup-grade-cores {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2147483647;
  background: #fff;
  border: 2px solid #993e5a;
  border-radius: 16px;
  padding: 20px 24px 20px 64px;
  box-shadow: 0 8px 24px rgba(153, 62, 90, 0.25);
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: popup-entrar 0.5s ease 1s both, popup-sumir 0.5s ease 9s forwards;
}

.popup-grade-cores.popup-escondido {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  animation: none;
}

@keyframes popup-sumir {
  from {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  to {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    visibility: hidden;
  }
}

.popup-grade-icone {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: #993e5a;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popup-icone-pular 1.5s ease-in-out infinite;
}

.popup-grade-icone svg {
  width: 20px;
  height: 20px;
}

.popup-grade-conteudo strong {
  font-size: 14px;
  color: #222;
  font-weight: 700;
  line-height: 1.3;
}

.popup-grade-conteudo p {
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

.popup-grade-botao {
  display: inline-block;
  background: #993e5a;
  color: #fff !important;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-align: center;
  transition: background 0.2s;
}

.popup-grade-botao:hover {
  background: #7d2f48;
  text-decoration: none;
  color: #fff !important;
}

.popup-grade-fechar {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #f0f0f0;
  color: #666;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}

.popup-grade-fechar:hover {
  background: #e0e0e0;
  color: #333;
}

/* Animações */
@keyframes popup-entrar {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popup-icone-pular {
  0%, 100% {
    transform: translateY(-50%);
  }
  50% {
    transform: translateY(-65%);
  }
}

/* Responsivo */
@media (max-width: 600px) {
  .popup-grade-cores {
    bottom: 80px;
    right: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
  }
}

/* SOLUÇÃO FINAL — Mobile real (iPhone, Android) */
@media screen and (max-width: 600px) {
  .grade-cores-section .grade-cores-container .grade-cores-busca-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
  }
  
  .grade-cores-section .grade-cores-container .grade-cores-busca {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    font-size: 16px !important;
    text-align: left !important;
  }
}

/* ============================================================
   MOBILE — Descrição completa como accordion
   ============================================================ */

@media (max-width: 768px) {
  /* Esconde a descrição completa por padrão no mobile (mais agressivo) */
  #single-product #product-description,
  body.template-product #product-description,
  #product-description {
    display: none !important;
  }
  
  /* Quando a classe 'descricao-aberta' é adicionada, mostra */
  #single-product #product-description.descricao-aberta,
  body.template-product #product-description.descricao-aberta,
  #product-description.descricao-aberta {
    display: block !important;
    animation: descricao-abrir 0.4s ease;
  }
  
  /* O LER MAIS no mobile vira um botão de toggle */
  .link-ler-mais {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .link-ler-mais::after {
    content: "▼";
    font-size: 10px;
    transition: transform 0.3s ease;
  }
  
  .link-ler-mais.ativo::after {
    transform: rotate(180deg);
  }
}

@keyframes descricao-abrir {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 3000px;
  }
}