/* ==================== Emicela Configurador — custom styles ==================== */

html { scroll-behavior: smooth; }

/* ---- Product cards (draggable) ---- */
.product-card {
  cursor: grab;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 12px 10px 14px;
  position: relative;
  text-align: center;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -16px rgba(5,30,132,0.35);
  border-color: rgba(24,99,220,0.3);
}
.product-card:active { cursor: grabbing; }
.product-card.in-tray::after {
  content: "✓ En bandeja";
  position: absolute; top: 8px; right: 8px;
  background: #00d084; color: white;
  font-size: 9px; font-weight: 700;
  padding: 3px 7px; border-radius: 999px;
  letter-spacing: .04em;
}
.product-card .bottle-thumb {
  width: 100%; aspect-ratio: 1/1.15;
  display: grid; place-items: center;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fbfaf6 0%, #f3efe6 100%);
  border-radius: 12px;
  overflow: hidden;
}
.product-card .bottle-thumb svg { max-height: 100%; max-width: 80%; }
.product-card .bottle-thumb .product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.product-card .pname {
  font-weight: 700; font-size: 13px;
  color: #0b1538; line-height: 1.2;
}
.product-card .pcat {
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em;
  color: #1863dc; font-weight: 600; margin-bottom: 4px;
}
.product-card .pnote {
  font-size: 11px; color: #0b1538aa; margin-top: 2px;
  font-style: italic;
}

/* ---- Tray drop zone ---- */
#trayList.drag-over {
  outline: 2px dashed #1863dc;
  outline-offset: -8px;
  border-radius: 16px;
  background: #f0f6ff;
}

/* ---- Tray item row ---- */
.tray-row {
  display: flex; align-items: center; gap: 12px;
  background: #fbfaf6;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 10px 12px;
  transition: border-color .15s, transform .1s;
  cursor: pointer;
}
.tray-row:hover { border-color: rgba(24,99,220,.35); background: #fff; }
.tray-row .mini {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.06);
  overflow: hidden;
}
.tray-row .mini svg { max-width: 80%; max-height: 80%; }
.tray-row .mini .tray-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tray-row .info { flex: 1; min-width: 0; }
.tray-row .title { font-weight: 700; font-size: 14px; }
.tray-row .meta { font-size: 11px; color: #0b1538aa; }
.tray-row .qty-pill {
  background: #051e84; color: white;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}

/* empty state */
.tray-empty {
  border: 2px dashed rgba(5,30,132,0.18);
  border-radius: 16px;
  text-align: center;
  padding: 28px 18px;
  color: #051e84aa;
  font-size: 13px;
}
.tray-empty strong { color: #051e84; }

/* ---- Brand color swatches ---- */
.swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .15s;
  position: relative;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active {
  border-color: #051e84;
  box-shadow: 0 0 0 2px white inset;
}

/* ---- Badge & Zone chips ---- */
.chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  background: white;
  text-align: left;
}
.chip:hover { border-color: rgba(24,99,220,0.4); }
.chip.active {
  border-color: #051e84;
  background: #051e84;
  color: white;
}
.chip svg { flex-shrink: 0; }

/* ---- Tab/view buttons ---- */
.viewBtn {
  background: transparent;
  color: #0b1538aa;
  transition: all .15s;
}
.viewBtn:hover { background: rgba(5,30,132,0.05); color: #051e84; }
.viewBtn.active { background: #051e84; color: white; }

/* ---- Step bar active state ---- */
.step.active { border-color: #051e84; box-shadow: 0 0 0 3px rgba(5,30,132,0.08); }
.step.active span:first-child { background: #051e84; color: white; }

/* ---- Modal options ---- */
.opt-tile {
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 12px 10px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
  background: white;
  font-weight: 600;
  font-size: 12px;
  color: #0b1538;
}
.opt-tile:hover { border-color: rgba(24,99,220,0.4); }
.opt-tile.active {
  border-color: #051e84;
  background: #f0f6ff;
  color: #051e84;
  box-shadow: 0 0 0 3px rgba(5,30,132,0.08);
}
.opt-tile .opt-label { display: block; font-weight: 700; font-size: 13px; }
.opt-tile .opt-sub { display: block; font-size: 10px; color: #0b1538aa; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.opt-tile.active .opt-sub { color: #1863dccc; }

/* ---- Preview stage ---- */
#previewStage svg.tray-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
#previewStage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
#heroPreview img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* dragging visual */
.dragging { opacity: 0.45; }

/* range input thumb sizing on iOS */
input[type=range] { height: 8px; }

/* Hide scrollbars in tray nicely */
@media (max-width: 768px) {
  #previewStage { aspect-ratio: 4/3; }
}

/* tiny utility */
.no-scrollbar::-webkit-scrollbar { display: none; }

/* print-only fallback */
@media print {
  body * { visibility: hidden; }
  #pdfArea, #pdfArea * { visibility: visible; }
  #pdfArea { position: absolute; left: 0; top: 0; }
}
