.info-section {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.info-section h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.info-section p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.info-productos {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 14px;
}

.info-productos p {
  margin: 0.25rem 0;
  color: #666;
}

#productos-container {
  margin: 2rem 0;
  display: grid;
  gap: 1.5rem;
}

.unidad-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.unidad-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.unidad-header {
  background: #f8f9fa;
  color: #333;
  padding: 1rem 1.5rem;
  margin: 0;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  font-size: 16px;
  text-align: left;
}

.unidad-content {
  padding: 1.5rem;
}

.productos-controls {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.productos-controls label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
}

.select-num-productos {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
  min-width: 140px;
}

.select-num-productos:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.productos-unidad {
  margin-top: 1rem;
}

.producto-item {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.producto-item:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.producto-header {
  background: #e8f4fd;
  color: #1a73e8;
  padding: 0.75rem 1rem;
  margin: -1rem -1rem 1rem -1rem;
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid #d0e7f8;
}

.producto-content {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-row input,
.form-row textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.form-row textarea {
  resize: vertical;
  min-height: 80px;
}

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.btn-primary {
  background: #1a73e8;
  color: white;
}

.btn-primary:hover {
  background: #1557b0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #dadce0;
}

.btn-secondary:hover {
  background: #e8eaed;
  border-color: #bdc1c6;
}

.btn-warning {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e67e22, #d35400);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

.form-buttons {
  margin: 2rem 0;
  text-align: center;
}

.mensaje {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  transition: all 0.3s ease;
}

.mensaje.exito {
  background: #e8f5e8;
  color: #2e7d2e;
  border: 1px solid #c3e6c3;
}

.mensaje.error {
  background: #fce8e6;
  color: #d93025;
  border: 1px solid #fad2cf;
}

.mensaje.info {
  background: #e8f4fd;
  color: #1a73e8;
  border: 1px solid #c8e7f8;
}

.mensaje-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.mensaje-info h3 {
  margin: 0 0 1rem 0;
  color: #856404;
}

.mensaje-info p {
  margin: 0 0 1rem 0;
}

.mensaje-info .btn {
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .unidad-content {
    padding: 1rem;
  }
  
  .productos-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .productos-controls label {
    text-align: center;
  }
  
  .select-num-productos {
    min-width: auto;
  }
  
  .producto-content {
    gap: 0.75rem;
  }
  
  .form-row input,
  .form-row textarea {
    padding: 8px 10px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .info-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .unidad-header {
    padding: 0.75rem 1rem;
    font-size: 14px;
  }
  
  .unidad-content {
    padding: 0.75rem;
  }
  
  .producto-item {
    padding: 0.75rem;
  }
  
  .producto-header {
    padding: 0.5rem 0.75rem;
    margin: -0.75rem -0.75rem 0.75rem -0.75rem;
    font-size: 13px;
  }
}

.producto-item {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1a73e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.8) translateY(-30px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: white;
  overflow: hidden;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 20px;
  pointer-events: none;
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
  animation: bounceIn 0.6s ease-out 0.2s both;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.modal-message {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.modal-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modal-btn:hover::before {
  width: 300px;
  height: 300px;
}

.modal-btn-confirm {
  background: #ff4757;
  color: white;
  box-shadow: 0 8px 20px rgba(255, 71, 87, 0.4);
}

.modal-btn-confirm:hover {
  background: #ff3742;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(255, 71, 87, 0.5);
}

.modal-btn-cancel {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(255, 255, 255, 0.2);
}

select:disabled,
.select-num-productos:disabled {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  cursor: not-allowed !important;
  border-color: #e9ecef !important;
}

button:disabled,
.btn:disabled {
  background-color: #e9ecef !important;
  color: #6c757d !important;
  cursor: not-allowed !important;
  border-color: #e9ecef !important;
  box-shadow: none !important;
  transform: none !important;
}

button:disabled:hover,
.btn:disabled:hover {
  background-color: #e9ecef !important;
  transform: none !important;
  box-shadow: none !important;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
