/* Easywood 3D Catalog - estilos customizados (CSS puro, compatível com Tailwind CDN) */
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(150,115,61,.35); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(150,115,61,.6); }

.card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.dark .card { background: #171717; border-color: #262626; }

.btn-primary {
  background: #96733D; color: #fff; font-weight: 600;
  border-radius: .75rem; padding: .625rem 1rem;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: all .15s; cursor: pointer; border: none; font-size: .875rem;
}
.btn-primary:hover { background: #7A5C30; }
.btn-primary:active { transform: scale(.95); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  background: #e7e5e4; color: #44403c; font-weight: 500;
  border-radius: .75rem; padding: .625rem 1rem;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: all .15s; cursor: pointer; border: none; font-size: .875rem;
}
.btn-secondary:hover { background: #d6d3d1; }
.btn-secondary:active { transform: scale(.95); }
.dark .btn-secondary { background: #262626; color: #e7e5e4; }
.dark .btn-secondary:hover { background: #404040; }

.input {
  width: 100%; background: #fafaf9; border: 1px solid #d6d3d1;
  border-radius: .75rem; padding: .625rem .875rem; font-size: .875rem;
  transition: box-shadow .15s; color: inherit;
}
.input:focus { outline: none; box-shadow: 0 0 0 2px #B08D55; }
.dark .input { background: #262626; border-color: #404040; }

.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .125rem .625rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 600;
}

.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .875rem; border-radius: .75rem;
  font-size: .875rem; font-weight: 500; color: #78716c;
  transition: colors .15s; cursor: pointer; user-select: none;
}
.nav-item:hover { background: rgba(231,229,228,.7); color: #292524; }
.dark .nav-item { color: #a8a29e; }
.dark .nav-item:hover { background: #262626; color: #fff; }
.nav-item.active { background: rgba(150,115,61,.15); color: #7A5C30; }
.dark .nav-item.active { color: #C9A876; }

.fade-in { animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }

.toast { animation: slideIn .3s ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px);} to { opacity:1; transform:none;} }

/* Editor 3D */
#viewport3d { touch-action: none; position: relative; }
#viewport3d canvas { display: block; }

.tool-btn {
  width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center;
  border-radius: .75rem; color: #78716c; transition: all .15s; cursor: pointer;
  border: none; background: transparent; font-size: .875rem;
}
.tool-btn:hover { background: #e7e5e4; }
.dark .tool-btn { color: #a8a29e; }
.dark .tool-btn:hover { background: #262626; }
.tool-btn.active { background: #96733D !important; color: #fff !important; }

.lib-item { cursor: grab; }
.lib-item:active { cursor: grabbing; }
.lib-item:hover .lib-thumb { box-shadow: 0 0 0 2px #B08D55; }

/* Miniatura procedural do móvel */
.furniture-thumb {
  background: linear-gradient(145deg, var(--c1, #A0793D), var(--c2, #7A5C30));
  position: relative; overflow: hidden;
}
.furniture-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.06) 14px 15px);
}

table.data-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
table.data-table th { text-align: left; padding: .5rem .75rem; font-weight: 600; font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: #78716c; border-bottom: 1px solid #e7e5e4; }
table.data-table td { padding: .625rem .75rem; border-bottom: 1px solid #f5f5f4; }
.dark table.data-table th { border-color: #262626; }
.dark table.data-table td { border-color: #1f1f1f; }

/* Impressão do orçamento em PDF */
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { position: absolute; inset: 0; padding: 24px; background: white !important; color: #1c1917 !important; }
  .no-print { display: none !important; }
}
