/* Estilos existentes mantidos */
.color-option {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
}

.color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.color-option.active {
  border-color: #007bff;
  transform: scale(1.15);
  box-shadow: 0 8px 20px 
  rgba(0, 0, 0, 0.4);
}

/* Efeito para produto relacionado selecionado */
.related-product-image.selected {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border: 3px solid #007bff;
  border-radius: 20px;
}

.carousel-image.selected {
  transform: scale(0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid #007bff;
  border-radius: 20px;
}

/* Cores padrão para todos os produtos */
.color-c1 {
  background-color: #1a1a1a; /* Preto */
}

.color-c2 {
  background-color: #8b4513; /* Marrom */
}

.color-c3 {
  background-color: #d2b48c; /* Bege */
}

/* Cores específicas para produto Amanhecer */
.product-amanhecer .color-c1 {
  background-color: #1a1a1a; /* Preto */
}

.product-amanhecer .color-c2 {
  background-color: #443327; /* Marrom */
}

.product-amanhecer .color-c3 {
  background-color: #4e4e4e; /* Cinza */
}

/* Cores específicas para produto Valentina */
.product-valentina .color-c1 {
  background-color: #1a1a1a; /* Preto */
}

.product-valentina .color-c2 {
  background-color: #662d12; /* Marrom */
}

.product-valentina .color-c3 {
  background-color: #f8ecdc; /* Creme */
}

/* Cores específicas para produto Paloma */
.product-paloma .color-c1 {
  background-color: #1a1a1a; /* Preto */
}

.product-paloma .color-c2 {
  background-color: #3b160f; /* Vinho */
}

.product-paloma .color-c3 {
  background-color: #8b4513; /* Marrom */
}

/* Cores específicas para produto Suíça */
.product-suica .color-c1 {
  background-color: #1a1a1a; /* Preto */
}

.product-suica .color-c2 {
  background-color: #46230a; /* Marrom escuro */
}

.product-suica .color-c3 {
  background-color: #8b4513; /* Marrom */
}

/* Cores específicas para produto Confort V2 */
.product-confortv2 .color-c1 {
  background-color: #cfcebd; /* Preto */
}

.product-confortv2 .color-c2 {
  background-color: #181818; /* Marrom escuro */
}

.product-confortv2 .color-c3 {
  background-color: #5a4037; /* Marrom médio */
}

/* Estilos para o carrossel mobile */
.carousel-container {
  padding: 0 20px;
  margin: 0 -20px;
}

.carousel-track {
  padding: 0 20px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.carousel-slide {
  touch-action: pan-y;
}

.carousel-slide img {
  transition: transform 0.3s ease;
}

.carousel-slide img:active {
  transform: scale(0.95);
}

/* Indicadores do carrossel */
.carousel-indicators {
  margin-top: 16px;
}

.indicator {
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.indicator:hover {
  transform: scale(1.2);
}

.indicator.active {
  background-color: #007bff;
}

/* Otimizações para touch */
@media (max-width: 768px) {
  .carousel-track {
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
  }
  
  .carousel-slide {
      scroll-snap-align: start;
      scroll-snap-stop: always;
  }
}

/* Animações suaves para transições */
.carousel-track.transitioning {
  pointer-events: none;
}

/* Estilo para melhor feedback visual no touch */
.carousel-slide img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Novas classes convertidas do Tailwind */

/* Layout geral */
.flex-center {
  display: flex;
  justify-content: center;
}

.container-width {
  width: 1340px;
  padding-left: 24px;
  padding-right: 24px;
}

/* Layout Desktop */
.desktop-layout {
  display: flex;
  justify-content: center;
}

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

@media (min-width: 1024px) {
  .desktop-grid {
    grid-template-columns: 550px 620px;
  }
}

.main-image-container {
  display: flex;
  justify-content: center;
  height: 800px;
}

.main-image {
  height: 100%;
  width: auto;
  transition: transform 0.15s ease;
}

.right-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 800px;
}

/* Card de produto */
.product-card {
  background-color: var(--preto);
  color: var(--branco-primario);
  border-radius: 20px;
  padding: 30px 50px 40px 50px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  width: 620px;
  height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-title {
  font-size: 42px;
  font-weight: 500;
  margin-bottom: 40px;
  line-height: 1.1;
}

.product-description {
  font-size: 18px;
  flex-grow: 1;
  line-height: 1.4;
  overflow-y: auto;
}

.product-button {
  width: 220px;
  height: 60px;
  border: 2px solid var(--branco-primario);
  color: var(--branco-primario);
  font-size: 18px;
  padding: 8px 24px;
  border-radius: 10px;
  transition: all 0.3s;
  background-color: transparent;
  cursor: pointer;
  margin-top: 40px;
  flex-shrink: 0;
}

.product-button:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Seção inferior */
.bottom-section {
  display: grid;
  grid-template-columns: 100px 490px;
  gap: 32px;
  height: 400px;
  width: 620px;
}

.color-selector {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
  width: 100px;
}

.color-large {
  width: 100px;
  height: 100px;
}

.product-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 490px;
}

.preview-image {
  height: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.15s ease;
}

/* Layout Mobile */
.mobile-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-product-card {
  background-color: var(--preto);
  color: var(--branco-primario);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.mobile-product-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.mobile-product-description {
  color: var(--branco-primario);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.4;
  flex-grow: 1;
}

.mobile-product-button {
  border: 1px solid var(--branco-primario);
  color: var(--branco-primario);
  padding: 8px 16px;
  border-radius: 5px;
  transition: all 0.3s;
  font-size: 14px;
  background-color: transparent;
  cursor: pointer;
  margin-top: auto;
  flex-shrink: 0;
  align-self: flex-start;
}

.mobile-product-button:hover {
  background-color: var(--branco-primario);
  color: var(--preto);
}

.mobile-image-container {
  display: flex;
  justify-content: center;
  padding-right: 40px;
}

.mobile-main-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.15s ease;
}

.mobile-color-selector {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.color-medium {
  width: 64px;
  height: 64px;
}

/* Produtos relacionados - Desktop - CORRIGIDO */
.desktop-related-products {
  margin-top: 40px;
}

.related-products-container {
  display: flex;
  justify-content: center;
  padding: 20px 20px 0 20px; /* Padding superior para dar espaço ao hover */
  overflow: visible; /* Permite que o conteúdo seja visível fora do container */
}

.related-products-grid {
  display: flex;
  gap: 10px;
  height: 320px; /* Altura aumentada para acomodar o hover */
  max-height: 320px; /* Altura máxima aumentada */
  justify-content: center;
  align-items: flex-start;
  overflow: visible; /* Permite que o conteúdo seja visível fora do container */
  padding-top: 20px; /* Padding superior para dar espaço ao hover */
}

.related-product-image {
  width: auto;
  height: 300px; /* Altura específica para as imagens */
  max-height: 300px; /* Altura máxima explícita */
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s;
  flex-shrink: 0; /* Evita que diminua */
  display: block;
}

.related-product-image:hover {
  transform: translateY(-8px);
}

/* Produtos relacionados - Mobile - CORRIGIDO */
.mobile-related-products {
  margin-top: 0px;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease-out;
}

.carousel-slide {
  flex-shrink: 0;
  width: 50%;
  height: 220px; /* Altura aumentada para acomodar transformações */
  overflow: visible; /* Permite que o conteúdo seja visível fora do container */
  padding-top: 20px; /* Padding superior para dar espaço aos efeitos */
}

.carousel-image {
  width: 100%;
  height: 200px; /* Altura específica para as imagens */
  max-height: 200px; /* Altura máxima explícita */
  object-fit: contain;
  object-position: center;
  display: block;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 5px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--fundo-cinza);
}

/* Media Queries para responsividade */
@media (min-width: 768px) {
  .desktop-layout {
    display: flex;
  }
  
  .mobile-layout,
  .mobile-related-products {
    display: none;
  }
  
  .desktop-related-products {
    display: block;
  }
}

@media (max-width: 767px) {
  .desktop-layout,
  .desktop-related-products {
    display: none;
  }
  
  .mobile-layout,
  .mobile-related-products {
    display: flex;
  }
  
  .container-width {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Media queries adicionais para melhor responsividade dos cards */
@media (max-width: 1200px) {
  .product-card {
    width: 100%;
    max-width: 620px;
    height: auto;
    min-height: 380px;
  }
  
  .bottom-section {
    width: 100%;
    max-width: 620px;
    grid-template-columns: 100px 1fr;
  }
  
  .product-preview {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .desktop-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .main-image-container {
    height: 500px;
  }
  
  .right-section {
    height: auto;
  }
  
  .bottom-section {
    grid-template-columns: 1fr;
    gap: 24px;
    height: auto;
  }
  
  .color-selector {
    flex-direction: row;
    width: 100%;
    justify-content: center;
  }
  
  .product-preview {
    height: 300px;
  }
}

/* Correções específicas para Chromium/Blink (Brave, Chrome, Edge) */
@supports (-webkit-appearance: none) {
  .related-product-image {
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden; /* Prevent visual glitches */
  }
  
  .carousel-image {
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden; /* Prevent visual glitches */
  }
}

/* Fallback para navegadores que não suportam object-fit */
@supports not (object-fit: contain) {
  .related-product-image {
    max-width: 100%;
    width: auto;
    height: 300px;
  }
  
  .carousel-image {
    max-width: 100%;
    width: auto;
    height: 200px;
  }
}