/* ===================================================
   Identify Photos - Accordion Layout
   Sistema de cards colapsáveis para upload de fotos
   =================================================== */

/* Container Principal */
.photos-accordion-container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0 auto;
}

/* Header de Progresso */
.photos-progress-header {
  background: transparent;
  padding: 24px 0;
  margin-bottom: 24px;
}

.photos-progress-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1e293b;
}

.photos-progress-header h2 i {
  font-size: 28px;
  color: #0066FF;
}

.photos-progress-info {
  font-size: 15px;
  color: #64748b;
  margin-top: 8px;
}

.progress-bar-container {
  background: #e2e8f0;
  border-radius: 8px;
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #0066FF;
  border-radius: 8px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(0, 102, 255, 0.3);
}

/* Lista de Produtos */
.photos-products-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
}

/* Card de Produto (Accordion Item) */
.product-accordion-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  max-width: 100%;
}

.product-accordion-card:hover {
  border-color: #0066FF;
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.1);
}

.product-accordion-card.expanded {
  border-color: #0066FF;
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.15);
}

.product-accordion-card.completed {
  border-color: #10b981;
  background: linear-gradient(to right, #ecfdf5 0%, white 100%);
}

/* Header do Card (Sempre Visível) */
.product-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.product-card-header:hover {
  background: #f9fafb;
}

.product-accordion-card.expanded .product-card-header {
  background: #f3f4f6;
  border-bottom: 2px solid #e5e7eb;
}

/* Thumbnail do Produto */
.product-thumbnail {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.product-thumbnail i {
  font-size: 28px;
  color: #9ca3af;
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

/* Informações do Produto */
.product-info {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.product-colors-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.product-colors-preview span {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.color-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Status do Produto */
.product-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
}

.status-badge.status-pending {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.status-badge.status-completed {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

.status-badge i {
  font-size: 12px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.colors-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.colors-badge i {
  font-size: 14px;
  color: #0066FF;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.status-indicator.pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.status-indicator.partial {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.status-indicator.completed {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.status-indicator i {
  font-size: 12px;
}

/* Botão de Expandir/Recolher */
.expand-toggle {
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.expand-toggle:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.expand-toggle i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.product-accordion-card.expanded .expand-toggle i {
  transform: rotate(180deg);
}

/* Corpo do Card (Conteúdo Colapsável) */
.product-card-body {
  max-height: 0;
  margin-bottom: 16px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fafbfc;
}

.product-accordion-card.expanded .product-card-body {
  max-height: none; /* Permitir altura dinâmica */
  overflow: visible; /* Evitar cortes */
}

.product-card-content {
  padding: 24px;
}

/* Abas de Cores (Dentro do Card Expandido) */
.product-colors-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.product-color-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.product-color-tab:hover {
  border-color: #0066FF;
  background: #f9fafb;
}

.product-color-tab.active {
  background: #0066FF;
  border-color: #0066FF;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.product-color-tab.active .color-dot {
  border-color: rgba(255, 255, 255, 0.3);
}

.product-color-tab .upload-count {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 4px;
}

/* Área de Upload para a Cor Selecionada */
.color-upload-area {
  display: none;
}

.color-upload-area.active {
  display: block;
}

.upload-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.upload-zone-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-zone-header h4 .color-dot {
  width: 16px;
  height: 16px;
}

/* Drop Zone */
.photo-drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 20px;
}

.photo-drop-zone:hover {
  border-color: #0066FF;
  background: #f9fafb;
}

.photo-drop-zone.dragover {
  border-color: #0066FF;
  background: #eff6ff;
  transform: scale(1.02);
}

.drop-zone-icon {
  font-size: 48px;
  color: #9ca3af;
  margin-bottom: 16px;
}

.drop-zone-text h5 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.drop-zone-text p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* Galeria de Fotos da Cor */
.color-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.gallery-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.gallery-photo-item:hover {
  border-color: #0066FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-photo-item.principal {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.principal-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #10b981;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.photo-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(239, 68, 68, 0.95);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-photo-item:hover .photo-remove-btn {
  opacity: 1;
}

.photo-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Seção de Etiqueta dentro do Produto */
.product-label-section {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-label-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-label-section h4 i {
  color: #0066FF;
  font-size: 16px;
}

.product-label-section p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  margin-bottom: 16px;
}

.product-label-upload {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px; /* Mesma altura do upload-area-accordion */
  height: 100%; /* Ocupa toda a altura disponível */
}

.product-label-upload:hover {
  border-color: #0066FF;
  background: #f0f9ff;
}

.product-label-upload i {
  font-size: 48px;
  color: #9ca3af;
  display: block;
  margin-bottom: 12px;
}

.product-label-upload span {
  font-size: 14px;
  color: #6b7280;
  display: block;
}

.product-label-upload.has-image {
  padding: 0;
  border: 2px solid #e5e7eb;
  border-style: solid;
  background: transparent;
  cursor: default;
}

.product-label-upload.has-image:hover {
  border-color: #e5e7eb;
  background: transparent;
}

.product-label-preview {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}

.product-label-preview img {
  width: 100%;
  display: block;
  max-height: 300px;
  object-fit: contain;
  background: #f9fafb;
}

.product-label-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(239, 68, 68, 0.95);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-label-remove:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Remover seção de etiqueta global - agora está dentro de cada produto */
.label-photo-section {
  display: none;
}

/* ✅ NOVO: Label Upload Area com Mesmo Padrão Visual */
.label-upload-area {
  /* Herda os estilos de .upload-area-accordion */
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 24px;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.label-upload-area:hover {
  border-color: #0066FF;
  background: #f0f9ff;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.08);
}

.label-upload-area.drag-over {
  border-color: #0066FF;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* Upload Content (Estado Vazio) para Etiqueta */
.label-upload-area .upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}

.label-upload-area .upload-content i {
  font-size: 48px;
  color: #9ca3af;
}

.label-upload-area .upload-content p {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  margin: 0;
}

.label-upload-area .upload-content .upload-formats {
  font-size: 13px;
  color: #6b7280;
}

/* Thumbnails para Etiqueta (EXATAMENTE IGUAL ao produto) */
.label-upload-area .upload-thumbnails-grid {
  /* Layout horizontal simples, NÃO grid */
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  width: 100%;
}

.label-upload-area .upload-thumbnail-item {
  /* Miniatura pequena quadrada */
  position: relative;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.label-upload-area .upload-thumbnail-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.label-upload-area .upload-thumbnail-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f9fafb;
}

.label-upload-area .upload-thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.label-upload-area .btn-remove-thumbnail {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.95);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  z-index: 10;
  font-size: 11px;
  padding: 0;
}

.label-upload-area .upload-thumbnail-item:hover .btn-remove-thumbnail {
  opacity: 1;
}

.label-upload-area .btn-remove-thumbnail:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.label-upload-area .upload-status {
  /* Badge abaixo, alinhado à esquerda */
  margin-top: 0;
  padding: 0 16px 16px 16px;
  text-align: left;
  width: 100%;
}

.label-upload-area .upload-status .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

/* ===================================================
   NOVOS COMPONENTES - Abas de Cores e Upload Areas
   =================================================== */

/* Abas de Cores */
.color-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding: 20px 24px 12px 24px;
  border-bottom: 2px solid #e5e7eb;
  background: #fafbfc;
}

.color-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.color-tab:hover {
  border-color: #0066FF;
  background: #f9fafb;
}

.color-tab.active {
  background: #0066FF;
  border-color: #0066FF;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
}

.color-tab.active .color-dot {
  border-color: rgba(255, 255, 255, 0.5);
}

.color-tab i.fa-check-circle {
  font-size: 14px;
  margin-left: 4px;
}

/* Painéis de Abas */
.color-tabs-content {
  padding: 24px;
  background: #fafbfc;
}

.color-tab-panel {
  display: none;
}

.color-tab-panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Container para área de upload e galeria (coluna esquerda) */
.upload-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1; /* Garante distribuição igual de espaço */
}

/* Header da seção de upload */
.upload-section-header {
  margin-bottom: 16px;
}

.upload-section-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-section-header h4 i {
  color: #0066FF;
  font-size: 16px;
}

.upload-section-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* Container para etiqueta (coluna direita) */
.label-column {
  display: flex;
  flex-direction: column;
  flex: 1; /* Garante distribuição igual de espaço */
}

/* Área de Upload Accordion */
.upload-area-accordion {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 0;
  min-height: 280px; /* Mesma altura do product-label-upload */
  height: 100%; /* Ocupa toda a altura disponível */
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area-accordion:hover {
  border-color: #0066FF;
  background: #f9fafb;
}

.upload-area-accordion.drag-over {
  border-color: #0066FF;
  background: #eff6ff;
  transform: scale(1.02);
}

.upload-area-accordion.has-photo {
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
}

.upload-area-accordion .upload-content i {
  font-size: 48px;
  color: #9ca3af;
  margin-bottom: 16px;
  display: block;
}

.upload-area-accordion .upload-content p {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.upload-area-accordion .upload-formats {
  font-size: 14px;
  color: #6b7280;
}

/* Preview de Foto no Accordion */
.photo-preview-accordion {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
}

.photo-preview-accordion img {
  width: 100%;
  display: block;
  max-height: 400px;
  object-fit: contain;
}

.btn-remove-photo-accordion {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(239, 68, 68, 0.95);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-remove-photo-accordion:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.btn-remove-photo-accordion i {
  font-size: 16px;
}

/* Galeria de Fotos Accordion */
.photos-gallery-accordion {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
}

.photos-gallery-accordion .gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.photos-gallery-accordion .gallery-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

/* Seção de Etiqueta Global */
.label-upload-section {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

/* Badge genérico */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.label-section-header {
  margin-bottom: 20px;
}

.label-section-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.label-section-header h3 i {
  color: #0066FF;
  font-size: 20px;
}

.label-section-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.upload-area-label {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area-label:hover {
  border-color: #0066FF;
  background: #f9fafb;
}

.upload-area-label .upload-content i {
  font-size: 40px;
  color: #9ca3af;
  margin-bottom: 12px;
  display: block;
}

.upload-area-label .upload-content p {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  margin: 0 0 6px 0;
}

/* Ícone de Expandir */
.expand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.expand-icon i {
  font-size: 14px;
  color: #6b7280;
  transition: transform 0.3s ease;
}

.product-accordion-card.expanded .expand-icon {
  background: #0066FF;
}

.product-accordion-card.expanded .expand-icon i {
  color: white;
  transform: rotate(180deg);
}

/* Responsividade */
@media (max-width: 768px) {
  .product-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .expand-toggle {
    align-self: stretch;
    justify-content: center;
  }

  .product-colors-tabs,
  .color-tabs {
    gap: 6px;
  }

  .product-color-tab,
  .color-tab {
    font-size: 13px;
    padding: 8px 12px;
  }

  .color-photo-gallery,
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }
  
  .upload-area-accordion {
    padding: 30px 16px;
    min-height: 160px;
  }
  
  /* Layout lado a lado em mobile vira empilhado */
  .color-tab-panel.active {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .product-label-upload {
    min-height: 220px;
  }
}

/* ========================================
   GALERIA DE FOTOS - MÚLTIPLAS FOTOS
   ======================================== */
.gallery-item {
  position: relative;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  transition: all 0.2s;
}

.gallery-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.gallery-item-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f9fafb;
}

.gallery-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-gallery-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.95);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  z-index: 10;
  font-size: 12px;
}

.gallery-item:hover .btn-remove-gallery-photo {
  opacity: 1;
}

.btn-remove-gallery-photo:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.gallery-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  padding: 8px 6px 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   MINIATURAS DENTRO DA ÁREA DE UPLOAD
   ======================================== */
.upload-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  padding: 16px;
}

.upload-thumbnail-item {
  position: relative;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  transition: all 0.2s;
}

.upload-thumbnail-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.upload-thumbnail-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f9fafb;
}

.upload-thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-thumbnail {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.95);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  z-index: 10;
  font-size: 11px;
  padding: 0;
}

.upload-thumbnail-item:hover .btn-remove-thumbnail {
  opacity: 1;
}

.btn-remove-thumbnail:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.upload-thumbnail-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  aspect-ratio: 1;
  cursor: pointer;
  transition: all 0.2s;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.upload-thumbnail-add:hover {
  background: #e5e7eb;
  border-color: #3b82f6;
  color: #3b82f6;
}

.upload-thumbnail-add i {
  font-size: 20px;
}

.upload-status {
  padding: 12px 16px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Miniatura da Etiqueta */
.label-thumbnail-preview {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f9fafb;
  border-radius: 8px;
  position: relative;
}

.label-thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.btn-remove-label-thumbnail {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.95);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  font-size: 14px;
  padding: 0;
}

.btn-remove-label-thumbnail:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.label-upload-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: #d1fae5;
  border-radius: 6px;
  margin-top: 12px;
  color: #065f46;
  font-size: 14px;
  font-weight: 600;
}

.label-upload-status i {
  font-size: 16px;
}

.product-label-upload {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.product-label-upload:hover {
  background: #f3f4f6;
  border-color: #3b82f6;
}

.product-label-upload i.fa-tag {
  font-size: 32px;
  color: #9ca3af;
}

.product-label-upload span {
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* ========================================
   FOOTER DO CARD - BOTÕES DE AÇÃO
   ======================================== */
.product-card-footer {
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ✅ NOVO: Containers para agrupar botões */
.footer-left-actions,
.footer-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-card-footer .btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-card-footer .btn-outline-secondary {
  background: white;
  border: 2px solid #e5e7eb;
  color: #6b7280;
}

.product-card-footer .btn-outline-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.product-card-footer .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.product-card-footer .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.product-card-footer .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Badge nas abas de cores */
.color-tab .badge {
  margin-left: 6px;
  font-size: 10px;
  padding: 2px 6px;
}

/* Badge na área de upload */
.upload-area-accordion .badge {
  display: inline-block;
  margin-top: 8px;
}

/* Responsivo - Footer */
@media (max-width: 576px) {
  .product-card-footer {
    flex-direction: column;
    gap: 8px;
  }
  
  .product-card-footer .btn {
    width: 100%;
    justify-content: center;
  }
}
