/* === Layout base === */
body {
  font-family: system-ui, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #fafafa;
  color: #222;
}

.container {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 16px;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.gallery, .info, .configurator { min-width: 0; }

/* === Tarjetas === */
.gallery,
.info {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === Galería === */
.image-viewer {
  position: relative;
  text-align: center;
}

.image-viewer img {
  width: 400px;
  height: 600px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f3f3;
}

.image-viewer .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
}
.image-viewer .prev { left: 10px; }
.image-viewer .next { right: 10px; }

/* Miniaturas carrusel */
.thumbnails {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.thumbnails::-webkit-scrollbar { height: 6px; }
.thumbnails::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.thumb {
  flex: 0 0 auto;
  width: 120px;
  height: 160px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: border .2s, transform .2s;
}
.thumb:hover { border-color: #ff4081; transform: scale(1.05); }

/* === Info === */
.info h1 {
  margin: 0 0 10px;
  font-size: 2rem;
}
.info .universo { font-size: 1rem; color: #555; margin-bottom: 12px; }

.precios {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 16px;
}
.precios .original { text-decoration: line-through; color: #888; font-size: 1rem; }
.precios .descuento { color: #d32f2f; font-weight: bold; font-size: 1.4rem; }
.precios .normal { font-weight: bold; font-size: 1.4rem; color: #111; }

.descripcion { margin-bottom: 16px; line-height: 1.6; }

/* Extra info */
.extra-info { margin-top: 20px; }
.extra-info div {
  margin-bottom: 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.extra-info i { color: #ff4081; font-size: 1.2rem; }

/* === Configurador === */
.configurator {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
}

.config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.config-head h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
}

.wizard-progress { width: 320px; max-width: 100%; }
.progressbar { width: 100%; height: 8px; background: #f1f1f1; border-radius: 999px; overflow: hidden; }
.progressbar .progress { height: 8px; background: #ff4081; width: 0%; }

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.wizard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.seccion {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
}
.seccion h3 { margin: 0 0 10px; font-size: 1.05rem; color: #333; }

.opciones { display: flex; flex-wrap: wrap; gap: 10px; }
.opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s;
}
.opcion:hover { border-color: #ff4081; }
.opcion input { margin-bottom: 4px; }
.opcion img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}
.opcion span { text-align: center; }
.opcion i { font-size: 1.2rem; color: #ff4081; }

.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-primary, .btn-secondary {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary { background: #ff4081; color: #fff; }
.btn-primary:hover { background: #e73774; }
.btn-secondary { background: #f1f1f1; color: #111; }
.btn-secondary:disabled { opacity: .5; cursor: not-allowed; }

.resumen h3 { margin: 0 0 10px; }
.resumen ul { list-style: none; padding: 0; margin: 0 0 12px; }
.resumen ul li {
  padding: 8px 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
}
.resumen-total { display: flex; justify-content: space-between; font-size: 1.1rem; }

/* === FAQS === */
.faqs {
  grid-column: 1 / -1;
  margin-top: 40px;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.faqs h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  display: flex;
  justify-content: center; /* centrado */
  align-items: center;
  gap: 12px;
  color: #111;
}
.faq-item { border-bottom: 1px solid #e1e1e1; }
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.1rem;
  padding: 18px 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s ease;
}
.faq-question i:first-child { margin-right: 10px; color: #e91e63; }
.faq-question:hover { color: #e91e63; }
.faq-answer {
  display: none;
  padding: 0 12px 18px 38px;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
}
.faq-item.active .faq-answer { display: block; }
.faq-item.active .faq-question i.fas.fa-chevron-down { transform: rotate(180deg); }
.faq-question i.fas.fa-chevron-down { transition: transform 0.2s ease; }

/* === Botón compra directa === */
.buy-direct { margin-top: 30px; text-align: center; }
.buy-direct p {
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 1.05em;
  line-height: 1.4;
  color: #333;
}
.btn-buy-direct {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: 10px;
  background: #ff4081; /* igual que .btn-primary */
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.02s ease;
  border: none;
  box-shadow: none;
  appearance: none;
}
.btn-buy-direct:hover { background: #e73774; color: #fff; }
.btn-buy-direct:active { transform: translateY(1px); }

/* === Responsive === */
@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
  .image-viewer img { width: 100%; height: auto; }
  .wizard-grid { grid-template-columns: 1fr; }
  .config-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .opcion img { width: 84px; height: 84px; }
  .thumb { width: 70px; height: 100px; }
}

.universo, .altura {
  font-size: 1.1rem;
  color: #ff4081;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.extra-info div i { color: #ff4081; width: 20px; }


.comments { margin-top: 40px; padding: 24px; background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.comments h2 { font-size: 1.8rem; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.comment-list { margin-bottom: 30px; }
.comment { border-bottom: 1px solid #eee; padding: 16px 0; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stars { color: #ff4081; }
.comment p { margin: 0 0 8px; line-height: 1.5; }
.comment small { color: #888; }
.no-comments { font-style: italic; color: #666; }

.add-comment h3 { margin: 0 0 12px; font-size: 1.2rem; }
.add-comment textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; min-height: 80px; resize: vertical; margin-bottom: 12px; }
.add-comment select { padding: 10px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 12px; }
.add-comment button { background: #ff4081; color: #fff; border: none; padding: 12px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.add-comment button:hover { background: #e73370; }
.login-hint { font-size: 0.95rem; color: #666; }
.login-hint a { color: #ff4081; text-decoration: underline; }