/**
 * DK Makes — 3D Features CSS
 *
 * Estilos para:
 *  - Preview 3D (viewer3d.js)
 *  - Simulador de Cor (colorSimulator.js)
 *  - Painel Técnico (techInfo.js)
 *
 * Não depende de framework CSS.
 * Compatível com o Tailwind existente.
 */

/* ══════════════════════════════════════════════════════════════
   3D VIEWER
   ══════════════════════════════════════════════════════════════ */

.dk-3d-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  background: #F9F6F0;
  border: 1px solid rgba(0,0,0,0.06);
}

.dk-3d-container canvas {
  border-radius: 20px;
  cursor: grab;
}

.dk-3d-container canvas:active {
  cursor: grabbing;
}

.dk-3d-toolbar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dk-3d-toolbar button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dk-3d-toolbar button:hover {
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.dk-3d-toggle {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.dk-3d-toggle button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  color: #747A8E;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dk-3d-toggle button.active {
  background: #1C1D24;
  color: #fff;
  border-color: #1C1D24;
}

.dk-3d-toggle button:hover:not(.active) {
  border-color: #C7A263;
  color: #C7A263;
}


/* ══════════════════════════════════════════════════════════════
   COLOR SIMULATOR
   ══════════════════════════════════════════════════════════════ */

.dk-color-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dk-color-title {
  font-weight: 700;
  font-size: 14px;
  color: #1C1D24;
}

.dk-color-label {
  font-size: 13px;
  color: #747A8E;
  font-weight: 500;
}

.dk-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dk-color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 0;
  outline: none;
}

.dk-color-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.dk-color-swatch.dk-color-active {
  outline: 2.5px solid #C7A263;
  outline-offset: 3px;
  transform: scale(1.15);
}

.dk-color-swatch .dk-color-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1C1D24;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.dk-color-swatch .dk-color-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1C1D24;
}

.dk-color-swatch:hover .dk-color-tooltip {
  opacity: 1;
}

.dk-color-materials {
  margin-top: 8px;
}


/* ══════════════════════════════════════════════════════════════
   TECHNICAL INFO PANEL
   ══════════════════════════════════════════════════════════════ */

.dk-tech-panel {
  background: #fff;
  border-radius: 24px;
  padding: 20px 24px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.03);
}

.dk-tech-title {
  font-weight: 800;
  font-size: 16px;
  margin: 0 0 16px 0;
  color: #1C1D24;
}

.dk-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .dk-tech-grid {
    grid-template-columns: 1fr;
  }
}

.dk-tech-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #F9F6F0;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.03);
  transition: border-color 0.2s;
}

.dk-tech-card:hover {
  border-color: rgba(199,162,99,0.3);
}

.dk-tech-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.dk-tech-body {
  flex: 1;
  min-width: 0;
}

.dk-tech-label {
  font-size: 11px;
  font-weight: 600;
  color: #747A8E;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.dk-tech-value {
  font-size: 14px;
  font-weight: 700;
  color: #1C1D24;
  line-height: 1.3;
}

.dk-tech-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(199,162,99,0.12);
  color: #C7A263;
  margin-top: 4px;
}

.dk-tech-note {
  font-size: 10px;
  color: #747A8E;
  font-weight: 500;
}

.dk-tech-loading {
  text-align: center;
  padding: 20px;
  color: #747A8E;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
}

/* Details / Properties expandable */
.dk-tech-details {
  margin-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 12px;
}

.dk-tech-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #C7A263;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.dk-tech-details summary::-webkit-details-marker {
  display: none;
}

.dk-tech-details summary::after {
  content: '▾';
  font-size: 14px;
  transition: transform 0.2s;
}

.dk-tech-details[open] summary::after {
  transform: rotate(180deg);
}

.dk-tech-props {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dk-tech-prop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.dk-tech-prop-row:nth-child(even) {
  background: #F9F6F0;
}

.dk-tech-prop-label {
  font-weight: 600;
  color: #1C1D24;
}

.dk-tech-prop-value {
  color: #747A8E;
  font-weight: 500;
}
