/* Estilos generales */

/* Pasos */

.paso-icono {
  text-align: center;
  flex: 1;
  opacity: 0.5;
}

.paso-icono.paso-activo {
  opacity: 1;
  font-weight: bold;
}

.paso-icono img {
  height: 50px; /* Estilo para la imagen en el carrito */
  /* Estilo para la imagen en el carrito */
  .woocommerce-cart .product-name img.custom-image {
    max-width: 100px;
    height: auto;
    display: block;
    margin-top: 10px;
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
  }
  margin-bottom: 10px;
}

.paso {
  display: none;
}

.paso.mostrar {
  display: block;
}

/* Grid de marcos */
.marco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.marco-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.marco-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.marco-card.seleccionado {
  border: 2px solid #0073aa;
}

.marco-borde {
  height: 250px;
  overflow: hidden;
  position: relative;
}

.marco-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.marco-card:hover .marco-img {
  transform: scale(1.05);
}

.marco-info {
  padding: 15px;
}

.marco-titulo {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: bold;
}

.marco-colores {
  margin: 15px 0;
  display: flex;
  align-items: center;
}

.texto-colores {
  margin-right: 10px;
  font-size: 14px;
}

.color-circulo {
  display: inline-block;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  margin-right: 8px;
  cursor: pointer;
  border: 1px solid #ddd;
  transition: all 0.2s;
}

.color-circulo.activo {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px #0073aa;
}

.marco-precio {
  font-weight: bold;
  color: #0073aa;
  font-size: 18px;
  margin: 10px 0 0;
}

/* Subida de imágenes */
.upload-panel {
  display: flex;
  margin: 30px 0;
}

.upload-columna {
  flex: 1;
  padding: 20px;
}

.upload-columna.izquierda img {
  max-width: 100%;
  height: auto;
}

.upload-box {
  border: 2px dashed #ccc;
  padding: 40px;
  text-align: center;
  border-radius: 8px;
  transition: all 0.3s;
}

.upload-box:hover {
  border-color: #0073aa;
}

.boton-subir {
  background: #4caf50;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 15px;
}

/* Botones de navegación */
.botones-navegacion {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn-atras,
.btn-siguiente,
#agregar_al_carrito,
#agregar_y_reiniciar {
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.btn-atras {
  background: #f1f1f1;
  color: #333;
}

.btn-siguiente,
#agregar_al_carrito {
  background: #0073aa;
  color: white;
}

#agregar_y_reiniciar {
  background: #4caf50;
  color: white;
}

.btn-siguiente:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #0073aa;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .upload-panel {
    flex-direction: column;
  }

  .marco-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.4); /* Fondo translúcido */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease-in-out;
}

/* Contenedor del spinner */
.spinner-container {
  background: white;
  padding: 30px 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.3s ease-out;
}

/* Spinner animado */
.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #0073aa;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Texto del loader */
.loader-text {
  font-size: 18px;
  color: #333 !important;
  margin-bottom: 20px;
}

/* Botones del loader */
.loader-options {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.loader-btn {
  padding: 10px 20px;
  background: #efede1 !important;
  color: white !important;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.loader-btn:hover {
  background: #efede1;
}

.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  font-family: "Urbanist", "Sans-serif";
}

.custom-modal-content {
  background: white;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
}

.custom-modal h3 {
  margin-top: 0;
  color: #000000; /* Verde para éxito */
}

.custom-modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-family: "Urbanist", "Sans-serif";
}

.custom-modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.custom-modal-btn-primary {
  background: #c9d0d9;
  color: black;
}

.custom-modal-btn-primary:hover {
  color: #c9d0d9;
  background: black;
}

.custom-modal-btn-secondary {
  background: #f1f1f1;
  color: #333;
}

.custom-modal-btn-secondary:hover {
  color: black;
  background: #ddd;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.ver-imagen {
  display: inline-block;
  border: 1px solid #ddd;
  padding: 3px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.ver-imagen:hover {
  border-color: #999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Estilos para el modal simple */
#simple-image-modal {
  display: flex !important;
}

#modal-image {
  border: 5px solid white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

#close-simple-modal {
  background: #333;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
}

#preview_foto {
  position: absolute;
  top: 20%;
  left: 20%;
  width: 50%;
  height: 50%;
  object-fit: cover;
  z-index: 1;
}

input.error, textarea.error {
    border: 2px solid #e74c3c !important;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
    border-radius: 5px;
}
.tarjeta-errores {
    color: #e74c3c;
    font-weight: bold;
    margin-top: 8px;
    font-size: 0.95em;
}
#popup_error_imagen #cerrar_popup_btn:hover {
    background-color: #ECE6E6;
    color: #333;
}